diff options
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/index.html | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/layouts/index.html b/layouts/index.html index 905bb07..fb866ad 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -3,25 +3,27 @@ {{ end }} {{ define "main" }} - {{ range $index, $element := (where .Pages "Type" "in" .Site.Params.mainSections).ByWeight }} - <div class="stripe-dark"> - <div class="mw7 center pa1"> - <h2 - id="{{ anchorize .Title | safeURL }}" - class="baskerville lh-title f2" - > - {{ .Title }} - </h2> - {{ range first 3 .Pages.ByPublishDate.Reverse }} - {{ partial "post.html" . }} - {{ end }} - <div class="tc pa3"> - <i class="fas fa-angle-right"></i> - <a href="{{ .Type }}" class="f3 link near-black" - >{{ T "see_all" | humanize }}</a + {{ range (where .Pages "Type" "in" .Site.Params.mainSections).ByWeight }} + {{ if gt (len .Pages) 0 }} + <div class="stripe-dark"> + <div class="mw7 center pa1"> + <h2 + id="{{ anchorize .Title | safeURL }}" + class="baskerville lh-title f2" > + {{ .Title }} + </h2> + {{ range first 3 .Pages.ByPublishDate.Reverse }} + {{ partial "post.html" . }} + {{ end }} + <div class="tc pa3"> + <i class="fas fa-angle-right"></i> + <a href="{{ .Type }}" class="f3 link near-black" + >{{ T "see_all" | humanize }}</a + > + </div> </div> </div> - </div> + {{ end }} {{ end }} {{ end }} |