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