showcase
- v0.2.4
- 37 commits
- 1 branch
- 6 tags
- updated
- CI 2/2
log.html
1.5 KB · 28 lines
1{{define "content" -}}2{{template "repohead" .}}3{{- $r := .Repo}}4{{- if .Days}}5<p class="log-summary">{{template "icon" "history"}}Latest {{len .Commits}} of {{$r.Commits}} commits on <span class="chip chip--inline">{{$r.DefaultBranch}}</span></p>6{{- range .Days}}7<section class="log-group">8 <h2 class="log-day">{{template "icon" "commit"}}{{.Title}}</h2>9 <ol class="box rows">10 {{- range .Commits}}{{$href := printf "/%s/commit/%s/" $r.Name .Hash}}11 <li class="row commit-item">12 {{template "who" (dict "R" $r "Name" .Author)}}13 <div class="row-main">14 <span class="row-title"><a href="{{$href}}">{{.Subject}}</a>{{if isnew .When}}<span class="badge badge--new">new</span>{{end}}</span>15 <span class="row-sub">{{.Author}} committed <time class="{{fresh .When}}" datetime="{{.When.Format "2006-01-02T15:04:05Z07:00"}}" title="{{.When.Format "2006-01-02 15:04 MST"}}">{{ago .When}}</time></span>16 </div>17 {{- if or .Added .Deleted}}<span class="diffstat" title="{{.Added}} added, {{.Deleted}} removed"><span class="add">+{{.Added}}</span> <span class="del">−{{.Deleted}}</span></span>{{end}}18 {{- if eq .Hash $r.Head}}{{template "ci" (dict "S" $r.Status "Href" $href)}}{{end}}19 {{template "sha" (dict "R" $r "Hash" .Hash "Href" $href)}}20 </li>21 {{- end}}22 </ol>23</section>24{{- end}}25{{- else}}26{{template "emptystate" (dict "Icon" "commit" "Title" "No commits yet." "Hint" "Nothing has been pushed to the default branch.")}}27{{- end}}28{{- end}}