annabunches.net/layouts/page/single.html

52 lines
1.6 KiB
HTML
Executable File

{{ partial "header.html" . }}
{{ $baseurl := .Site.BaseURL | sanitizeurl }}
<article class="p-article">
<header>
<div>
{{ range .Params.tags }}
<a href="{{ $baseurl }}/tags/{{ . | urlize }}" class="c-tag">{{ . }}</a>
{{ end }}
</div>
</header>
{{ with .Params.thumbnail }}
<img src="{{ . }}" alt="thumbnail" class="p-article__thumbnail">
{{ end }}
<section id="js-article" class="p-article__body">
{{ .Content }}
</section>
<footer>
{{ with ($.Param "disqus") }}
<div id="disqus_thread"></div>
<script>
var disqus_shortname = '{{ . }}';
(function() {
var d = document, s = d.createElement('script');
s.src = 'https://' + disqus_shortname + '.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
{{ end }}
<nav class="p-pagination c-pagination">
<div class="c-pagination__ctrl">
<div class="c-pagination__newer">
{{ if .NextInSection }}
<a href="{{ .NextInSection.Permalink }}">Newer</a>
{{ else }}
{{ end }}
</div>
<div class="c-pagination__older">
{{ if .PrevInSection }}
<a href="{{ .PrevInSection.Permalink }}">Older</a>
{{ else }}
{{ end }}
</div>
</div>
</nav>
{{ partial "related.html" . }}
{{ partial "siteinfo.html" . }}
</footer>
</article>
{{ partial "footer.html" . }}