main
1{{- /*gotype: mokhan.ca/xlgmokha/gitmal/pkg/templates.BranchesParams*/ -}}
2{{- define "head" -}}
3<style>
4 .branches {
5 border: 1px solid var(--c-border);
6 border-radius: var(--border-radius);
7 overflow: hidden;
8 }
9 .branch-row {
10 display: flex;
11 align-items: center;
12 gap: 12px;
13 height: 44px;
14 padding-inline: 16px;
15 border-bottom: 1px solid var(--c-border);
16 background-color: var(--c-bg-elv);
17 }
18 .branch-row:last-child {
19 border-bottom: none;
20 }
21 .branch-row a {
22 color: var(--c-text-1);
23 }
24 .branch-row a:hover {
25 color: var(--c-brand-2);
26 text-decoration: none;
27 }
28 .badge {
29 font-size: 12px;
30 color: var(--c-text-2);
31 border: 1px solid var(--c-border);
32 padding: 2px 6px;
33 border-radius: 999px;
34 }
35</style>
36{{- end}}
37
38{{- define "body" -}}
39<h1>Branches</h1>
40<div class="branches">
41{{- if .Branches}}
42{{- range .Branches}}
43 <div class="branch-row">
44 <a href="{{.Href}}">{{.Name}}</a>
45{{- if .IsDefault}}
46 <span class="badge">default</span>
47{{- end}}
48 <a href="{{.CommitsHref}}" class="branch-commits-link">commits →</a>
49 </div>
50{{- end}}
51{{- else}}
52 <div class="branch-row">(no branches)</div>
53{{- end}}
54</div>
55{{- end}}