1{{ define "title" }}{{.Repo}} — log{{ end }}
2{{ define "navextra" }}<a href="/{{.Repo}}">{{.Repo}}</a> <a href="/{{.Repo}}/log">log</a> <a href="/{{.Repo}}/tree">tree</a> <a href="/{{.Repo}}/issues">issues</a> <a href="/{{.Repo}}/stacks">stacks</a> <a href="/{{.Repo}}/wiki">wiki</a>{{ end }}
3{{ define "srv_repo_log.html" }}{{ template "head" . }}
4<div class="container">
5 <h1 class="repo-name">{{.Repo}} / log</h1>
6 <form method="get"
7 style="display:flex;
8 gap:8px;
9 margin-bottom:16px;
10 align-items:center">
11 <input name="where"
12 value="{{.WhereExpr}}"
13 placeholder='filter: author(alice) or draft()'
14 style="flex:1;
15 padding:6px 10px;
16 font-family:monospace;
17 font-size:13px;
18 background:#1e1e1e;
19 color:#ccc;
20 border:1px solid #444;
21 border-radius:4px;
22 outline:none">
23 <button type="submit"
24 style="padding:6px 14px;
25 background:#2a6;
26 color:#fff;
27 border:none;
28 border-radius:4px;
29 cursor:pointer;
30 font-size:13px">Filter</button>
31 {{ if .WhereExpr }}<a href="?where=" style="color:#888; font-size:12px; white-space:nowrap">✕ clear</a>{{ end }}
32 </form>
33 {{ if .WhereErr }}
34 <p style="color:#e55;
35 font-family:monospace;
36 font-size:12px;
37 margin:-8px 0 12px">parse error: {{.WhereErr}}</p>
38 {{ end }}
39 {{ if .AllBookmarks }}
40 <div style="display:flex;
41 flex-wrap:wrap;
42 gap:6px;
43 margin-bottom:14px;
44 align-items:center">
45 <span style="font-size:12px; color:#888">branch:</span>
46 {{ if .BookmarkFilter }}
47 <a href="?where={{.WhereExpr}}"
48 style="font-size:11px;
49 padding:2px 8px;
50 border-radius:3px;
51 border:1px solid #aaa;
52 color:#555;
53 background:transparent;
54 text-decoration:none">all</a>
55 {{ else }}
56 <a href="?where={{.WhereExpr}}"
57 style="font-size:11px;
58 padding:2px 8px;
59 border-radius:3px;
60 border:1px solid #aaa;
61 color:#fff;
62 background:#444;
63 text-decoration:none">all</a>
64 {{ end }}
65 {{ range .AllBookmarks }}
66 {{ if eq . $.BookmarkFilter }}
67 <a href="?bookmark={{.}}&where={{$.WhereExpr}}"
68 style="font-size:11px;
69 padding:2px 8px;
70 border-radius:3px;
71 border:1px solid #b0c0ff;
72 color:#fff;
73 background:#0645ad;
74 text-decoration:none">{{.}}</a>
75 {{ else }}
76 <a href="?bookmark={{.}}&where={{$.WhereExpr}}"
77 style="font-size:11px;
78 padding:2px 8px;
79 border-radius:3px;
80 border:1px solid #b0c0ff;
81 color:#0645ad;
82 background:transparent;
83 text-decoration:none">{{.}}</a>
84 {{ end }}
85 {{ end }}
86 </div>
87 {{ end }}
88 {{ if .WhereExpr }}
89 <p style="color:#888; font-size:12px; margin:-4px 0 10px">
90 Showing {{ len .Commits }} commit(s) matching <code style="color:#adf">{{.WhereExpr}}</code>
91 </p>
92 {{ end }}
93 {{ if .Commits }} {{ range .Commits }}
94 <div class="log-row phase-{{.PhaseClass}}">
95 <span class="log-sha"><a href="/{{$.Repo}}/commit?id={{.HexID}}">{{.ShortHex}}</a></span>
96 <span class="log-msg">
97 <a href="/{{$.Repo}}/commit?id={{.HexID}}">{{.Message}}</a>
98 {{ if .IsHead }}<span class="head-tag">HEAD</span>{{ end }} {{ range .Bookmarks }}<span class="bookmark-tag">{{.}}</span>{{ end }}
99 </span>
100 <span class="log-author">{{.Author}}</span>
101 <span class="log-date">{{.Date}}</span>
102 <span class="badge badge-{{.PhaseClass}}">{{.Phase}}</span>
103 </div>
104{{ end }} {{ else }}
105 <p style="color: #888; margin-top: 12px">
106 {{ if .WhereExpr }}No commits match this filter.{{ else }}No commits yet.{{ end }}
107 </p>
108 {{ end }}
109</div>
110{{ template "foot" . }}
111{{ end }}