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
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{.Title}}</title>
<link rel="stylesheet" href="/static/css/style.css">
{{if .ChromaCSS}}<style>{{.ChromaCSS}}</style>{{end}}
</head>
<body>
<nav class="topnav">
<a class="logo" href="/">alt<em>git</em></a>
{{if .Repo}}
<div class="branch-wrap" id="branchWrap">
<div class="branch-btn" onclick="toggleBranch()">
<span class="branch-icon">⎇</span>
<span>{{.Branch}}</span>
<span class="arrow">▾</span>
</div>
<div class="branch-dropdown">
<div class="branch-dropdown-header">Branches</div>
{{range .Branches}}
<a href="{{.URL}}" class="{{if .Active}}active{{end}}">
<span class="bi">{{if .Active}}●{{else}}○{{end}}</span>{{.Name}}
</a>
{{end}}
</div>
</div>
{{end}}
<div class="breadcrumb">{{.Breadcrumb}}</div>
</nav>
{{if .Repo}}
<nav class="subnav">
<a href="/{{.Repo}}/refs?branch={{.Branch}}" class="{{if eq .ActiveTab "refs"}}active{{end}}"><span class="icon">🏷</span> Refs</a>
<a href="/{{.Repo}}/log?branch={{.Branch}}" class="{{if eq .ActiveTab "log"}}active{{end}}"><span class="icon">📋</span> Log</a>
<a href="/{{.Repo}}/?branch={{.Branch}}" class="{{if eq .ActiveTab "files"}}active{{end}}"><span class="icon">📁</span> Files</a>
</nav>
{{end}}
<main>{{.Body}}</main>
<footer class="git-footer">
<span class="footer-label">git</span>
<span class="footer-cmd"><span class="git-kw">git</span> {{.GitCmd}}</span>
<button class="copy-btn" onclick="copyCmd(this)" data-cmd="git {{.GitCmd}}">copy</button>
</footer>
<script src="/static/js/branch.js" ></script>
</body>
</html>
|