mirror of
https://github.com/Wonderfall/hugo-WonderMod.git
synced 2024-10-01 01:06:14 -04:00
6d6fe2c389
Allows Overriding of ToC
71 lines
2.1 KiB
HTML
71 lines
2.1 KiB
HTML
{{- define "main" }}
|
|
|
|
<article class="post-single">
|
|
<header class="post-header">
|
|
{{- partial "breadcrumbs.html" . }}
|
|
<h1 class="post-title">
|
|
{{ .Title }}
|
|
{{- if .Draft }}<div class="entry-isdraft"><sup> [draft]</sup></div>{{- end }}
|
|
</h1>
|
|
{{- if .Description }}
|
|
<div class="post-description">
|
|
{{ .Description }}
|
|
</div>
|
|
{{- end }}
|
|
{{- if not (.Param "hideMeta") }}
|
|
<div class="post-meta">
|
|
{{- partial "post_meta.html" . -}}
|
|
{{- partial "translation_list.html" . -}}
|
|
{{- partial "edit_post.html" . -}}
|
|
</div>
|
|
{{- end}}
|
|
</header>
|
|
{{- $isHidden := .Params.cover.hidden | default .Site.Params.cover.hiddenInSingle | default .Site.Params.cover.hidden}}
|
|
{{- partial "cover.html" (dict "cxt" . "IsHome" false "isHidden" $isHidden) }}
|
|
{{- if (.Param "ShowToc") }}
|
|
{{- partial "toc.html" . }}
|
|
{{- end }}
|
|
<div class="post-content">
|
|
{{- partial "anchored_headings.html" .Content -}}
|
|
</div>
|
|
<footer class="post-footer">
|
|
{{- if .Params.tags }}
|
|
<ul class="post-tags">
|
|
{{- range ($.GetTerms "tags") }}
|
|
<li><a href="{{ .Permalink }}">{{ .LinkTitle }}</a></li>
|
|
{{- end }}
|
|
</ul>
|
|
{{- end }}
|
|
{{- if (.Param "ShowPostNavLinks") }}
|
|
{{- $pages := where site.RegularPages "Type" "in" site.Params.mainSections }}
|
|
{{- if and (gt (len $pages) 1) (in $pages . ) }}
|
|
<nav class="paginav">
|
|
{{- with $pages.Next . }}
|
|
<a class="prev" href="{{.Permalink}}">
|
|
<span class="title">« {{ i18n "prev_page" }}</span>
|
|
<br>
|
|
<span>{{- .Name -}}</span>
|
|
</a>
|
|
{{- end}}
|
|
{{- with $pages.Prev . }}
|
|
<a class="next" href="{{.Permalink}}">
|
|
<span class="title">{{ i18n "next_page" }} »</span>
|
|
<br>
|
|
<span>{{- .Name -}}</span>
|
|
</a>
|
|
{{- end}}
|
|
</nav>
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- if (and .Site.Params.ShowShareButtons (ne .Params.disableShare true) ) }}
|
|
{{- partial "share_icons.html" . }}
|
|
{{- end }}
|
|
</footer>
|
|
|
|
{{- if (.Param "comments") }}
|
|
{{- partial "comments.html" . }}
|
|
{{- end }}
|
|
</article>
|
|
|
|
{{- end }}{{/* end main */}}
|