8356
Wx
www-xonecas-io / files
www-xonecas-io / internal / site / templates / activity.html
2.1 KB
1{{define "activity.html"}}{{template "head" (list (printf "Activity %s%s" .Year (or (and (gt .Page 1) (printf ", page %d" .Page)) "")) (printf "%d commits by xonecas in %s, newest first." .Total .Year))}}{{template "nav" (dict "Here" "Activity")}} 2<main class="px-4 sm:px-8 py-6 max-w-[1440px] mx-auto grid grid-cols-1 lg:grid-cols-[17rem_minmax(0,1fr)] gap-x-10 gap-y-8"> 3 <aside class="order-2 lg:order-none"> 4 <h2 class="font-bold text-lg mb-2">Years</h2> 5 {{range .Years}}<a href="/activity/{{.Year}}/" class="grid grid-cols-[2.75rem_minmax(0,1fr)_3.5rem] items-center gap-3 py-1 no-underline hover:underline {{if eq .Year $.Year}}text-accent font-bold{{end}}"> 6 <span>{{.Year}}</span><span class="h-4 rounded-[2px] bg-h{{.Heat}}"></span><span class="text-right font-mono text-sm">{{comma .Count}}</span></a>{{end}} 7 </aside> 8 <div class="min-w-0"> 9 <div class="flex flex-wrap items-end gap-x-4 gap-y-2"> 10 <div class="bg-det text-det-fg text-[64px] font-bold leading-[.9] tracking-tight px-3 pt-2 pb-1 rounded-[2px]">{{comma .Total}}</div> 11 <h1 class="text-2xl font-bold">commits in {{.Year}}</h1> 12 <span class="ml-auto text-xs text-soft">newest first</span> 13 </div> 14 <div class="grid grid-cols-12 gap-[3px] mt-4 text-[11px]"> 15 {{range list "J" "F" "M" "A" "M" "J" "J" "A" "S" "O" "N" "D"}}<span class="text-center text-soft">{{.}}</span>{{end}} 16 {{range .Months}}<span class="h-7 rounded-[2px] bg-h{{.Heat}} text-t{{.Heat}} grid place-items-center font-semibold" title="{{.Month}}: {{.Count}} commits">{{if .Count}}{{.Count}}{{end}}</span>{{end}} 17 </div> 18 {{range .Days}}<section class="mt-5"> 19 <div class="flex items-baseline justify-between border-b-[1.5px] border-edge pb-1"><h2 class="font-bold">{{.Label}}</h2><span class="text-xs text-soft">{{len .Commits}} commit{{if gt (len .Commits) 1}}s{{end}}</span></div> 20 {{range .Commits}}{{template "commit-row" .}}{{end}} 21 </section>{{else}}<p class="mt-6 font-serif italic text-soft">No commits in {{.Year}}.</p>{{end}} 22 {{template "pager" .Pager}} 23 </div> 24</main> 25{{template "foot"}}{{end}}