···
{{ block "branchSelector" . }}{{ end }}
<div class="grid grid-cols-1 md:grid-cols-2 gap-2">
{{ block "fileTree" . }}{{ end }}
35
-
{{ block "commitLog" . }}{{ end }}
35
+
{{ block "rightInfo" . }}{{ end }}
···
76
-
href="/{{ .RepoInfo.FullName }}/commits/{{ .Ref | urlquery }}"
77
-
class="ml-2 no-underline flex items-center gap-2 text-sm uppercase font-bold dark:text-white"
79
-
{{ i "logs" "w-4 h-4" }}
81
-
{{ if eq .TotalCommits 1 }}commit{{ else }}commits{{ end }}
···
139
-
{{ define "commitLog" }}
140
-
<div id="commit-log" class="hidden md:block md:col-span-1">
141
-
{{ range .Commits }}
142
-
<div class="relative px-2 pb-8">
143
-
<div id="commit-message">
144
-
{{ $messageParts := splitN .Message "\n\n" 2 }}
145
-
<div class="text-base cursor-pointer">
131
+
{{ define "rightInfo" }}
132
+
<div id="right-info" class="col-span-1">
133
+
<div id="commit-log" class="md:col-span-1">
135
+
class="flex text-gray-500 dark:text-gray-400 items-center gap-2 pb-4 pl-2"
137
+
{{ i "logs" "w-4 h-4" }}
140
+
{{ range .CommitsTrunc }}
141
+
<div class="relative px-2 pb-8">
142
+
<div id="commit-message">
143
+
{{ $messageParts := splitN .Message "\n\n" 2 }}
144
+
<div class="text-base cursor-pointer">
149
-
href="/{{ $.RepoInfo.FullName }}/commit/{{ .Hash.String }}"
150
-
class="inline no-underline hover:underline dark:text-white"
151
-
>{{ index $messageParts 0 }}</a
148
+
href="/{{ $.RepoInfo.FullName }}/commit/{{ .Hash.String }}"
149
+
class="inline no-underline hover:underline dark:text-white"
150
+
>{{ index $messageParts 0 }}</a
152
+
{{ if gt (len $messageParts) 1 }}
155
+
class="py-1/2 px-1 bg-gray-200 hover:bg-gray-400 rounded dark:bg-gray-700 dark:hover:bg-gray-600"
156
+
hx-on:click="this.parentElement.nextElementSibling.classList.toggle('hidden')"
158
+
{{ i "ellipsis" "w-3 h-3" }}
{{ if gt (len $messageParts) 1 }}
156
-
class="py-1/2 px-1 bg-gray-200 hover:bg-gray-400 rounded dark:bg-gray-700 dark:hover:bg-gray-600"
157
-
hx-on:click="this.parentElement.nextElementSibling.classList.toggle('hidden')"
164
+
class="hidden mt-1 text-sm cursor-text pb-2 dark:text-gray-300"
159
-
{{ i "ellipsis" "w-3 h-3" }}
166
+
{{ nl2br (index $messageParts 1) }}
163
-
{{ if gt (len $messageParts) 1 }}
165
-
class="hidden mt-1 text-sm cursor-text pb-2 dark:text-gray-300"
167
-
{{ nl2br (index $messageParts 1) }}
174
-
<div class="text-xs text-gray-500 dark:text-gray-400">
175
-
<span class="font-mono">
177
-
href="/{{ $.RepoInfo.FullName }}/commit/{{ .Hash.String }}"
178
-
class="text-gray-500 dark:text-gray-400 no-underline hover:underline"
179
-
>{{ slice .Hash.String 0 8 }}</a></span>
181
-
class="mx-2 before:content-['·'] before:select-none"
184
-
{{ $didOrHandle := index $.EmailToDidOrHandle .Author.Email }}
186
-
href="{{ if $didOrHandle }}
187
-
/{{ $didOrHandle }}
189
-
mailto:{{ .Author.Email }}
191
-
class="text-gray-500 dark:text-gray-400 no-underline hover:underline"
192
-
>{{ if $didOrHandle }}
173
+
<div class="text-xs text-gray-500 dark:text-gray-400">
174
+
<span class="font-mono">
176
+
href="/{{ $.RepoInfo.FullName }}/commit/{{ .Hash.String }}"
177
+
class="text-gray-500 dark:text-gray-400 no-underline hover:underline"
178
+
>{{ slice .Hash.String 0 8 }}</a
200
-
class="inline-block px-1 select-none after:content-['·']"
202
-
<span>{{ timeFmt .Author.When }}</span>
203
-
{{ $tagsForCommit := index $.TagMap .Hash.String }}
204
-
{{ if gt (len $tagsForCommit) 0 }}
182
+
class="mx-2 before:content-['·'] before:select-none"
185
+
{{ $didOrHandle := index $.EmailToDidOrHandle .Author.Email }}
187
+
href="{{ if $didOrHandle }}
188
+
/{{ $didOrHandle }}
190
+
mailto:{{ .Author.Email }}
192
+
class="text-gray-500 dark:text-gray-400 no-underline hover:underline"
193
+
>{{ if $didOrHandle }}
class="inline-block px-1 select-none after:content-['·']"
209
-
{{ range $tagsForCommit }}
211
-
class="text-xs rounded bg-gray-100 dark:bg-gray-700 text-black dark:text-white font-mono px-2 mx-1/2 inline-flex items-center"
203
+
<span>{{ timeFmt .Author.When }}</span>
204
+
{{ $tagsForCommit := index $.TagMap .Hash.String }}
205
+
{{ if gt (len $tagsForCommit) 0 }}
207
+
class="inline-block px-1 select-none after:content-['·']"
210
+
{{ range $tagsForCommit }}
212
+
class="text-xs rounded bg-gray-100 dark:bg-gray-700 text-black dark:text-white font-mono px-2 mx-1/2 inline-flex items-center"
220
+
{{ $more := sub .TotalCommits (len .CommitsTrunc) }}
221
+
{{ if gt $more 0 }}
223
+
class="flex text-gray-500 dark:text-gray-400 mb-2 gap-1 justify-end items-center"
226
+
href="/{{ .RepoInfo.FullName }}/commits/{{ .Ref | urlquery }}"
227
+
class="text-gray-500 dark:text-gray-400 text-sm"
229
+
… and {{ $more }} more
231
+
{{ i "arrow-right" "w-3 h-3" }}
235
+
{{ if gt (len .Tags) 0 }}
238
+
class="md:col-span-1 pt-4 border-t border-gray-200 dark:border-gray-700"
241
+
class="flex text-gray-500 dark:text-gray-400 items-center gap-2 pb-4 pl-2"
243
+
{{ i "tags" "w-4 h-4" }}
247
+
<div class="relative px-2 pb-4">
248
+
<div class="text-base">
251
+
href="/{{ $.RepoInfo.FullName }}/tree/{{ .Reference.Name | urlquery }}"
252
+
class="inline no-underline hover:underline dark:text-white"
253
+
>{{ .Reference.Name }}</a
255
+
{{ if gt (len .Message) 0 }}
256
+
{{ $messageParts := splitN .Message "\n\n" 2 }}
257
+
{{ $title := index $messageParts 0 }}
258
+
{{ $description := index $messageParts 1 }}
260
+
class="text-sm text-gray-500 dark:text-gray-400 ml-2 truncate inline-block align-middle"
261
+
>{{ $title }}</span
263
+
{{ if gt (len $description) 1 }}
265
+
class="py-1/2 px-1 bg-gray-200 hover:bg-gray-400 rounded dark:bg-gray-700 dark:hover:bg-gray-600"
266
+
hx-on:click="this.parentElement.nextElementSibling.classList.toggle('hidden')"
268
+
{{ i "ellipsis" "w-3 h-3" }}
273
+
{{ if gt (len .Message) 0 }}
274
+
{{ $messageParts := splitN .Message "\n\n" 2 }}
275
+
{{ $description := index $messageParts 1 }}
276
+
{{ if gt (len $description) 1 }}
278
+
class="hidden mt-1 text-sm cursor-text pb-2 dark:text-gray-300"
280
+
{{ $description | markdown }}
285
+
class="text-xs text-gray-500 dark:text-gray-400"
287
+
<span class="font-mono">
289
+
href="/{{ $.RepoInfo.FullName }}/commit/{{ .Reference.Hash }}"
290
+
class="text-gray-500 dark:text-gray-400 no-underline hover:underline"
291
+
>{{ slice .Reference.Hash 0 8 }}</a
296
+
class="inline-block px-1 select-none after:content-['·']"
298
+
<time>{{ timeFmt .Tagger.When }}</time>
···
312
+
class="mt-4 bg-white text-gray-600 dark:text-gray-400
313
+
px-6 py-3 prose dark:prose-invert
314
+
border-gray-200 dark:border-gray-700
315
+
text-sm border-b rounded-tl rounded-tr"
317
+
{{ .ReadmeFileName }}
225
-
class="mt-4 p-6 rounded bg-white dark:bg-gray-800 dark:text-white w-full mx-auto overflow-auto {{ if not .Raw }}
320
+
class="p-6 rounded-br rounded-bl bg-white dark:bg-gray-800 dark:text-white w-full mx-auto overflow-auto {{ if not .Raw }}
prose dark:prose-invert dark:[&_pre]:bg-gray-900
dark:[&_code]:text-gray-300 dark:[&_pre_code]:bg-gray-900
dark:[&_pre]:border dark:[&_pre]:border-gray-700