blog/layouts/posts/single.html
Michael Zhang 079c2a8b38
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Proof post
2023-04-20 15:58:15 -05:00

82 lines
2.3 KiB
HTML

{{- define "title" }}
{{ .Title }} -
{{- end -}}
{{- define "headExtra" -}}
<meta name="description" content="{{ .Summary }}" />
<meta property="og:title" content="{{ .Site.Title }}: {{ .Title }}" />
<meta property="og:url" content="{{ .Permalink }}" />
<meta property="og:description" content="{{ .Summary }}" />
<meta property="og:type" content="article" />
<meta property="article:published_time" content="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}" />
{{- end -}}
{{- define "content" -}}
<h1 class="post-title">{{ .Title }}</h1>
<span class="tags">
{{ if .Draft }}
<a href="/drafts" class="tag draft">
<i class="fa fa-warning" aria-hidden="true"></i>
<span class="text">draft</span>
</a>
{{ end }}
{{ range .Params.tags }}
<a href="/tags/{{ . }}" class="tag">
<i class="fa fa-tag" aria-hidden="true"></i>
<span class="text">{{ . }}</span>
</a>
{{ end }}
</span>
<small style="display: block; margin-bottom: 20px;">
Posted
on {{ .Date.Format "Mon Jan 02, 2006" }}
- {{ .ReadingTime }} min read
</small>
{{ if .Params.language_switcher_languages }}
<div class="language_switcher_choices">
{{ range $index, $lang := .Page.Params.language_switcher_languages }}
<input
type="radio"
name="language-switcher"
class="language-switcher-choice"
id="language-switcher-{{ $lang }}"
value="{{ $lang }}"
{{ if (eq $index 0) }}
checked
{{ end }}
>
{{ end }}
</div>
{{ end }}
<div class="post-container
{{ if .Params.logseq }}logseq-post{{ end }}
">
{{ if .Params.toc }}
<div class="toc-drawer">
<details>
<summary>Table of Contents</summary>
{{ .TableOfContents }}
</details>
</div>
<!-- <div class="toc-list"> {{ .TableOfContents }} </div> -->
{{ end }}
<div id="content" class="post-content">{{ .Content }}</div>
</div>
<hr class="endline" />
<small>
Thanks for reading!
Have comments? Discuss this post by sending an email to my
<a href="https://lists.sr.ht/~mzhang/public-inbox">public inbox</a> using this
<a href="mailto:~mzhang/public-inbox@lists.sr.ht?subject=Re: {{ .Title }}">email link</a>.
</small>
{{- end -}}