Skip to content

Commit 49eb8e6

Browse files
committed
Add template for graph
1 parent 9e97946 commit 49eb8e6

File tree

2 files changed

+58
-2
lines changed

2 files changed

+58
-2
lines changed

templates/repo/commits.tmpl

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,20 @@
22
<div class="repository commits">
33
{{template "repo/header" .}}
44
<div class="ui container">
5-
{{template "repo/branch_dropdown" .}}
6-
{{template "repo/commits_table" .}}
5+
<div class="ui secondary menu">
6+
{{template "repo/branch_dropdown" .}}
7+
<div class="fitted item">
8+
<div class="ui breadcrumb">
9+
<a href="{{.RepoLink}}/graph">
10+
<span class="text">
11+
<i class="octicon octicon-git-branch"></i>
12+
</span>
13+
commit graph
14+
</a>
15+
</div>
16+
</div>
17+
</div>
18+
{{template "repo/commits_table" .}}
719
</div>
820
</div>
921
{{template "base/footer" .}}

templates/repo/graph.tmpl

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{{template "base/head" .}}
2+
<div class="repository commits">
3+
{{template "repo/header" .}}
4+
<div class="ui container">
5+
6+
7+
<div id="git-graph-container">
8+
<div id="rel-container">
9+
<canvas id="graph-canvas">
10+
<ul id="graph-raw-list">
11+
{{ range .Graph }}
12+
<li><span class="node-relation">{{ .GraphAcii -}}</span></li>
13+
{{ end }}
14+
</ul>
15+
</canvas>
16+
</div>
17+
<div id="rev-container">
18+
<ul id="rev-list">
19+
{{ range .Graph }}
20+
<li>
21+
{{ if .OnlyRelation }}
22+
<span />
23+
{{ else }}
24+
<code id="{{.ShortRev}}">
25+
<a href="{{AppSubUrl}}/{{$.Username}}/{{$.Reponame}}/commit/{{.Rev}}">{{ .ShortRev}}</a>
26+
</code>
27+
<strong> {{.Branch}}</strong>
28+
<em>{{.Subject}}</em> by
29+
<span class="author">
30+
{{.Author}}
31+
</span>
32+
<span class="time">{{.Date}}</span>
33+
{{ end }}
34+
</li>
35+
{{ end }}
36+
</ul>
37+
</div>
38+
</div>
39+
40+
41+
42+
</div>
43+
</div>
44+
{{template "base/footer" .}}

0 commit comments

Comments
 (0)