gitcat
1{{define "content"}}
2{{$repo := .Data.Repo}}
3<header class="repo-head compact">
4 <div class="repo-title">
5 <span class="repo-icon lg" aria-hidden="true">
6 <svg viewBox="0 0 24 24" width="20" height="20" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M4 5.5A1.5 1.5 0 0 1 5.5 4H9l1.5 2H18a1.5 1.5 0 0 1 1.5 1.5v9A1.5 1.5 0 0 1 18 18H5.5A1.5 1.5 0 0 1 4 16.5z"/></svg>
7 </span>
8 <div><h1>{{$repo.Name}}</h1></div>
9 </div>
10</header>
11{{template "repotabs" (dict "Repo" $repo "Ref" .Data.Ref "Tab" "activity" "CanManage" .Data.CanManage "CommitCount" .Data.CommitCount "BranchCount" .Data.BranchCount)}}
12
13<div class="repo-grid">
14 <div class="repo-main">
15 <div class="section-head">
16 <h2>推送动态与 What's New</h2>
17 <span class="muted">谁在什么时候改了什么,都会记录在这里</span>
18 </div>
19 {{if .Data.Pushes}}
20 {{range .Data.Pushes}}{{template "pushbox" (dict "P" . "U" (index $.Data.PushActors .ActorUsername))}}{{end}}
21 {{else}}
22 <div class="card empty"><h3>还没有推送记录</h3><p class="muted">当成员推送第一个提交后,这里会自动出现更新说明。</p></div>
23 {{end}}
24 </div>
25 <aside class="repo-side">
26 {{with .Data.LatestPush}}
27 <div class="card whatsnew-card">
28 <div class="wn-head"><span class="whats-tag">最新 What's New</span></div>
29 <div class="md-body wn-body">{{if .WhatsNew}}{{md .WhatsNew}}{{else}}<span class="muted">生成中…</span>{{end}}</div>
30 </div>
31 {{end}}
32 <div class="card about">
33 <h3>仓库信息</h3>
34 <div class="stat-grid">
35 <div><strong>{{num .Data.CommitCount}}</strong><span>提交</span></div>
36 <div><strong>{{num .Data.BranchCount}}</strong><span>分支</span></div>
37 <div><strong>{{num .Data.TagCount}}</strong><span>标签</span></div>
38 <div><strong>{{.Data.SizeText}}</strong><span>体积</span></div>
39 </div>
40 <div class="clonebox side">
41 <span class="cloneurl">{{.Data.CloneURL}}</span>
42 <button class="btn btn-mini" type="button" data-copy="{{.Data.CloneURL}}">复制</button>
43 </div>
44 </div>
45 </aside>
46</div>
47{{end}}