hugo-theme-minima/layouts/_default/single.html
2022-11-08 23:10:57 +08:00

51 lines
No EOL
1.3 KiB
HTML

{{ define "main" }}
<div class="container mx-auto">
<h1 class="text-4xl font-extrabold mt-6 mb-6">{{ .Title }}</h1>
<div class="mb-3 text-sm flex justify-between ">
<div>
{{ if .Site.Params.displayDate }}
{{ T "post.at" }} &mdash; {{ .Date | time.Format (T "timeformat") }}
{{ end }}
{{ if .Draft }}
<span class="ml-3 tag">
DRAFT
</span>
{{ end }}
</div>
{{ if .Params.tags }}
<div>
{{ range .Params.tags }}
<a class="ml-1" href="/tags/{{ . }}">#{{ . }}</a>
{{ end }}
</div>
{{ end }}
</div>
<main>
<p>{{ .Description | markdownify | safeHTML }}</p>
<article class="md">
{{ .Content }}
</article>
</main>
{{ if or .Params.math .Site.Params.math }}
{{ partial "math.html" . }}
{{ end }}
{{ if or .Params.mermaid .Site.Params.mermaid }}
{{ partial "mermaid.html" . }}
{{ end }}
{{ if or .Params.comment (and .Site.Params.commentOnAllPosts (ne .Params.comment false)) }}
{{ if eq .Site.Params.comment "disqus"}}
{{ partial "disqus.html" . }}
{{ end }}
{{ if eq .Site.Params.comment "ovo"}}
{{ partial "ovo.html" . }}
{{ end }}
{{ if eq .Site.Params.comment "utterances"}}
{{ partial "utterances.html" . }}
{{ end }}
{{ end }}
</div>
{{ end }}