mykiwi/mykiwi.blogpublic Fork 0
ab57bea17065e93abbaa8a8c288357475e5ba1b2
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.

Add French/Portuguese/Japanese support, block indexing until launch f8c7bc5 · on ab57bea17065e93abbaa8a8c288357475e5ba1b2 · Romain Gautier · 13h ago
index.html · 38 lines · 1.3 KBHTML Blame HistoryRaw
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{{ define "main" }}
{{ $posts := (where site.RegularPages "Section" "posts").ByDate.Reverse }}
{{ $lead := index $posts 0 }}
{{ $rest := after 1 $posts }}
{{ $years := $rest.GroupByDate "2006" }}

<div class="page-index column">
  {{ partial "colophon.html" . }}

  <div class="index-body">
    {{ with $lead }}
      <div class="index-lead rise" style="--i: 1">
        <span class="label">{{ i18n "latest" }} &middot; {{ .Date.Format "January 2, 2006" }}</span>
        <a class="title" href="{{ .RelPermalink }}">{{ .Title }}</a>
        <span class="excerpt">{{ .Summary }}</span>
        <span class="more" aria-hidden="true">{{ i18n "readMore" }}</span>
      </div>
    {{ end }}

    {{ range $i, $year := $years }}
      <section class="year rise" style="--i: {{ add $i 2 }}">
        <h2 class="year__label">
          {{ $year.Key }}
          <span class="count">{{ i18n "postsCount" (dict "Count" (len $year.Pages)) }}</span>
        </h2>
        <ul class="year__list">
          {{ range $year.Pages }}
            <li class="entry">
              <span class="date">{{ .Date.Format "Jan 02" }}</span>
              <a href="{{ .RelPermalink }}">{{ .Title }}</a>
            </li>
          {{ end }}
        </ul>
      </section>
    {{ end }}
  </div>
</div>
{{ end }}