tangled
alpha
login
or
join now
zan.dev
/
core
forked from
tangled.org/core
Monorepo for Tangled — https://tangled.org
0
fork
atom
overview
issues
pulls
pipelines
add next/prev links to commits
oppi.li
11 months 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">
···
91
93
</div>
92
94
93
95
<div id="right-side-items" class="p-2">
94
94
-
<a href="#file-{{ .Name.New }}" class="no-underline hover:underline">to top of file</a>
96
96
+
<a href="#file-{{ .Name.New }}" class="no-underline hover:underline">top of file</a>
97
97
+
98
98
+
{{ if gt $idx 0 }}
99
99
+
·
100
100
+
{{ $prev := index $diff (sub $idx 1) }}
101
101
+
<a href="#file-{{ $prev.Name.New }}" class="no-underline hover:underline">prev</a>
102
102
+
{{ end }}
103
103
+
104
104
+
105
105
+
{{ if lt $idx $last }}
106
106
+
·
107
107
+
{{ $next := index $diff (add $idx 1) }}
108
108
+
<a href="#file-{{ $next.Name.New }}" class="no-underline hover:underline">next</a>
109
109
+
{{ end }}
95
110
</div>
96
111
97
112
</div>
···
127
142
</div>
128
143
</div>
129
144
</section>
145
145
+
{{ end }}
130
146
{{ end }}
131
147
132
148
{{end}}