8356
Wx
www-xonecas-io / files
www-xonecas-io / internal / site / templates / commit.html
1.4 KB
1{{define "commit.html"}}{{template "head" (list (printf "%s · %s" .C.Subject .Name) (printf "Commit %s in %s: %s" .C.Short .Name .C.Subject))}}{{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" (printf "commit %s" .C.Short))}} 4 <article class="border-[1.5px] border-edge rounded-[2px] bg-card mb-6"> 5 <h2 class="px-4 pt-3 text-xl font-bold break-words">{{.C.Subject}}</h2> 6 {{with .C.Body}}<pre class="px-4 pt-2 font-sans whitespace-pre-wrap break-words">{{.}}</pre>{{end}} 7 <p class="flex flex-wrap gap-x-3 px-4 py-3 mt-3 border-t border-line text-sm bg-empty"> 8 <b>{{.C.Author}}</b><span class="text-soft">{{.C.Date}}</span> 9 <code class="font-mono text-accent break-all">{{.C.Hash}}</code> 10 {{range .C.Parents}}<span class="text-soft">parent <a href="/projects/{{$.Name}}/commit/{{.}}/" class="font-mono text-accent no-underline hover:underline">{{slice . 0 7}}</a></span>{{end}} 11 </p> 12 </article> 13 <p class="text-sm text-soft mb-3">{{len .Diffs}} file{{if ne (len .Diffs) 1}}s{{end}} changed</p> 14 {{if .Cut}}<p class="mb-4 px-4 py-2 border-[1.5px] border-accent rounded-[2px] text-sm"><b>This diff is too big to show in full.</b> The first {{maxDiff}} lines are below, and every file is listed with its counts.</p>{{end}} 15 <div class="space-y-4">{{range .Diffs}}{{template "diff" .}}{{end}}</div> 16</main> 17{{template "foot"}}{{end}}