master
 1{{- /*gotype: github.com/antonmedv/gitmal/pkg/templates.TagsParams*/ -}}
 2{{ define "head" }}
 3    <style>
 4      .tags {
 5        border: 1px solid var(--c-border);
 6        border-radius: var(--border-radius);
 7        overflow: hidden;
 8      }
 9
10      .tag-row {
11        display: flex;
12        align-items: center;
13        gap: 12px;
14        height: 44px;
15        padding-inline: 16px;
16        border-bottom: 1px solid var(--c-border);
17        background-color: var(--c-bg-elv);
18      }
19
20      .tag-row:last-child {
21        border-bottom: none;
22      }
23
24      .cell {
25        display: flex;
26        gap: 8px;
27        align-items: center;
28      }
29
30      .tag-title {
31        flex: 1;
32      }
33
34      .tag-row a {
35        color: var(--c-text-1);
36      }
37
38      .tag-row a:hover {
39        color: var(--c-brand-2);
40        text-decoration: none;
41      }
42
43      .date {
44        font-family: var(--font-family-mono), monospace;
45        font-size: 12px;
46        color: var(--c-text-2);
47      }
48
49      .hash a {
50        font-family: var(--font-family-mono), monospace;
51        color: var(--c-text-2);
52      }
53    </style>
54{{ end }}
55
56{{ define "body" }}
57    <h1>Tags</h1>
58    <div class="tags">
59        {{ if .Tags }}
60            {{ range .Tags }}
61                <div class="tag-row">
62                    <div class="cell tag-title"><a href="commit/{{ .CommitHash }}.html">{{ .Name }}</a></div>
63                    <div class="cell date">{{ .Date | FormatDate }}</div>
64                    <div class="cell hash"><a href="commit/{{ .CommitHash }}.html">{{ ShortHash .CommitHash }}</a></div>
65                </div>
66            {{ end }}
67        {{ else }}
68            <div class="tag-row">(no tags)</div>
69        {{ end }}
70    </div>
71{{ end }}