aboutsummaryrefslogtreecommitdiffstats
path: root/layouts/index.html
blob: 7f7b5dd39e3bc1bb0dfab1fbbfc238a8622a851f (plain)
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
{{ define "hero" }}
  {{ partial "hero.html" . }}
{{ end }}

{{ define "main" }}
  {{ range (where .Pages "Type" "in" .Site.Params.mainSections).ByWeight }}
    {{ if gt (len .Pages) 0 }}
      <div class="odd:bg-white even:bg-gray-200">
        <div class="max-w-screen-md mx-auto p-1">
          <h2
            id="{{ anchorize .Title | safeURL }}"
            class="baskerville text-4xl my-6 font-bold"
          >
            {{ .Title }}
          </h2>
          {{ range first 3 .Pages.ByPublishDate.Reverse }}
            {{ partial "post.html" . }}
          {{ end }}
          <div class="text-center p-4">
            <i class="fas fa-angle-right"></i>
            <a href="{{ .Type }}" class="text-2xl"
              >{{ T "see_all" | humanize }}</a
            >
          </div>
        </div>
      </div>
    {{ end }}
  {{ end }}
{{ end }}