show headline bar only if Title is set
This commit is contained in:
parent
44ae6a520b
commit
7a2abbbaeb
3 changed files with 12 additions and 6 deletions
|
@ -7,9 +7,11 @@
|
|||
<div class="row">
|
||||
<div class="col-md-{{ $mainWidth }}">
|
||||
<div class="card mt-3 mb-3">
|
||||
<div class="card-header">
|
||||
{{ if .Title -}}
|
||||
<header class="card-header">
|
||||
<h2 class="card-text">{{ .Title }}</h2>
|
||||
</div>
|
||||
</header>
|
||||
{{- end }}
|
||||
<div class="card-body">
|
||||
<p class="card-text">{{ .Content }}</p>
|
||||
</div>
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
<div class="col-md-8">
|
||||
<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 -}}
|
||||
|
@ -18,6 +19,7 @@
|
|||
</p>
|
||||
{{- end }}
|
||||
</header>
|
||||
{{- end }}
|
||||
<div class="post-content card-body" itemprop="articleBody">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
|
@ -26,8 +28,7 @@
|
|||
{{ partial "sidebar.html" . }}
|
||||
</div>
|
||||
|
||||
{{ if and (not .Site.Params.hideChildArticles)
|
||||
(eq .Site.Params.showChildArticles "cards") -}}
|
||||
{{ if eq .Site.Params.showChildArticles "cards" -}}
|
||||
<div class="row">
|
||||
{{- $related := .Site.RegularPages.RelatedTo (keyVals "parents" .Params.pageid) -}}
|
||||
{{ range sort (sort $related "Date" "desc") "Weight" }}
|
||||
|
|
|
@ -63,8 +63,8 @@
|
|||
(dict "related" $related "header" (i18n "parent-articles") "id" "parents") -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if and (not .Site.Params.hideChildArticles)
|
||||
(ne .Site.Params.showChildArticles "sidebar") -}}
|
||||
{{- if and (not .Site.Params.hideChildArticles)
|
||||
(ne .Site.Params.showChildArticles "cards") -}}
|
||||
{{- $related := .Site.RegularPages.RelatedTo (keyVals "parents" .Params.pageid) -}}
|
||||
{{- partial "card-related"
|
||||
(dict "related" $related "header" (i18n "child-articles") "id" "children") -}}
|
||||
|
@ -107,4 +107,7 @@
|
|||
</div>
|
||||
{{- end -}}
|
||||
|
||||
<div class="mt-3">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
Loading…
Add table
Reference in a new issue