48 lines
1.5 KiB
HTML
48 lines
1.5 KiB
HTML
{{ define "main" -}}
|
|
|
|
<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">
|
|
{{ if .Title -}}
|
|
<header class="post-header card-header">
|
|
<h2 class="post-title" itemprop="name headline">{{ .Title }}</h2>
|
|
{{ if and (not .Params.nodate) .Date -}}
|
|
<p class="post-meta">
|
|
<time datetime='{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}'
|
|
itemprop="datePublished">{{ .Date.Format (i18n "dateFormat") }}</time>
|
|
{{ with .Params.Author -}} •
|
|
<span itemprop="author" itemscope
|
|
itemtype="http://schema.org/Person">
|
|
<span itemprop="name">{{ . }}</span></span>
|
|
{{- end }}
|
|
</p>
|
|
{{- end }}
|
|
</header>
|
|
{{- end }}
|
|
{{ with .Content -}}
|
|
<div class="post-content card-body" itemprop="articleBody">{{ . }}</div>
|
|
{{- end }}
|
|
|
|
{{- $related := .Site.RegularPages.RelatedTo (keyVals "parents" .Params.pageid) -}}
|
|
{{ range sort (sort $related "Date" "desc") "Weight" }}
|
|
<div class="card-body">
|
|
<h3 class="post-title" itemprop="name headline">{{ .Title }}</h3>
|
|
{{ with .Content -}}
|
|
<div itemprop="articleBody">{{ . }}</div>
|
|
{{- end }}
|
|
</div>
|
|
{{ end }}
|
|
|
|
</article>
|
|
|
|
</div>
|
|
|
|
{{ if not .Params.noSidebar -}}
|
|
{{ partial "sidebar.html" . }}
|
|
{{- end }}
|
|
</div>
|
|
|
|
{{- end }}
|
|
|