8356
Wx
www-xonecas-io / files
www-xonecas-io / internal / site / templates / commits.html
1.6 KB
1{{define "commits.html"}}{{template "head" (list (printf "%s commits" .Name) (printf "The commit history of %s, a project by xonecas." .Name))}}{{template "nav" (dict "Here" "Projects")}} 2<main class="px-4 sm:px-8 py-6 max-w-[1440px] mx-auto"> 3 {{template "project-head" (dict "Row" .Row "Here" "commits")}} 4 <p class="text-sm text-soft mb-3">{{.Total}} commits on every branch and tag, newest first{{if gt .Pages 1}} · page {{.Page}} of {{.Pages}}{{end}}</p> 5 <ol class="@container border-t border-line">{{range .Commits}} 6 <li class="grid grid-cols-[4.5rem_minmax(0,1fr)] @xl:grid-cols-[4.5rem_minmax(0,1fr)_11rem_6rem] gap-x-3 items-baseline py-1.5 border-b border-line text-[14.5px]"> 7 <a href="/projects/{{$.Name}}/commit/{{.Hash}}/" class="font-mono text-[12.5px] text-accent no-underline hover:underline">{{.Short}}</a> 8 <a href="/projects/{{$.Name}}/commit/{{.Hash}}/" class="truncate no-underline hover:underline">{{.Subject}}</a> 9 <span class="col-start-2 @xl:col-auto truncate text-sm text-soft"><b class="text-ink font-semibold">{{.Author}}</b><span class="@xl:hidden"> · {{.Date}}</span></span> 10 <span class="hidden @xl:block text-right text-sm text-soft">{{.Date}}</span> 11 </li>{{end}} 12 </ol> 13 {{if gt .Pages 1}}<nav class="flex justify-between mt-4 font-semibold"> 14 <span>{{if gt .Page 1}}<a href="/projects/{{.Name}}/commits/{{if gt .Page 2}}{{dec .Page}}/{{end}}">← Newer</a>{{end}}</span> 15 <span>{{if lt .Page .Pages}}<a href="/projects/{{.Name}}/commits/{{inc .Page}}/">Older →</a>{{end}}</span> 16 </nav>{{end}} 17</main> 18{{template "foot"}}{{end}}