trwnh.com/unified.test.hugo/layouts/partials/components/article.html

31 lines
1.3 KiB
HTML
Raw Normal View History

2024-11-13 17:24:48 +00:00
{{ "<!-- begin article -->" | safeHTML }}
<article class="article h-entry hentry" {{- if .Param "autonumbering" }} autonumbering {{- end }}{{- if .Param "toc" }} has-toc {{- end }}>
{{ partial "components/article-header.html" . }}
{{ partial "components/article-series.html" . }}
{{- if .Params.toc }}
{{ "<!-- article nav/toc -->" | safeHTML }}
<input type="checkbox" id="toc-toggle">
<label for="toc-toggle" id="toc-toggle__label-show" role="button" tabindex=0>Show TOC</label>
<label for="toc-toggle" id="toc-toggle__label-hide" role="button" tabindex=0>Hide TOC</label>
{{ partial "components/table-of-contents.html" . }}
{{- end }}
{{ "<!-- article content -->" | safeHTML }}
<section class="page-content section">
<div class="container e-content entry-content hugo-content">
{{ replaceRE `(?s)<div class="footnotes".*` "" .Content | safeHTML -}}
</div>
</section>
{{ "<!-- article footer -->" | safeHTML }}
<footer class="article-footer section">
<div class="container">
<hr />
{{- with (index (.RawContent | .RenderString | findRE `(?s)<div class="footnotes".*`) 0 | safeHTML) }}
<section id="footnotes">
<h2>Footnotes</h2>
{{ . | replaceRE `<hr>\n` "" | replaceRE `&#x21a9;&#xfe0e;` "Return to text" | safeHTML -}}
</section>
{{- end }}
</div>
</footer>
</article>
{{ "<!-- end article -->" | safeHTML }}