sadium/layouts/_default/single.html

45 lines
953 B
HTML
Raw Normal View History

2023-12-13 21:47:26 +03:00
{{ define "main" }}
<main>
<article>
2023-12-13 21:47:26 +03:00
<header>
2024-08-05 22:27:03 +03:00
<h1 class="post-title">
2024-07-20 16:48:23 +03:00
{{ .Title }}
2024-07-20 14:10:00 +03:00
</h1>
2023-12-13 21:47:26 +03:00
</header>
2024-08-10 11:37:28 +03:00
<div class="post-meta">
{{- if .Date -}}
<time class="post-date">
{{ .Date | time.Format ":date_medium" }}
</time>
{{- end -}}
{{- with .Params.Author -}}
<span class="post-author">{{ . }}</span>
{{- end -}}
</div>
{{ if .Params.tags }}
<span class="post-tags">
{{ range .Params.tags }}
#<a href="{{ (urlize (printf "tags/%s/" . )) | absLangURL }}">
{{- . -}}
</a>&nbsp;
{{ end }}
</span>
{{ end }}
2024-08-10 11:37:28 +03:00
2024-08-10 10:59:20 +03:00
{{ partial "cover.html" . }}
2024-08-10 11:08:26 +03:00
2024-08-10 11:37:28 +03:00
<aside>
{{ .TableOfContents }}
</aside>
2024-07-20 14:10:00 +03:00
{{ .Content | replaceRE "(<h[1-9] id=\"([^\"]+)\".+)(</h[1-9]+>)" `${1}<a href="#${2}" class="hanchor" ariaLabel="Anchor">&#8983;</a> ${3}` | safeHTML }}
</article>
2023-12-13 21:47:26 +03:00
</main>
{{ end }}