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
0
fork
atom
overview
issues
pulls
pipelines
appview: repo/log: minor UI tweaks
oppi.li
10 months ago
0ab4aed1
1726c3b3
+17
-21
1 changed file
expand all
collapse all
unified
split
appview
pages
templates
repo
log.html
+17
-21
appview/pages/templates/repo/log.html
···
1
1
{{ define "title" }}commits · {{ .RepoInfo.FullName }}{{ end }}
2
2
+
2
3
{{ define "repoContent" }}
3
4
<section id="commit-table" class="overflow-x-auto">
4
5
<!-- desktop view (hidden on small screens) -->
5
6
<table class="w-full border-collapse hidden md:table">
6
6
-
<thead class="bg-gray-100 dark:bg-gray-700">
7
7
+
<thead>
7
8
<tr>
8
9
<th class="px-4 py-2 text-sm text-left text-gray-700 dark:text-gray-300 uppercase font-bold">Author</th>
9
10
<th class="px-4 py-2 text-sm text-left text-gray-700 dark:text-gray-300 uppercase font-bold">Commit</th>
···
38
37
</div>
39
38
</td>
40
39
<td class="px-4 py-3 align-top">
41
41
-
{{ if eq $index 0 }}
42
42
-
<a href="/{{ $.RepoInfo.FullName }}/commit/{{ $commit.Hash.String }}" class="dark:text-white no-underline hover:underline">
43
43
-
<p>{{ index $messageParts 0 }}</p>
44
44
-
{{ if gt (len $messageParts) 1 }}<p class="mt-1 text-sm text-gray-600 dark:text-gray-400">{{ nl2br (unwrapText (index $messageParts 1)) }}</p>{{ end }}
45
45
-
</a>
46
46
-
{{ else }}
47
47
-
<div>
48
48
-
<a href="/{{ $.RepoInfo.FullName }}/commit/{{ $commit.Hash.String }}" class="dark:text-white no-underline hover:underline">{{ index $messageParts 0 }}</a>
49
49
-
{{ if gt (len $messageParts) 1 }}
50
50
-
<button class="ml-2 py-1/2 px-1 bg-gray-200 hover:bg-gray-400 dark:bg-gray-700 dark:hover:bg-gray-600 rounded" hx-on:click="this.nextElementSibling.classList.toggle('hidden')">{{ i "ellipsis" "w-3 h-3" }}</button>
51
51
-
<p class="hidden mt-1 text-sm text-gray-600 dark:text-gray-400">{{ nl2br (index $messageParts 1) }}</p>
52
52
-
{{ end }}
53
53
-
</div>
54
54
-
{{ end }}
40
40
+
<div>
41
41
+
<a href="/{{ $.RepoInfo.FullName }}/commit/{{ $commit.Hash.String }}" class="dark:text-white no-underline hover:underline">{{ index $messageParts 0 }}</a>
42
42
+
{{ if gt (len $messageParts) 1 }}
43
43
+
<button class="ml-2 py-1/2 px-1 bg-gray-200 hover:bg-gray-400 dark:bg-gray-700 dark:hover:bg-gray-600 rounded" hx-on:click="this.nextElementSibling.classList.toggle('hidden')">{{ i "ellipsis" "w-3 h-3" }}</button>
44
44
+
<p class="hidden mt-1 text-sm text-gray-600 dark:text-gray-400">{{ nl2br (index $messageParts 1) }}</p>
45
45
+
{{ end }}
46
46
+
</div>
55
47
</td>
56
48
<td class="px-4 py-3 align-top text-gray-500 dark:text-gray-400">{{ timeFmt $commit.Author.When }}</td>
57
49
</tr>
···
86
92
{{ i "folder-code" "w-4 h-4" }}
87
93
</a>
88
94
</div>
89
89
-
90
95
</div>
91
96
</div>
92
97
</div>
···
113
120
</div>
114
121
</section>
115
122
116
116
-
{{ $commits_len := len .Commits }}
117
117
-
<div class="flex justify-end mt-4 gap-2">
118
118
-
{{ if gt .Page 1 }}<a class="btn flex items-center gap-2 no-underline hover:no-underline dark:text-white dark:hover:bg-gray-700" hx-boost="true" onclick="window.location.href = window.location.pathname + '?page={{ sub .Page 1 }}'">{{ i "chevron-left" "w-4 h-4" }} previous</a>{{ else }}<div></div>{{ end }}
119
119
-
{{ if eq $commits_len 60 }}<a class="btn flex items-center gap-2 no-underline hover:no-underline dark:text-white dark:hover:bg-gray-700" hx-boost="true" onclick="window.location.href = window.location.pathname + '?page={{ add .Page 1 }}'">next {{ i "chevron-right" "w-4 h-4" }}</a>{{ end }}
120
120
-
</div>
123
123
+
{{ end }}
124
124
+
125
125
+
{{ define "repoAfter" }}
126
126
+
{{ $commits_len := len .Commits }}
127
127
+
<div class="flex justify-end mt-4 gap-2">
128
128
+
{{ if gt .Page 1 }}<a class="btn flex items-center gap-2 no-underline hover:no-underline dark:text-white dark:hover:bg-gray-700" hx-boost="true" onclick="window.location.href = window.location.pathname + '?page={{ sub .Page 1 }}'">{{ i "chevron-left" "w-4 h-4" }} previous</a>{{ else }}<div></div>{{ end }}
129
129
+
{{ if eq $commits_len 60 }}<a class="btn flex items-center gap-2 no-underline hover:no-underline dark:text-white dark:hover:bg-gray-700" hx-boost="true" onclick="window.location.href = window.location.pathname + '?page={{ add .Page 1 }}'">next {{ i "chevron-right" "w-4 h-4" }}</a>{{ end }}
130
130
+
</div>
121
131
{{ end }}