103 lines
No EOL
3.4 KiB
HTML
103 lines
No EOL
3.4 KiB
HTML
{{- define "head" }}
|
|
{{- end }}
|
|
|
|
{{- define "body" }}
|
|
<body class="layout-_default-single">
|
|
{{ partial "site-header.html" . }}
|
|
<main id="main">
|
|
{{ "<!-- begin article -->" | safeHTML }}
|
|
<article class="page h-entry hentry" {{- if .Param "autonumbering" }} autonumbering {{- end }}{{- if .Param "toc" }} has-toc {{- end }}>
|
|
<header class="page-header section">
|
|
<div class="container">
|
|
{{ with .Title | safeHTML }}<h1 class="page-title p-name entry-title">{{.}}</h1>{{ end }}
|
|
{{- if isset .Params "summary" }}{{/* only use explicitly-set summaries, not auto-generated ones */}}
|
|
{{ with .Summary | safeHTML }}<p class="page-summary p-summary entry-summary">{{.}}</p>{{ end }}
|
|
{{- end }}
|
|
{{- with (index .Site.Data.people "trwnh.com").a }}{{/* TODO: make author a variable instead of assuming it's always me. also maybe support multiple authors */}}
|
|
<p class="page-author p-author">
|
|
<span style="display: none">Written by </span>
|
|
{{- partial "mf2/h-card.html" . }}
|
|
</p>
|
|
{{- end }}
|
|
{{- with .Date }}
|
|
<p class="page-date">
|
|
Published <time class="dt-published published" datetime="{{.Format "2006-01-02T15:04:05-07:00"}}"><span class="time">{{ .Format "3:04 PM MST (-07:00)" }}</span> on <span class="date">{{ .Format "Mon Jan 2, 2006"}}</span></time>
|
|
</p>
|
|
{{- end }}
|
|
{{- with .Params.inReplyTo }}
|
|
{{- range . }}
|
|
{{- if .}}
|
|
{{- $name := or .name "[link]" }}
|
|
{{- $href := "" }}
|
|
{{- if .pageRef }}
|
|
{{- $href = ref $ .pageRef }}
|
|
{{- else }}
|
|
{{- $href = .url }}
|
|
{{- end }}
|
|
{{- partial "mf2/u-in-reply-to.html" . }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|
|
<a href="#end-of-header" class="skip-syndication" aria-label="Skip syndication information"></a>
|
|
{{- with .Permalink }}
|
|
<p class="page-permalink" aria-hidden="true">h-entry URL: <a class="u-url url" href="{{.}}">{{.}}</a></p>
|
|
{{- end }}
|
|
{{- with .Params.syndication }}
|
|
<aside class="page-syndication">
|
|
{{ partial "components/syndication-list.html" . }}
|
|
</aside>
|
|
{{- end }}
|
|
{{- /* {{ with .Params.source }}
|
|
{{ $type := (printf "%T" .) }}
|
|
{{ if eq $type "string"}}
|
|
{{ if (findRE "^http" .) }}
|
|
<p class="page-sourcelink"><a href="{{.}}">[source]</a></p>
|
|
{{ end}}
|
|
{{ end }}
|
|
{{ if eq $type "[]string"}}
|
|
{{ end }}
|
|
{{ end }} */}}
|
|
</div>
|
|
<hr />
|
|
<a id="end-of-header" aria-hidden="true"></a>
|
|
</header>
|
|
{{- if .Params.series }}
|
|
{{ "<!-- article aside: this article is part of a series -->" | safeHTML }}
|
|
<aside class="page-series section">
|
|
<div class="container">
|
|
{{ partial "components/series-list.html" . }}
|
|
</div>
|
|
<hr />
|
|
</aside>
|
|
{{- end }}
|
|
{{- 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="page-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` "" | safeHTML -}}
|
|
</section>
|
|
{{- end }}
|
|
</div>
|
|
</footer>
|
|
</article>
|
|
{{ "<!-- end article -->" | safeHTML }}
|
|
</main>
|
|
{{ partial "site-footer.html" . }}
|
|
</body>
|
|
{{ end }} |