mirror of
https://github.com/Wonderfall/hugo-WonderMod.git
synced 2024-11-22 10:31:39 +01:00
16b98dc8f9
- improve toc styling - make collapsable
44 lines
1.1 KiB
HTML
44 lines
1.1 KiB
HTML
{{ define "main" }}
|
|
|
|
<article class="post-single">
|
|
<header class="post-header">
|
|
<h1 class="post-title">
|
|
{{ .Title }}
|
|
<div class="entry-isdraft">{{- if .Draft }}<sup>[draft]</sup>{{- end }}</div>
|
|
</h1>
|
|
<div class="post-meta">
|
|
{{- if or .Params.author .Site.Params.author }}
|
|
{{- .Params.author | default .Site.Params.author }} · {{ end }}
|
|
{{- .Date.Format "January 2, 2006" -}}
|
|
</div>
|
|
</header>
|
|
{{ if .Params.ShowToc }}
|
|
<div class="toc">
|
|
<details>
|
|
<summary>
|
|
<div class="details">Table of Contents</div>
|
|
</summary>
|
|
<blockquote>
|
|
{{ .TableOfContents }}
|
|
</blockquote>
|
|
</details>
|
|
</div>
|
|
{{ end }}
|
|
<div class="post-content">{{ .Content }}</div>
|
|
{{- if .Params.tags }}
|
|
<footer class="post-footer">
|
|
<ul class="post-tags">
|
|
{{- range .Params.tags }}
|
|
{{- $href := print (absURL "tags/") (urlize .) }}
|
|
<li><a href="{{ $href }}">{{ . }}</a></li>
|
|
{{- end }}
|
|
</ul>
|
|
</footer>
|
|
{{- end }}
|
|
|
|
{{- if $.Site.Params.comments }}
|
|
{{- partial "comments.html" . }}
|
|
{{- end }}
|
|
</article>
|
|
|
|
{{ end }}{{/* end main */}} |