···
{{ define "repoContent" }}
7
-
<div class="flex flex-col py-2">
7
+
<div class="flex flex-col py-2 gap-12 md:gap-0">
9
-
<div class="grid grid-cols-12 items-start">
10
-
<!-- Header column (left) -->
11
-
<div class="col-span-3 border-r border-gray-200 dark:border-gray-700 h-full text-right px-2 pb-6">
12
-
<a href="/{{ $.RepoInfo.FullName }}/tree/{{ .Name | urlquery }}" class="no-underline hover:underline flex items-center justify-end gap-2 font-bold">
13
-
{{ i "tag" "w-4 h-4" }}
16
-
<div class="flex flex-grow flex-col text-gray-500 dark:text-gray-400 text-sm">
9
+
<div class="md:grid md:grid-cols-12 md:items-start flex flex-col">
10
+
<!-- Header column (top on mobile, left on md+) -->
11
+
<div class="md:col-span-3 md:border-r border-b md:border-b-0 border-gray-200 dark:border-gray-700 w-full md:h-full">
12
+
<!-- Mobile layout: horizontal -->
13
+
<div class="flex md:hidden flex-col py-2 px-2">
14
+
<a href="/{{ $.RepoInfo.FullName }}/tree/{{ .Name | urlquery }}" class="no-underline hover:underline flex items-center gap-2 font-bold">
15
+
{{ i "tag" "w-4 h-4" }}
19
+
<div class="flex items-center gap-3 text-gray-500 dark:text-gray-400 text-sm">
21
+
<a href="/{{ $.RepoInfo.FullName }}/commit/{{ .Tag.Target.String }}"
22
+
class="no-underline hover:underline text-gray-500 dark:text-gray-400">
23
+
{{ slice .Tag.Target.String 0 8 }}
26
+
<span class="px-1 text-gray-500 dark:text-gray-400 select-none after:content-['·']"></span>
27
+
<span>{{ .Tag.Tagger.Name }}</span>
29
+
<span class="px-1 text-gray-500 dark:text-gray-400 select-none after:content-['·']"></span>
30
+
<time>{{ shortTimeFmt .Tag.Tagger.When }}</time>
35
+
<!-- Desktop layout: vertical and right-aligned -->
36
+
<div class="hidden md:block text-right px-2 pb-6">
37
+
<a href="/{{ $.RepoInfo.FullName }}/tree/{{ .Name | urlquery }}" class="no-underline hover:underline flex items-center justify-end gap-2 font-bold">
38
+
{{ i "tag" "w-4 h-4" }}
41
+
<div class="flex flex-grow flex-col text-gray-500 dark:text-gray-400 text-sm">
<a href="/{{ $.RepoInfo.FullName }}/commit/{{ .Tag.Target.String }}"
class="no-underline hover:underline text-gray-500 dark:text-gray-400 flex items-center justify-end gap-2">
{{ i "git-commit-horizontal" "w-4 h-4" }}
···
<span>{{ .Tag.Tagger.Name }}</span>
<time>{{ timeFmt .Tag.Tagger.When }}</time>
29
-
<!-- Paragraph column (right) -->
30
-
<div class="col-span-9 px-2 pb-6">
33
-
{{ $messageParts := splitN .Tag.Message "\n\n" 2 }}
34
-
<p class="font-bold">{{ index $messageParts 0 }}</p>
35
-
{{ if gt (len $messageParts) 1 }}
36
-
<p class="cursor-text pb-2 text-sm">{{ nl2br (index $messageParts 1) }}</p>
39
-
<p class="italic text-gray-500 dark:text-gray-400">no message</p>
55
+
<!-- Content column (bottom on mobile, right on md+) -->
56
+
<div class="md:col-span-9 px-2 py-3 md:py-0 md:pb-6">
58
+
{{ $messageParts := splitN .Tag.Message "\n\n" 2 }}
59
+
<p class="font-bold">{{ index $messageParts 0 }}</p>
60
+
{{ if gt (len $messageParts) 1 }}
61
+
<p class="cursor-text pb-2 text-sm">{{ nl2br (index $messageParts 1) }}</p>
64
+
<p class="italic text-gray-500 dark:text-gray-400">no message</p>