summaryrefslogtreecommitdiffstats
path: root/indieweb-micro/themes/MinIndie/layouts/_default/list.html
blob: f3639a1bd50c53cbed7ba651ef0d8178b89b3660 (plain) (blame)
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
{{ define "main" }}
<main class="content-list">
    {{ $pageKind := .Kind }}
    {{ if or .Title .Content }}
    <div>
      {{ if .Title }}
          <h1>
              {{ .Title }}
              {{ partial "single-title-extra.html" . }}
          </h1>
      {{ end }}
      {{ with .Content }}<div class="justify">{{ . }}</div>{{ end }}
    </div>
    {{ end }}

    <div class="h-feed">
        {{ $yearCptr := "" }}
        {{ $monthCptr := "" }}
        {{ range .Paginator.Pages }}
            {{ $postYear := .Date.Year }}
            {{ $postMonth := .Date.Month }}

            {{ if or (ne $monthCptr $postMonth) (and (eq $yearCptr "") (eq $monthCptr "")) }}
                    {{ $yearCptr = $postYear }}
                    {{ $monthCptr = $postMonth }}
                {{ if and (ne $yearCptr "") (ne $monthCptr "") }}
            </ul>
        </div>
                {{ end  }}
        <div>
            <h3>{{ $monthCptr }} {{ $yearCptr }}</h3>
            <ul>
          {{ end }}

          <li class="h-entry">
              <div hidden>
                  {{ partial "bio-hcard.html" . }}
              </div>
              <div class="post-title">
                <time class="date dt-published" datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "02" }}</time>:
                {{ if eq $pageKind "term" }}[{{ .Type }}] {{ end }}
                <a href="{{ .Permalink }}" class="u-url p-name title">
                  {{.Title }}
                </a>
              </div>
            </li>

          {{ $yearCptr = $postYear }}
          {{ $monthCptr = $postMonth }}
        {{ end }}
        </ul>
      </div>
    </div>

    {{ partial "pagination.html" . }}
</main>
{{ end }}
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage