diff --git a/templates/repo/diff_box.tmpl b/templates/repo/diff_box.tmpl
index 63c57a19d1..a524940f94 100644
--- a/templates/repo/diff_box.tmpl
+++ b/templates/repo/diff_box.tmpl
@@ -33,9 +33,124 @@
+ {{range $i, $file := .Diff.Files}}
+
+
+
+ {{if not $file.IsRenamed}}
+ {{$isImage := (call $.IsImageFile $file.Name)}}
+ {{if and $isImage}}
+
+
+
+ {{else}}
+
+
+
+ {{if $.IsSplitStyle}}
+ {{range $j, $section := .Sections}}
+ {{range $k, $line := .Lines}}
+
+ {{if eq .Type 4}}
+
+
+ |
+
+ {{$line.Content}}
+ |
+
+
+ |
+
+ {{$line.Content}}
+ |
+ {{else}}
+
+ {{if $line.LeftIdx}}{{$line.LeftIdx}}{{end}}
+ |
+
+ {{if $line.LeftIdx}}{{$line.Content}}{{end}}
+ |
+
+ {{if $line.RightIdx}}{{$line.RightIdx}}{{end}}
+ |
+
+ {{if $line.RightIdx}}{{$line.Content}}{{end}}
+ |
+ {{end}}
+
+ {{end}}
+ {{end}}
+ {{else}}
+ {{range $j, $section := .Sections}}
+ {{range $k, $line := .Lines}}
+
+ {{if eq .Type 4}}
+
+ {{if gt $j 0}}{{end}}
+ |
+ {{else}}
+
+ {{if $line.LeftIdx}}{{$line.LeftIdx}}{{end}}
+ |
+
+ {{if $line.RightIdx}}{{$line.RightIdx}}{{end}}
+ |
+ {{end}}
+
+ {{$line.Content}}
+ |
+
+ {{end}}
+ {{end}}
+ {{end}}
+
+
+
+ {{end}}
+ {{end}}
+
+
+
-
-
- {{if not $file.IsRenamed}}
- {{$isImage := (call $.IsImageFile $file.Name)}}
- {{if and $isImage}}
-
-
-
- {{else}}
-
-
-
- {{range $j, $section := .Sections}}
- {{range $k, $line := .Lines}}
-
- {{if eq .Type 4}}
-
-
- |
-
- {{$line.Content}}
- |
-
-
- |
-
- {{$line.Content}}
- |
- {{else}}
-
- {{if $line.LeftIdx}}{{$line.LeftIdx}}{{end}}
- |
-
- {{if $line.LeftIdx}}{{$line.Content}}{{end}}
- |
-
- {{if $line.RightIdx}}{{$line.RightIdx}}{{end}}
- |
-
- {{if $line.RightIdx}}{{$line.Content}}{{end}}
- |
- {{end}}
-
- {{end}}
- {{end}}
-
-
-
-
- {{end}}
- {{end}}
-
-
-
-
-
- {{if not $file.IsRenamed}}
- {{$isImage := (call $.IsImageFile $file.Name)}}
- {{if and $isImage}}
-
-
-
- {{else}}
-
-
-
- {{range $j, $section := .Sections}}
- {{range $k, $line := .Lines}}
-
- {{if eq .Type 4}}
-
- {{if gt $j 0}}{{end}}
- |
- {{else}}
-
- {{if $line.LeftIdx}}{{$line.LeftIdx}}{{end}}
- |
-
- {{if $line.RightIdx}}{{$line.RightIdx}}{{end}}
- |
- {{end}}
-
- {{$line.Content}}
- |
-
- {{end}}
- {{end}}
-
-
-
- {{end}}
- {{end}}
-
-
-