scripts/
static/
templates/
commit.html
2.0 KiB
discussion.html
1.7 KiB
discussion_new.html
801 B
discussions.html
959 B
error.html
266 B
home.html
2.8 KiB
index.html
506 B
layout.html
3.4 KiB
log.html
1.4 KiB
login.html
1.7 KiB
refs.html
1.2 KiB
.gitignore
30 B
.gitsigners
112 B
AGENTS.md
7.5 KiB
LICENSE
89 B
README.md
1.9 KiB
deploy
723 B
discuss.go
16.7 KiB
git.go
3.5 KiB
git_cli.go
16.0 KiB
git_http.go
1.9 KiB
go.mod
572 B
go.sum
1.9 KiB
handler.go
11.3 KiB
handler_test.go
69.0 KiB
main.go
5.2 KiB
template.go
8.9 KiB
watch
272 B
templates/commit.html
raw
| 1 | {{define "content"}} |
| 2 | <div class="commit-info"> |
| 3 | <div class="commit-title"> |
| 4 | <p class="subject">{{.Data.Commit.Subject}}</p> |
| 5 | <code class="commit-hash">{{.Data.Commit.Hash}}</code> |
| 6 | </div> |
| 7 | {{if .Data.Commit.Body}}<pre class="body">{{.Data.Commit.Body}}</pre>{{end}} |
| 8 | <div class="commit-subtitle"> |
| 9 | <span class="commit-meta">{{.Data.Commit.Author}} committed {{timeAgo .Data.Commit.AuthorDate}} ago</span> |
| 10 | {{if .Data.Commit.Parents}}<span class="commit-parents">{{len .Data.Commit.Parents}} parent{{if ne (len .Data.Commit.Parents) 1}}s{{end}} {{range $i, $p := .Data.Commit.Parents}}{{if $i}} {{end}}<a href="{{$.BaseURL}}/{{$.Repo}}/commit/{{$p}}"><code>{{shortHash $p}}</code></a>{{end}}</span>{{end}} |
| 11 | </div> |
| 12 | </div> |
| 13 | |
| 14 | {{range $file := .Data.Files}} |
| 15 | <div class="diff-file"> |
| 16 | <div class="diff-header"> |
| 17 | {{if eq .Status "R"}} |
| 18 | <span>{{.OldName}} → {{.NewName}}</span> |
| 19 | {{else}} |
| 20 | <span>{{diffFileName .}}</span> |
| 21 | {{end}} |
| 22 | {{if ne .Status "M"}}<span class="status status-{{.Status}}">{{statusLabel .Status}}</span>{{end}} |
| 23 | <span class="diff-header-stats"><span class="add">+{{.Stats.Added}}</span> <span class="del">-{{.Stats.Deleted}}</span> {{diffBar .Stats.Added .Stats.Deleted}}</span> |
| 24 | </div> |
| 25 | {{if .IsBinary}} |
| 26 | <p class="empty">Binary file changed.</p> |
| 27 | {{else}} |
| 28 | {{range $i, $hunk := .Hunks}} |
| 29 | {{if $i}}<div class="diff-sep"></div>{{end}} |
| 30 | <table class="diff-hunk"> |
| 31 | <tbody> |
| 32 | {{range .Lines}} |
| 33 | <tr class="diff-line diff-{{.Type}}"> |
| 34 | <td class="diff-num">{{if .OldNum}}{{.OldNum}}{{end}}</td> |
| 35 | <td class="diff-num">{{if .NewNum}}{{.NewNum}}{{end}}</td> |
| 36 | <td class="diff-marker">{{if eq .Type "add"}}+{{else if eq .Type "del"}}-{{else}} {{end}}</td> |
| 37 | <td class="line-code"><pre{{with langClass (diffFileName $file)}} class="{{.}}"{{end}}>{{.Content}}</pre></td> |
| 38 | </tr> |
| 39 | {{end}} |
| 40 | </tbody> |
| 41 | </table> |
| 42 | {{end}} |
| 43 | {{end}} |
| 44 | </div> |
| 45 | {{end}} |
| 46 | {{if .Data.TruncatedFiles}} |
| 47 | <p class="empty">{{.Data.TruncatedFiles}} more file{{if ne .Data.TruncatedFiles 1}}s{{end}} not shown.</p> |
| 48 | {{end}} |
| 49 | {{end}} |