master
 1{{- /*gotype: github.com/antonmedv/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
10      .branch-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      .branch-row:last-child {
21        border-bottom: none;
22      }
23
24      .branch-row a {
25        color: var(--c-text-1);
26      }
27
28      .branch-row a:hover {
29        color: var(--c-brand-2);
30        text-decoration: none;
31      }
32
33      .badge {
34        font-size: 12px;
35        color: var(--c-text-2);
36        border: 1px solid var(--c-border);
37        padding: 2px 6px;
38        border-radius: 999px;
39      }
40    </style>
41{{ end }}
42
43{{ define "body" }}
44    <h1>Branches</h1>
45    <div class="branches">
46        {{ if .Branches }}
47            {{ range .Branches }}
48                <div class="branch-row">
49                    <a href="{{ .Href }}">{{ .Name }}</a>
50                    {{ if .IsDefault }}<span class="badge">default</span>{{ end }}
51                    <a href="{{ .CommitsHref }}" style="margin-left:auto; font-size:13px; color: var(--c-text-2)">commits →</a>
52                </div>
53            {{ end }}
54        {{ else }}
55            <div class="branch-row">(no branches)</div>
56        {{ end }}
57    </div>
58{{ end }}