diff --git a/layouts/partials/homepage/blocks/posts_homepage.html b/layouts/partials/homepage/blocks/posts_homepage.html new file mode 100644 index 0000000..9e54e02 --- /dev/null +++ b/layouts/partials/homepage/blocks/posts_homepage.html @@ -0,0 +1,28 @@ +{{- $pages := (where .ctx.Site.RegularPages "Section" "in" .item.sections ) }} +{{- if gt (len $pages) 0 }} +
+
+ {{ with .item.heading }}

{{ . }}

{{ end }} + {{ if eq .item.featured_first true }} +
+ {{- range $idx, $itm := first 1 $pages }} + {{- .Render "shortblock_wide" -}} + {{- end }} +
+ {{- $pages = after 1 $pages }} + {{- end }} + {{- range $idx, $itm := first (.item.max | default 4) $pages }} + {{- $rowpos := mod $idx 2 }} + {{- if eq $rowpos 0 }} +
+ {{ end }} + + {{- .Render "shortblock" -}} + + {{ if or (eq $rowpos 1) (eq $idx (len $pages)) -}} +
+ {{- end }} + {{- end }} +
+
+{{ end }}