hugo-theme-anubis2/layouts/_default/single.html
2023-07-04 22:31:45 +03:00

45 lines
1.4 KiB
HTML

{{ define "main" }}
{{ if .Menus }}
<nav class="post-navigation">
{{ range .Menus }}
<a href="{{ .ConfiguredURL | absLangURL }}" title="{{ .Title }}">{{ .Name }}</a>
{{ end }}
</nav>
{{ end }}
<article class="post h-entry">
<div class="post-header">
<header>
<h1 class="p-name post-title{{ if .Params.favorite }} favorite{{end}}{{ if .Params.draft }} draft{{end}}">{{ trim .Title " " }}</h1>
{{ partial "post-language-switcher.html" . }}
</header>
</div>
{{ partial "toc.html" .}}
<div class="content e-content">
{{ .Content }}
</div>
{{ partial "post-info.html" . }}
</article>
{{ if gt .Site.Params.readNextPosts 0 }}
{{ $related := .Site.RegularPages.Related . | first .Site.Params.readNextPosts }}
{{ with $related }}
<h3 class="read-next-title">{{ i18n "readNext" }}</h3>
<ul class="read-next-posts">
{{ range . }}
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
{{ end }}
</ul>
{{ end }}
{{ end }}
{{ if and (.Site.Params.paginationSinglePost) (ne .Type "page") }}
{{ partial "post-pagination.html" . }}
{{ end }}
{{ if not .Params.disableComments }}
{{ partial "comments.html" . }}
{{ end }}
{{ end }}