redstrate.com/themes/red/layouts/_default/single.html

72 lines
2.4 KiB
HTML
Raw Normal View History

2022-08-02 14:05:56 -04:00
{{ define "main" }}
<h2>{{ .Title }}</h2>
2022-12-27 22:34:31 -05:00
{{ if in .File.Dir "blog" }}
<i style="margin: 0">
2022-12-27 22:34:31 -05:00
Posted on
2023-04-17 15:18:56 -04:00
<time datetime="{{ .Page.Lastmod.Format "2006-01-02" }}" class="text-muted">
2022-12-27 22:34:31 -05:00
{{ $.Date.Format "January 02, 2006" }}
</time>
2023-04-17 15:18:56 -04:00
<time datetime="{{ .Page.Lastmod.Format "2006-01-02" }}" class="text-muted">
2023-04-26 12:44:49 -04:00
(Updated on {{ $.Page.Lastmod.Format "January 02, 2006" }})
</time>
</i>
{{ end }}
2022-08-02 14:05:56 -04:00
2023-02-23 17:39:20 -05:00
<hr>
2023-04-17 16:03:42 -04:00
{{ if .Params.toc }}
2023-04-17 16:01:13 -04:00
<details>
<summary>Table of Contents</summary>
{{ .Page.TableOfContents }}
</details>
{{ end }}
{{ .Content }}
2022-09-12 10:53:34 -04:00
{{ if in .File.Dir "blog" }}
{{ partial "voting" . }}
2022-12-27 22:34:31 -05:00
{{ partial "comments" . }}
{{ end }}
2023-07-03 11:03:07 -04:00
{{ if .Params.threejs }}
{{ $imagesloaded := resources.Get "js/three.js" }}
{{ if hugo.IsProduction }}
{{ $imagesloaded = $imagesloaded | minify | fingerprint | resources.PostProcess }}
{{ end }}
<script src="{{ $imagesloaded.RelPermalink }}" integrity="{{ $imagesloaded.Data.Integrity }}"></script>
{{ end }}
{{ if .Params.math }}
{{ $math := resources.Get "js/katex.js" }}
{{ if hugo.IsProduction }}
{{ $math = $math | minify | fingerprint | resources.PostProcess }}
{{ end }}
<script src="{{ $math.RelPermalink }}" integrity="{{ $math.Data.Integrity }}"></script>
{{ $autorender := resources.Get "js/auto-render.js" }}
{{ if hugo.IsProduction }}
{{ $autorender = $autorender | minify | fingerprint | resources.PostProcess }}
{{ end }}
<script src="{{ $autorender.RelPermalink }}" integrity="{{ $autorender.Data.Integrity }}"></script>
{{ $style := resources.Get "css/katex.css" }}
{{ if hugo.IsProduction }}
{{ $style = $style | minify | fingerprint | resources.PostProcess }}
{{ end }}
<link href="{{ $style.RelPermalink }}" integrity="{{ $style.Data.Integrity }}" rel="stylesheet">
<script>
document.addEventListener("DOMContentLoaded", function() {
renderMathInElement(document.body, {
delimiters: [
{left: "$$", right: "$$", display: true},
{left: "$", right: "$", display: false}
]
});
});
</script>
{{ end }}
2022-08-02 14:05:56 -04:00
{{ end }}