projects

showcase

A public git mirror

log.html 1.5 KB · 28 lines Raw
{{define "content" -}}{{template "repohead" .}}{{- $r := .Repo}}{{- if .Days}}<p class="log-summary">{{template "icon" "history"}}Latest {{len .Commits}} of {{$r.Commits}} commits on <span class="chip chip--inline">{{$r.DefaultBranch}}</span></p>{{- range .Days}}<section class="log-group">  <h2 class="log-day">{{template "icon" "commit"}}{{.Title}}</h2>  <ol class="box rows">    {{- range .Commits}}{{$href := printf "/%s/commit/%s/" $r.Name .Hash}}    <li class="row commit-item">      {{template "who" (dict "R" $r "Name" .Author)}}      <div class="row-main">        <span class="row-title"><a href="{{$href}}">{{.Subject}}</a>{{if isnew .When}}<span class="badge badge--new">new</span>{{end}}</span>        <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>      </div>      {{- if or .Added .Deleted}}<span class="diffstat" title="{{.Added}} added, {{.Deleted}} removed"><span class="add">+{{.Added}}</span> <span class="del">&minus;{{.Deleted}}</span></span>{{end}}      {{- if eq .Hash $r.Head}}{{template "ci" (dict "S" $r.Status "Href" $href)}}{{end}}      {{template "sha" (dict "R" $r "Hash" .Hash "Href" $href)}}    </li>    {{- end}}  </ol></section>{{- end}}{{- else}}{{template "emptystate" (dict "Icon" "commit" "Title" "No commits yet." "Hint" "Nothing has been pushed to the default branch.")}}{{- end}}{{- end}}