blog/layouts/posts/single.html

83 lines
2.3 KiB
HTML
Raw Normal View History

2023-04-20 19:11:41 +00:00
{{- define "title" }}
{{ .Title }} -
{{- end -}}
2021-11-01 03:45:54 +00:00
{{- define "headExtra" -}}
<meta name="description" content="{{ .Summary }}" />
2021-11-01 04:17:12 +00:00
<meta property="og:title" content="{{ .Site.Title }}: {{ .Title }}" />
2021-11-01 04:13:00 +00:00
<meta property="og:url" content="{{ .Permalink }}" />
2021-11-01 04:08:54 +00:00
<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" }}" />
2021-11-01 03:45:54 +00:00
{{- end -}}
2020-11-03 22:14:45 +00:00
{{- define "content" -}}
2022-02-02 10:26:08 +00:00
<h1 class="post-title">{{ .Title }}</h1>
2020-11-03 22:14:45 +00:00
2022-02-08 22:29:18 +00:00
<span class="tags">
2023-04-20 20:58:15 +00:00
{{ if .Draft }}
<a href="/drafts" class="tag draft">
<i class="fa fa-warning" aria-hidden="true"></i>
<span class="text">draft</span>
</a>
{{ end }}
2022-02-08 22:29:18 +00:00
{{ range .Params.tags }}
<a href="/tags/{{ . }}" class="tag">
2022-11-11 02:33:30 +00:00
<i class="fa fa-tag" aria-hidden="true"></i>
2022-02-08 22:29:18 +00:00
<span class="text">{{ . }}</span>
</a>
{{ end }}
</span>
2020-11-03 22:14:45 +00:00
<small style="display: block; margin-bottom: 20px;">
Posted
2021-11-01 03:36:32 +00:00
on {{ .Date.Format "Mon Jan 02, 2006" }}
2020-11-03 22:14:45 +00:00
- {{ .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 }}
">
2022-02-02 09:16:56 +00:00
{{ if .Params.toc }}
<div class="toc-drawer">
<details>
<summary>Table of Contents</summary>
{{ .TableOfContents }}
</details>
</div>
2022-07-19 08:49:38 +00:00
<!-- <div class="toc-list"> {{ .TableOfContents }} </div> -->
2022-02-02 09:16:56 +00:00
{{ end }}
<div id="content" class="post-content">{{ .Content }}</div>
2021-07-06 05:52:05 +00:00
</div>
2020-11-03 22:14:45 +00:00
2023-04-20 19:11:41 +00:00
<hr class="endline" />
2020-11-03 22:14:45 +00:00
<small>
2021-08-30 07:52:21 +00:00
Thanks for reading!
2022-02-02 09:16:56 +00:00
2023-04-20 19:11:41 +00:00
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>.
2020-11-03 22:14:45 +00:00
</small>
{{- end -}}