50 lines
1.4 KiB
HTML
50 lines
1.4 KiB
HTML
{{ define "main" -}}
|
|
{{- $showChildren := .Param "showChildArticles" -}}
|
|
{{- $children := slice -}}
|
|
{{- if $showChildren -}}
|
|
{{- $children = .Site.RegularPages.RelatedTo (keyVals "parents" .Params.pageid) -}}
|
|
{{- end -}}
|
|
|
|
<div class="row">
|
|
{{- $mainwidth := or (and .Params.noSidebar "12") "8" -}}
|
|
<div class="col-md-{{ $mainwidth }}">
|
|
<article class="card mt-3 mb-3"
|
|
itemscope itemtype="http://schema.org/BlogPosting">
|
|
{{- partial "content" . -}}
|
|
{{- if eq $showChildren "embed" -}}
|
|
{{- range sort (sort $children "Date" "desc") "Weight" }}
|
|
{{ partial "embed" . -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
</article>
|
|
</div>
|
|
{{ if not .Params.noSidebar -}}
|
|
{{ partial "sidebar.html" . }}
|
|
{{- end }}
|
|
</div>
|
|
|
|
{{- if hasPrefix $showChildren "card" -}}
|
|
<div class="row">
|
|
{{- range sort (sort $children "Date" "desc") "Weight" }}
|
|
{{ partial "card" . -}}
|
|
{{- end -}}
|
|
</div>
|
|
{{- end }}
|
|
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<ul class="pagination">
|
|
{{ with .NextInSection }}
|
|
<li class="page-item">
|
|
<a class="next page-link" href="{{ .Permalink }}">« {{ .Title }}</a></li>
|
|
{{ end }}
|
|
{{ with .PrevInSection }}
|
|
<li class="page-item">
|
|
<a class="previous page-link"
|
|
href="{{ .Permalink }}">{{ .Title }} »</a></li>
|
|
{{ end }}
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
{{- end }}
|