aboutsummaryrefslogtreecommitdiffstats
path: root/layouts/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/index.html')
-rw-r--r--layouts/index.html31
1 files changed, 23 insertions, 8 deletions
diff --git a/layouts/index.html b/layouts/index.html
index eb6d5c6..970a64e 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -1,11 +1,26 @@
-{{ define "main" }}
-<div id="content" class="bg-near-white pb2 pt4">
+{{ define "hero" }}
+ {{ partial "hero.html" . }}
+{{ end }}
- <!-- Note that .Data.Pages is the equivalent of .Site.Pages on the homepage template. -->
- {{ $paginator := .Paginate (where .Data.Pages "Section" "post") }}
- {{ range $paginator.Pages }}
- {{ .Render "summary" }}
+{{ 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">
+ {{ .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 }}
- {{ partial "pagination.html" . }}
-</div>
+ {{ end }}
{{ end }}