/
base.tmpl
82 lines (78 loc) 路 3.25 KB
/
base.tmpl
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
{{ define "base" }}
<!DOCTYPE html>
<html>
<head>
<link rel="apple-touch-icon" sizes="180x180" href="/static/img/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/static/img/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/static/img/favicon-16x16.png">
<link rel="manifest" href="/static/img/site.webmanifest">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{ block "title" .}} {{end}} :: Triage Party</title>
<link rel="stylesheet" href="/third_party/bulma/bulma.min.css">
<link rel="stylesheet" href="/third_party/fontawesome/css/all.min.css">
<link rel="stylesheet" href="/static/css/tparty.css?{{.Version}}">
{{ block "style" .}} {{end}}
<link rel="stylesheet" href="/static/css/custom.css?{{.Version}}">
</head>
<body>
<nav class="navbar" role="navigation" aria-label="main navigation">
<div class="navbar-brand">
<a class="navbar-item" href="/"><strong>{{ .SiteName }}</strong><img src="/static/img/favicon-32x32.png" alt="logo"></a>
</div>
{{- if ne (len .Categories) 0 }}
<div id="categoryNavbar" class="navbar-menu">
<div class="navbar-start">
{{- range .Categories }}
<a class="navbar-item {{ if eq $.Category . }}is-active{{ else }}is-inactive{{ end }}" href="/s/{{ . }}{{ $.GetVars }}">{{ . }}</a>
{{ end }}
</div>
</div>
{{ end }}
<div id="mainNavbar" class="navbar-menu">
<div class="navbar-start">
{{- range .Collections }}
{{- if and (not .Hidden) (eq .Category $.Category) }}
{{ if eq .Display "kanban" }}<a class="navbar-item {{ if eq $.ID .ID }}is-active{{ else }}is-inactive{{ end }}" href="/k/{{ .ID }}">{{ .Name }}</a>
{{ else }}<a class="navbar-item {{ if eq $.ID .ID }}is-active{{ else }}is-inactive{{ end }}" href="/s/{{ .ID }}{{ $.GetVars }}">{{ .Name }}</a>{{ end }}
{{ end }}
{{ end }}
</div>
<div class="navbar-end">
<div class="buttons">
{{ if .OpenStats }}
<a class="button is-white" title="Total PRs" href="/s/{{ .OpenStats.Collection.ID }}{{ $.GetVars }}">{{ .OpenStats.TotalPullRequests }} PRs</a>
<a class="button is-white" title="Total Issues" href="/s/{{ .OpenStats.Collection.ID }}{{ $.GetVars }}">{{ .OpenStats.TotalIssues }} issues</a>
<a class="button is-white" title="Average hold time" href="/s/{{ .OpenStats.Collection.ID }}{{ $.GetVars }}">{{ .OpenStats.AvgCurrentHold | toDays }} avg wait</a>
{{ end }}
</div>
</div>
</div>
</nav>
{{template "subnav" . }}
<section class="section">
<div class="tp-container">
{{- if ne .Notification "" }}
<div class="notification is-info">
<button class="delete"></button>
{{ .Notification }}
</div>
{{ end }}
{{- if ne .Warning "" }}
<div class="notification is-warning">
<button class="delete"></button>
{{ .Warning }}
</div>
{{ end }}
{{template "content" .}}
</div>
</section>
<section>
<div class="content has-text-right">
<a href="http://github.com/google/triage-party" title="{{.Status}}">Triage Party {{.Version}}</a>
</div>
</section>
</body>
{{block "js" .}}{{end}}
</html>
{{ end }}