Skip to content

Commit

Permalink
Add template for graph
Browse files Browse the repository at this point in the history
  • Loading branch information
kjellkvinge committed Dec 28, 2016
1 parent 9e97946 commit 49eb8e6
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 2 deletions.
16 changes: 14 additions & 2 deletions templates/repo/commits.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,20 @@
<div class="repository commits">
{{template "repo/header" .}}
<div class="ui container">
{{template "repo/branch_dropdown" .}}
{{template "repo/commits_table" .}}
<div class="ui secondary menu">
{{template "repo/branch_dropdown" .}}
<div class="fitted item">
<div class="ui breadcrumb">
<a href="{{.RepoLink}}/graph">
<span class="text">
<i class="octicon octicon-git-branch"></i>
</span>
commit graph
</a>
</div>
</div>
</div>
{{template "repo/commits_table" .}}
</div>
</div>
{{template "base/footer" .}}
44 changes: 44 additions & 0 deletions templates/repo/graph.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{{template "base/head" .}}
<div class="repository commits">
{{template "repo/header" .}}
<div class="ui container">


<div id="git-graph-container">
<div id="rel-container">
<canvas id="graph-canvas">
<ul id="graph-raw-list">
{{ range .Graph }}
<li><span class="node-relation">{{ .GraphAcii -}}</span></li>
{{ end }}
</ul>
</canvas>
</div>
<div id="rev-container">
<ul id="rev-list">
{{ range .Graph }}
<li>
{{ if .OnlyRelation }}
<span />
{{ else }}
<code id="{{.ShortRev}}">
<a href="{{AppSubUrl}}/{{$.Username}}/{{$.Reponame}}/commit/{{.Rev}}">{{ .ShortRev}}</a>
</code>
<strong> {{.Branch}}</strong>
<em>{{.Subject}}</em> by
<span class="author">
{{.Author}}
</span>
<span class="time">{{.Date}}</span>
{{ end }}
</li>
{{ end }}
</ul>
</div>
</div>



</div>
</div>
{{template "base/footer" .}}

0 comments on commit 49eb8e6

Please sign in to comment.