mirror of
https://github.com/davegallant/davegallant.github.io.git
synced 2025-08-07 00:58:13 +00:00
48 lines
1.2 KiB
HTML
48 lines
1.2 KiB
HTML
{{ define "main" }}
|
|
<main>
|
|
<article>
|
|
<div class="title">
|
|
<h1 class="title">{{ .Title }}</h1>
|
|
{{ if not .Params.hide_date }}
|
|
<div class="meta">Posted on {{ dateFormat "Jan 2, 2006" .Date }}{{ if .Draft }} <span class="draft-label">DRAFT</span> {{ end }}</div>
|
|
{{ end }}
|
|
</div>
|
|
{{ if isset .Params "tldr" }}
|
|
<div class="tldr">
|
|
<strong>tl;dr:</strong>
|
|
{{ .Params.tldr }}
|
|
</div>{{ end }}
|
|
|
|
<section class="body">
|
|
{{- with .Content -}}
|
|
{{ . | replaceRE "(<h[2-4] id=\"([^\"]+)\".+)(</h[2-4]+>)" `${1}<a href="#${2}" class="hanchor" ariaLabel="Anchor">#</a>${3}`| safeHTML }}
|
|
{{- end -}}
|
|
</section>
|
|
|
|
<script
|
|
type="text/javascript"
|
|
src="https://storage.ko-fi.com/cdn/widget/Widget_2.js"
|
|
></script>
|
|
<script type="text/javascript">
|
|
kofiwidget2.init("Buy me a coffee", "#a15bc2", "F1F2S4LWI");
|
|
kofiwidget2.draw();
|
|
</script>
|
|
|
|
|
|
<div class="post-tags">
|
|
{{ if ne .Type "page" }}
|
|
{{ if gt .Params.tags 0 }}
|
|
<nav class="nav tags">
|
|
<ul class="tags">
|
|
{{ range .Params.tags }}
|
|
<li><a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">{{ . }}</a></li>
|
|
{{ end }}
|
|
</ul>
|
|
</nav>
|
|
{{ end }}
|
|
{{ end }}
|
|
</div>
|
|
</article>
|
|
</main>
|
|
{{ end }}
|