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

62 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" "thumbnail.svg" }}
{{- end }}
{{- end }}
{{- $image := $scratch.Get "image" }}
{{- $bg := ( $image | absLangURL) }}
<section class = 'post_header' style = 'background-image:url({{ $bg }});'>
</section>
<div class = 'post'>
<div class='post_metadata'>
<hr/>
<h1 class='post_title'>{{ .Title }}</h1>
<h3>
<svg>
<use xlink:href="#calendar"></use>
</svg>
{{ .Lastmod.Format (.Site.Params.dateFormat | default "2 January 2006") }}
</h3>
<hr/>
</div>
<article class='post_content'>
{{- .Content }}
<div class = 'post_extra'>
{{- partial "copy" . }}
</div>
</article>
</div>
<hr/>
<div class='post'>
<aside>
{{- partial "aside" . }}
</aside>
</div>
<div class='post'>
<article class='post_content' style="text-align: center;">
<h3>Facebook Community &raquo;</h3>
<p>Hulp nodig? Klik op '<em>Berichten</em>' en laat iets achter!</p>
<script>
(function() {
// https://developers.facebook.com/docs/plugins/page-plugin/ - max is 600
var width = 600;
var vw = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);
if(vw < 600) width = vw - 10;
document.write('<div class="fb-page" data-width="' + vw + '" data-href="https://www.facebook.com/redzuurdesem" data-hide-cover="false" data-tabs="timeline,messages" data-show-facepile="false"></div>');
})()
</script>
</article>
</div>
<script src = '{{ absURL "js/autosize.min.js" }}'></script>
{{- $timeagoScr := resources.Get "js/timeago.js" | resources.ExecuteAsTemplate "js/timeago.js" . }}
<script src = '{{ $timeagoScr.Permalink }}'></script>
{{- end }}