mirror of
https://github.com/Vimux/Binario.git
synced 2024-11-21 21:58:28 +00:00
Include .Content block (if exist) for main page
This commit is contained in:
parent
30e3277682
commit
326f9f2cda
1 changed files with 9 additions and 4 deletions
|
@ -1,13 +1,18 @@
|
||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
<main class="main">
|
<main class="main">
|
||||||
|
{{- if .Content }}
|
||||||
|
<div class="page block">
|
||||||
|
{{ with .Content }}<div class="page__content page__content--notitle">{{ . }}</div>{{ end }}
|
||||||
|
</div>
|
||||||
|
{{- end }}
|
||||||
<div class="cards">
|
<div class="cards">
|
||||||
{{ $mainSections := .Site.Params.mainSections | default (slice "post") }}
|
{{- $mainSections := .Site.Params.mainSections | default (slice "post") }}
|
||||||
{{ $paginator := .Paginate (where .Data.Pages "Section" "in" $mainSections) }}
|
{{- $paginator := .Paginate (where .Data.Pages "Section" "in" $mainSections) }}
|
||||||
{{ range $paginator.Pages }}
|
{{- range $paginator.Pages }}
|
||||||
<div class="card{{ if and (ge ($.Param "columns") 1) (le ($.Param "columns") 3) }} card--{{ $.Param "columns" }}col{{ else }} card--2col{{ end }}">
|
<div class="card{{ if and (ge ($.Param "columns") 1) (le ($.Param "columns") 3) }} card--{{ $.Param "columns" }}col{{ else }} card--2col{{ end }}">
|
||||||
{{ .Render "summary" }}
|
{{ .Render "summary" }}
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{- end }}
|
||||||
</div>
|
</div>
|
||||||
{{- if and (not .Site.Params.hideNoPostsWarning) (eq $paginator.TotalNumberOfElements 0) }}
|
{{- if and (not .Site.Params.hideNoPostsWarning) (eq $paginator.TotalNumberOfElements 0) }}
|
||||||
<div class="empty block center">
|
<div class="empty block center">
|
||||||
|
|
Loading…
Reference in a new issue