hugo-theme-anubis2/layouts/_default/single.html

63 lines
2.0 KiB
HTML
Raw Permalink Normal View History

2020-01-12 07:51:51 +01:00
{{ define "main" }}
2024-04-09 14:22:28 +02:00
{{/* {{ if .Menus }}
2020-06-24 21:21:59 +02:00
<nav class="post-navigation">
{{ range .Menus }}
2023-08-12 10:28:38 +02:00
<a href="{{ .ConfiguredURL | absLangURL }}" title="{{ .Title }}">{{ .Name | markdownify }}</a>
2020-06-24 21:21:59 +02:00
{{ end }}
</nav>
2024-04-09 14:22:28 +02:00
{{ end }} */}}
<article class="post h-entry">
<div class="post-header">
<header>
2023-08-12 10:28:38 +02:00
<h1 class="p-name post-title{{ if .Params.favorite }} favorite{{end}}{{ if .Params.draft }} draft{{end}}">{{ trim .Title " " | markdownify }}</h1>
{{ partial "post-language-switcher.html" . }}
</header>
2024-03-04 08:05:53 +01:00
{{ partial "post-info.html" . }}
</div>
2023-07-04 21:29:38 +02:00
{{ partial "toc.html" .}}
<div class="content e-content">
2020-02-02 16:01:10 +01:00
{{ .Content }}
</div>
2024-03-04 08:05:53 +01:00
</article>
2024-04-09 14:03:09 +02:00
{{ $readNextPosts := 3}}
{{ if site.Params.readNextPosts }}
{{ $readNextPosts = site.Params.readNextPosts }}
{{ end }}
{{ if gt $readNextPosts 0 }}
{{ $related := .Site.RegularPages.Related . | first $readNextPosts }}
2022-02-18 10:29:49 +01:00
{{ with $related }}
2024-03-04 12:34:27 +01:00
<h3 class="read-next-title noselect">{{ i18n "readNext" }}</h3>
<ul class="read-next-posts noselect">
2022-02-18 10:29:49 +01:00
{{ range . }}
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
{{ end }}
</ul>
{{ end }}
{{ end }}
2020-06-24 21:21:59 +02:00
{{ if and (.Site.Params.paginationSinglePost) (ne .Type "page") }}
2021-07-09 18:00:52 +02:00
{{ partial "post-pagination.html" . }}
{{ end }}
2022-04-12 19:11:58 +02:00
{{ if not .Params.disableComments }}
{{ partial "comments.html" . }}
2020-01-21 19:57:57 +01:00
{{ end }}
2024-04-09 14:03:09 +02:00
{{/* When you use ```mermaid``, render-codeblock-mermaid.html is called and
2024-04-09 09:20:53 +02:00
`.Store.Set "hasMermaid"` is executed.
`.Store.Get "hasMermaid"` will return true and mermaid.js will be loaded.
*/}}
2024-04-09 14:03:09 +02:00
2024-04-09 09:20:53 +02:00
{{ if .Store.Get "hasMermaid" }}
{{ partial "mermaid_support.html" . }}
{{ end }}
2024-04-09 14:03:09 +02:00
{{ if .Params.math }}
{{ partial "mathjax_support.html" . }}
2024-04-09 09:20:53 +02:00
{{ end }}
{{ end }}