mykiwi/mykiwi.blogpublic Fork 0
ca8b900c61818e412fa536a0f92084227bbf5f4c
Commits
Clone
git clone https://git.rickub.com/mykiwi/mykiwi.blog.git
git clone ssh://git@rickub.com/mykiwi/mykiwi.blog.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

index.html · 38 lines · 1.2 KBHTML Blame HistoryRaw
Port fzakaria.com design to Hugo and add a homepage profile 1bdbd06 Romain Gautier 22h ago1{{ define "main" }}
2{{ $posts := (where site.RegularPages "Section" "posts").ByDate.Reverse }}
3{{ $lead := index $posts 0 }}
4{{ $rest := after 1 $posts }}
5{{ $years := $rest.GroupByDate "2006" }}
6
7<div class="page-index column">
8 {{ partial "colophon.html" . }}
9
10 <div class="index-body">
11 {{ with $lead }}
12 <div class="index-lead rise" style="--i: 1">
13 <span class="label">Latest &middot; {{ .Date.Format "January 2, 2006" }}</span>
14 <a class="title" href="{{ .RelPermalink }}">{{ .Title }}</a>
15 <span class="excerpt">{{ .Summary }}</span>
16 <span class="more" aria-hidden="true">Read &rarr;</span>
17 </div>
18 {{ end }}
19
20 {{ range $i, $year := $years }}
21 <section class="year rise" style="--i: {{ add $i 2 }}">
22 <h2 class="year__label">
23 {{ $year.Key }}
24 <span class="count">{{ len $year.Pages }} posts</span>
25 </h2>
26 <ul class="year__list">
27 {{ range $year.Pages }}
28 <li class="entry">
29 <span class="date">{{ .Date.Format "Jan 02" }}</span>
30 <a href="{{ .RelPermalink }}">{{ .Title }}</a>
31 </li>
32 {{ end }}
33 </ul>
34 </section>
35 {{ end }}
36 </div>
37</div>
38{{ end }}