2020-04-22 12:14:28 +02:00
|
|
|
{{ define "main" }}
|
2020-04-08 20:44:29 +02:00
|
|
|
<main>
|
2020-04-22 12:14:28 +02:00
|
|
|
<article>
|
2020-04-08 20:44:29 +02:00
|
|
|
<div class="title">
|
|
|
|
<h1 class="title">{{ .Title }}</h1>
|
|
|
|
<div class="meta">Posted on {{ dateFormat "Jan 2, 2006" .Date }}{{ if .Draft }} <span class="draft-label">DRAFT</span> {{ end }}</div>
|
|
|
|
</div>
|
2020-04-22 12:14:28 +02:00
|
|
|
{{ if isset .Params "tldr" }}
|
|
|
|
<div class="tldr">
|
|
|
|
<strong>tl;dr:</strong>
|
|
|
|
{{ .Params.tldr }}
|
|
|
|
</div>{{ end }}
|
2020-04-08 20:44:29 +02:00
|
|
|
|
|
|
|
<section class="body">
|
|
|
|
{{ .Content }}
|
|
|
|
</section>
|
|
|
|
|
|
|
|
<div class="post-tags">
|
|
|
|
{{ if ne .Type "page" }}
|
2020-04-22 12:14:28 +02:00
|
|
|
{{ if gt .Params.tags 0 }}
|
|
|
|
<nav class="nav tags">
|
|
|
|
<ul class="tags">
|
|
|
|
{{ range .Params.tags }}
|
|
|
|
<li><a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">{{ . }}</a></li>
|
|
|
|
{{ end }}
|
|
|
|
</ul>
|
|
|
|
</nav>
|
|
|
|
{{ end }}
|
2020-04-08 20:44:29 +02:00
|
|
|
{{ end }}
|
|
|
|
</div>
|
2023-04-08 05:49:51 +02:00
|
|
|
{{- $.Scratch.Set "isDisqus" true -}}
|
|
|
|
<!-- Check if disqus short name is given -->
|
2024-07-27 08:15:56 +02:00
|
|
|
{{ if not .Site.Config.Services.Disqus.Shortname }}
|
2023-04-08 05:49:51 +02:00
|
|
|
{{- $.Scratch.Set "isDisqus" false -}}
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
{{- if eq ($.Scratch.Get "isDisqus") true -}}
|
|
|
|
{{- partial "disqus.html" . -}}
|
|
|
|
{{- end -}}
|
2020-04-22 12:14:28 +02:00
|
|
|
</article>
|
|
|
|
</main>
|
|
|
|
{{ end }}
|