hugo-theme-anubis2/layouts/_default/single.html
2022-02-26 15:21:10 +07:00

57 lines
1.6 KiB
HTML

{{ define "main" }}
{{ if .Menus }}
<nav class="post-navigation">
{{ range .Menus }}
<a href="{{ .URL | 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>
<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 .Site.DisqusShortname }}
{{ partial "disqus.html" . }}
{{ end }}
{{ if .Site.Params.UtterancesRepo }}
{{ partial "utterances.html" . }}
{{ end }}
{{ if .Site.Params.isso.enabled }}
{{ partial "isso.html" . }}
{{ end }}
{{ if .Site.Params.graphcommentId }}
{{ partial "graphcomment.html" . }}
{{ end }}
{{ end }}