fixes #291 Reviewed-on: #308 Reviewed-by: omar <omarl@noreply.libreschool.org> Co-authored-by: paspo <paolo@asperti.com> Co-committed-by: paspo <paolo@asperti.com>
29 lines
936 B
HTML
29 lines
936 B
HTML
{{- $pages := (where .ctx.Site.RegularPages ".Params.grouping" "intersect" (slice "homepage")) }}
|
|
{{- if gt (len $pages) 0 }}
|
|
<section class="wrapper style1">
|
|
<div class="container">
|
|
{{ with .item.heading }}<h2>{{ . }}</h2>{{ end }}
|
|
{{ if eq .item.featured_first true }}
|
|
<div class="row">
|
|
{{- range $idx, $itm := first 1 $pages }}
|
|
{{- .Render "shortblock_wide" -}}
|
|
{{- end }}
|
|
</div>
|
|
{{- $pages = after 1 $pages }}
|
|
{{- end }}
|
|
{{- range $idx, $itm := first (.item.max | default 4) $pages }}
|
|
{{- $rowpos := mod $idx 2 }}
|
|
{{- if eq $rowpos 0 }}
|
|
<div class="row">
|
|
{{ end }}
|
|
|
|
{{- .Render "shortblock" -}}
|
|
|
|
{{ if or (eq $rowpos 1) (eq $idx (len $pages)) -}}
|
|
</div>
|
|
{{- end }}
|
|
{{- end }}
|
|
</div>
|
|
</section>
|
|
{{ end }}
|