blob: d79d528bb06a735b56491c9cf49f91c8b5ef65e0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
{{ define "main" }}
{{ $hasToc := and (in .TableOfContents "<li>" ) (.Params.toc) }}
{{ $hasSidebar := or ($hasToc) (.Params.series) }}
<div class="grid grid-cols-2 gap-4 lg:grid-cols-8 lg:pt-12">
<div
class="{{ if not $hasSidebar }}
{{- print "lg:col-start-2" -}}
{{ end }} bg-secondary-bg col-span-2 rounded px-6 py-8 lg:col-span-6"
>
{{ partial "components/post-article" . }}
{{ with .GetTerms "tags" }}
{{ partial "components/post-tags" . }}
{{ end }}
{{ partial "components/post-edit" . }}
{{ with .GetTerms "authors" }}
{{ partial "components/post-author" . }}
{{ end }}
{{ partial "components/post-footer" . }}
{{ partial "comment.html" . }}
</div>
{{ if $hasSidebar }}
<div class="col-span-2">
{{ if .GetTerms "series" }}
{{ partial "components/post-series" . }}
{{ end }}
{{ if $hasToc }}
{{ partial "components/post-toc" . }}
{{ end }}
</div>
{{ end }}
{{ $related := .Site.RegularPages.Related . | first 6 }}
{{ with $related }}
<div
class="{{ if not $hasSidebar }}
{{- print "lg:col-start-2" -}}
{{ end }} bg-secondary-bg prose col-span-2 rounded p-6 lg:col-span-6"
>
<h3>{{ i18n "seeAlso" }}</h3>
{{ range . }}
<a href="{{ .Permalink }}" class="no-underline">{{ .LinkTitle }}</a>
<br />
{{ end }}
</div>
{{ end }}
</div>
{{/* highlight.js */}}
{{- if eq .Site.Params.highlight.handler "highlightjs" }}
<script>
document.addEventListener("DOMContentLoaded", () => {
hljs.highlightAll();
});
</script>
{{- end }}
{{ end }}
|