2021-08-25 11:53:41 +02:00
|
|
|
<h1 class="display-4">{{ .Title }}</h1>
|
|
|
|
{{ if .Params.subtitle }}
|
2021-08-26 02:06:40 +02:00
|
|
|
<h5 class="my-3">{{ markdownify .Params.subtitle | emojify }}</h5>
|
2021-08-25 11:53:41 +02:00
|
|
|
{{ end }}
|
|
|
|
|
2021-08-24 19:49:26 +02:00
|
|
|
{{ if .IsPage }}
|
2021-08-26 02:06:40 +02:00
|
|
|
<p>{{ partial "content-details.html" . }}</p>
|
2021-08-24 19:49:26 +02:00
|
|
|
{{ end }}
|
|
|
|
|
2021-08-25 11:53:41 +02:00
|
|
|
{{ if .Content }}
|
2021-08-26 02:06:40 +02:00
|
|
|
<hr>
|
2021-08-25 11:53:41 +02:00
|
|
|
|
2021-08-26 02:06:40 +02:00
|
|
|
<div class="content mt-3">
|
|
|
|
{{ if .TableOfContents }}
|
2021-08-27 00:00:15 +02:00
|
|
|
<!-- Get the amount of headers using regex -->
|
|
|
|
{{ $headers := findRE "<h[1-6].*?>(.|\n])+?</h[1-6]>" .Content }}
|
2022-04-12 11:25:28 +02:00
|
|
|
<!-- We only need to show a table of contents if we have over 4 headers -->
|
2021-08-27 00:00:15 +02:00
|
|
|
{{ if ge (len $headers) 4 }}
|
|
|
|
<div class="float-lg-end ml-lg-3 mb-3 p-3">
|
|
|
|
{{ .TableOfContents }}
|
|
|
|
</div>
|
|
|
|
{{ end }}
|
2021-08-26 02:06:40 +02:00
|
|
|
{{ end }}
|
|
|
|
{{ .Content }}
|
2022-04-12 11:25:06 +02:00
|
|
|
|
|
|
|
|
|
|
|
<div id="sources">
|
|
|
|
{{ if .Params.Sources }}
|
|
|
|
<h2>Sources</h2>
|
|
|
|
<ul>
|
|
|
|
{{ range $i, $e := .Params.Sources }}
|
|
|
|
<li>{{ markdownify $e }}</li>
|
|
|
|
{{ end }}
|
|
|
|
</ul>
|
|
|
|
{{ end }}
|
|
|
|
</div>
|
2021-08-26 02:06:40 +02:00
|
|
|
</div>
|
2021-08-25 11:53:41 +02:00
|
|
|
{{ end }}
|