tangled
alpha
login
or
join now
tjh.dev
/
test
forked from
tangled.org/core
0
fork
atom
Mirror of @tangled.org/core. Running on a Raspberry Pi Zero 2 (Please be gentle).
0
fork
atom
overview
issues
pulls
pipelines
add next/prev links to commits
oppi.li
1 year ago
c61ec548
a2c04f40
+18
-2
1 changed file
expand all
collapse all
unified
split
appview
pages
templates
repo
commit.html
+18
-2
appview/pages/templates/repo/commit.html
···
61
61
{{ $this := $commit.This }}
62
62
{{ $parent := $commit.Parent }}
63
63
64
64
-
{{ range $diff }}
64
64
+
{{ $last := sub (len $diff) 1 }}
65
65
+
{{ range $idx, $hunk := $diff }}
66
66
+
{{ with $hunk }}
65
67
<section class="mt-4 border border-black w-full mx-auto">
66
68
<div id="file-{{ .Name.New }}">
67
69
<div id="diff-file">
···
93
91
</div>
94
92
95
93
<div id="right-side-items" class="p-2">
96
96
-
<a href="#file-{{ .Name.New }}" class="no-underline hover:underline">to top of file</a>
94
94
+
<a href="#file-{{ .Name.New }}" class="no-underline hover:underline">top of file</a>
95
95
+
96
96
+
{{ if gt $idx 0 }}
97
97
+
·
98
98
+
{{ $prev := index $diff (sub $idx 1) }}
99
99
+
<a href="#file-{{ $prev.Name.New }}" class="no-underline hover:underline">prev</a>
100
100
+
{{ end }}
101
101
+
102
102
+
103
103
+
{{ if lt $idx $last }}
104
104
+
·
105
105
+
{{ $next := index $diff (add $idx 1) }}
106
106
+
<a href="#file-{{ $next.Name.New }}" class="no-underline hover:underline">next</a>
107
107
+
{{ end }}
97
108
</div>
98
109
99
110
</div>
···
142
127
</div>
143
128
</div>
144
129
</section>
130
130
+
{{ end }}
145
131
{{ end }}
146
132
147
133
{{end}}