+7
-5
appview/pages/templates/fragments/diff.html
+7
-5
appview/pages/templates/fragments/diff.html
···
17
<details open>
18
<summary class="list-none cursor-pointer sticky top-0">
19
<div id="diff-file-header" class="rounded cursor-pointer bg-white dark:bg-gray-800 flex justify-between">
20
-
<div id="left-side-items" class="p-2 flex gap-2 items-center">
21
{{ $markerstyle := "diff-type p-1 mr-1 font-mono text-sm rounded select-none" }}
22
23
{{ if .IsNew }}
24
<span class="bg-green-100 text-green-700 dark:bg-green-800/50 dark:text-green-400 {{ $markerstyle }}">ADDED</span>
25
{{ else if .IsDelete }}
···
33
{{ end }}
34
35
{{ if .IsDelete }}
36
-
<a class="dark:text-white" {{if $this }}href="/{{ $repo }}/blob/{{ $this }}/{{ .Name.Old }}"{{end}}>
37
{{ .Name.Old }}
38
</a>
39
{{ else if (or .IsCopy .IsRename) }}
40
-
<a class="dark:text-white" {{if $parent}}href="/{{ $repo }}/blob/{{ $parent }}/{{ .Name.Old }}"{{end}}>
41
{{ .Name.Old }}
42
</a>
43
{{ i "arrow-right" "w-4 h-4" }}
44
-
<a class="dark:text-white" {{if $this}}href="/{{ $repo }}/blob/{{ $this }}/{{ .Name.New }}"{{end}}>
45
{{ .Name.New }}
46
</a>
47
{{ else }}
48
-
<a class="dark:text-white" {{if $this}}href="/{{ $repo }}/blob/{{ $this }}/{{ .Name.New }}"{{end}}>
49
{{ .Name.New }}
50
</a>
51
{{ end }}
52
</div>
53
54
{{ $iconstyle := "p-1 mx-1 hover:bg-gray-100 dark:hover:bg-gray-700 rounded" }}
···
17
<details open>
18
<summary class="list-none cursor-pointer sticky top-0">
19
<div id="diff-file-header" class="rounded cursor-pointer bg-white dark:bg-gray-800 flex justify-between">
20
+
<div id="left-side-items" class="p-2 flex gap-2 items-center overflow-x-auto" style="direction: rtl;">
21
{{ $markerstyle := "diff-type p-1 mr-1 font-mono text-sm rounded select-none" }}
22
23
+
<div class="flex gap-2 items-center" style="direction: ltr;">
24
{{ if .IsNew }}
25
<span class="bg-green-100 text-green-700 dark:bg-green-800/50 dark:text-green-400 {{ $markerstyle }}">ADDED</span>
26
{{ else if .IsDelete }}
···
34
{{ end }}
35
36
{{ if .IsDelete }}
37
+
<a class="dark:text-white whitespace-nowrap overflow-x-auto" {{if $this }}href="/{{ $repo }}/blob/{{ $this }}/{{ .Name.Old }}"{{end}}>
38
{{ .Name.Old }}
39
</a>
40
{{ else if (or .IsCopy .IsRename) }}
41
+
<a class="dark:text-white whitespace-nowrap overflow-x-auto" {{if $parent}}href="/{{ $repo }}/blob/{{ $parent }}/{{ .Name.Old }}"{{end}}>
42
{{ .Name.Old }}
43
</a>
44
{{ i "arrow-right" "w-4 h-4" }}
45
+
<a class="dark:text-white whitespace-nowrap overflow-x-auto" {{if $this}}href="/{{ $repo }}/blob/{{ $this }}/{{ .Name.New }}"{{end}}>
46
{{ .Name.New }}
47
</a>
48
{{ else }}
49
+
<a class="dark:text-white whitespace-nowrap overflow-x-auto" {{if $this}}href="/{{ $repo }}/blob/{{ $this }}/{{ .Name.New }}"{{end}}>
50
{{ .Name.New }}
51
</a>
52
{{ end }}
53
+
</div>
54
</div>
55
56
{{ $iconstyle := "p-1 mx-1 hover:bg-gray-100 dark:hover:bg-gray-700 rounded" }}
+10
-8
appview/pages/templates/repo/commit.html
+10
-8
appview/pages/templates/repo/commit.html
···
46
<div class="diff-stat">
47
<br>
48
<strong class="text-sm uppercase mb-4 dark:text-gray-200">Changed files</strong>
49
-
{{ range $diff }}
50
-
<ul class="dark:text-gray-200">
51
-
{{ if .IsDelete }}
52
-
<li><a href="#file-{{ .Name.Old }}" class="dark:hover:text-gray-300">{{ .Name.Old }}</a></li>
53
-
{{ else }}
54
-
<li><a href="#file-{{ .Name.New }}" class="dark:hover:text-gray-300">{{ .Name.New }}</a></li>
55
{{ end }}
56
-
</ul>
57
-
{{ end }}
58
</div>
59
</section>
60
···
46
<div class="diff-stat">
47
<br>
48
<strong class="text-sm uppercase mb-4 dark:text-gray-200">Changed files</strong>
49
+
<div class="overflow-x-auto">
50
+
{{ range $diff }}
51
+
<ul class="dark:text-gray-200">
52
+
{{ if .IsDelete }}
53
+
<li><a href="#file-{{ .Name.Old }}" class="dark:hover:text-gray-300">{{ .Name.Old }}</a></li>
54
+
{{ else }}
55
+
<li><a href="#file-{{ .Name.New }}" class="dark:hover:text-gray-300">{{ .Name.New }}</a></li>
56
+
{{ end }}
57
+
</ul>
58
{{ end }}
59
+
</div>
60
</div>
61
</section>
62