redzuurdesem/themes/desem-swift-theme/layouts/_default/single.html

77 lines
1.9 KiB
HTML

{{- define "main" }}
{{- $scratch := newScratch }}
{{- if isset .Params "image" }}
{{- $scratch.Set "image" .Params.image }}
{{- else }}
{{- if isset .Params "featured_image" }}
{{- $scratch.Set "image" .Params.featured_image }}
{{- else }}
{{- $scratch.Set "image" "nop" }}
{{- end }}
{{- end }}
{{- $image := $scratch.Get "image" }}
{{ if eq $image "nop" }}
<section style='margin-top: 5em'>
</section>
{{ else }}
{{- $bg := ( $image | absLangURL) }}
<section class = 'post_header' style = 'background-image:url({{ $bg }});'>
<div class='post_header_tags'>
<div class = 'excerpt_meta'>
{{- with .Params.tags -}}
{{- range first 10 . }}
{{- $tag := . | urlize }}
<a href = '{{ absURL (printf "tags/%s" $tag) }}' class = 'post_tag'>
{{- . }}
</a>
{{- end }}
{{- end }}
</div>
</div>
</section>
{{ end }}
<div class = 'post'>
<div class='post_metadata'>
<hr/>
<h1 class='post_title'>{{ .Title }}</h1>
{{ if isset .Params "date" }}
<h3>
<svg>
<use xlink:href="#calendar"></use>
</svg>
{{ .Lastmod.Format (.Site.Params.dateFormat | default "2 January 2006") }}
</h3>
{{ end }}
<hr/>
</div>
<article class='post_content'>
{{- .Content }}
<div class = 'post_extra'>
{{- partial "copy" . }}
</div>
</article>
</div>
<div class='post'>
<aside>
{{- partial "aside" . }}
</aside>
</div>
{{ if not (isset .Params "disablefb") }}
<hr/>
<div class='post'>
<article class='post_content' style="text-align: center;">
<h3 id="fb-community-header">Facebook community &raquo;</h3>
<p>Klik op '<em>Berichten</em>' en laat iets van je horen!</p>
<div id='fb-community-container'>
<div class="lds-facebook"><div></div><div></div><div></div></div> Bezig met laden...
</div>
</article>
</div>
{{ end }}
{{- end }}