2024-05-06 12:00:46 +08:00
|
|
|
{{ define "main" }}
|
|
|
|
<main class="site--main">
|
|
|
|
<article class="post--single" itemscope="itemscope" itemtype="http://schema.org/Article">
|
|
|
|
<div class="post--single__meta">
|
|
|
|
<svg class="icon" viewBox="0 0 1024 1024" width="16" height="16">
|
|
|
|
<path
|
|
|
|
d="M512 97.52381c228.912762 0 414.47619 185.563429 414.47619 414.47619s-185.563429 414.47619-414.47619 414.47619S97.52381 740.912762 97.52381 512 283.087238 97.52381 512 97.52381z m0 73.142857C323.486476 170.666667 170.666667 323.486476 170.666667 512s152.81981 341.333333 341.333333 341.333333 341.333333-152.81981 341.333333-341.333333S700.513524 170.666667 512 170.666667z m36.571429 89.697523v229.86362h160.865523v73.142857H512a36.571429 36.571429 0 0 1-36.571429-36.571429V260.388571h73.142858z">
|
|
|
|
</path>
|
|
|
|
</svg>
|
|
|
|
<time datetime='{{.Date.Format "2006-01-02 15:04:01" }}' class="humane--time" itemprop="datePublished">{{
|
|
|
|
.Date | time.Format
|
|
|
|
":date_long"
|
|
|
|
}}</time>
|
|
|
|
{{ if .Params.categories }}
|
|
|
|
<svg class="icon" viewBox="0 0 1024 1024" width="16" height="16">
|
|
|
|
<path
|
|
|
|
d="M408.551619 97.52381a73.142857 73.142857 0 0 1 51.736381 21.430857L539.306667 197.973333A73.142857 73.142857 0 0 0 591.067429 219.428571H804.571429a73.142857 73.142857 0 0 1 73.142857 73.142858v560.761904a73.142857 73.142857 0 0 1-73.142857 73.142857H219.428571a73.142857 73.142857 0 0 1-73.142857-73.142857V170.666667a73.142857 73.142857 0 0 1 73.142857-73.142857h189.123048z m0 73.142857H219.428571v682.666666h585.142858V292.571429h-213.504a146.285714 146.285714 0 0 1-98.499048-38.13181L487.619048 249.734095 408.551619 170.666667zM365.714286 633.904762v73.142857h-73.142857v-73.142857h73.142857z m365.714285 0v73.142857H414.47619v-73.142857h316.952381z m-365.714285-195.047619v73.142857h-73.142857v-73.142857h73.142857z m365.714285 0v73.142857H414.47619v-73.142857h316.952381z">
|
|
|
|
</path>
|
|
|
|
</svg>
|
|
|
|
{{ range (.GetTerms "categories") }}
|
|
|
|
<a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
|
|
</div>
|
|
|
|
<h2 class="post--single__title">{{ .Title }}</h2>
|
|
|
|
{{ if .IsTranslated }}
|
|
|
|
<div class="translatedCard">
|
|
|
|
<h4>{{ i18n "translations" }}</h4>
|
|
|
|
<ul>
|
|
|
|
{{ range .Translations }}
|
|
|
|
<li>
|
|
|
|
<a href="{{ .Permalink }}">{{ .Lang }}: {{ .Title }}{{ if .IsPage }}{{ end
|
|
|
|
}}</a>
|
|
|
|
</li>
|
|
|
|
{{ end }}
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
{{ end }}
|
|
|
|
{{- $TOCEnabled := or .Params.toc (and .Site.Params.toc (ne .Params.toc false)) -}}
|
|
|
|
{{- $hasTOC := gt (len .TableOfContents) 32 -}}
|
|
|
|
|
|
|
|
{{ if and $TOCEnabled $hasTOC -}}
|
|
|
|
<details class="toc" open>
|
|
|
|
<summary class="toc-title">{{ i18n "article.tableOfContents" }}</summary>
|
|
|
|
{{ .TableOfContents }}
|
|
|
|
</details>
|
|
|
|
{{- end }}
|
|
|
|
<div class="post--single__content graph" itemprop="articleBody">
|
|
|
|
{{ .Content }}
|
|
|
|
</div>
|
|
|
|
<div class="tag--list">
|
|
|
|
{{ range (.GetTerms "tags") }}
|
|
|
|
<a href="{{ .RelPermalink }}" class="artile--tag">{{ .LinkTitle }}</a>
|
|
|
|
{{ end }}
|
|
|
|
</div>
|
|
|
|
{{ if .Site.Params.showAuthor }}
|
|
|
|
<div class="author--card">
|
|
|
|
<img src="{{ .Site.Params.authorAvatar }}" class="avatar" height="64" width="64" decoding="async">
|
|
|
|
<div class="author--name">{{ .Site.Params.authorName }}</div>
|
|
|
|
<div class="author--description">{{ .Site.Params.authorDescription }}</div>
|
|
|
|
<div class="author--sns">
|
2024-05-06 16:34:08 +08:00
|
|
|
{{ partial "sns.html" . }}
|
2024-05-06 12:00:46 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{ end }}
|
2024-05-06 16:34:08 +08:00
|
|
|
{{ partial "category.html" . }}
|
2024-05-06 12:00:46 +08:00
|
|
|
{{ partial "related.html" . }}
|
|
|
|
{{ if .Params.twitter }}
|
|
|
|
<div class="twitter--area">
|
|
|
|
<a href="{{ .Params.twitter }}" target="_blank" class="twitter--btn">Reply on twitter</a>
|
|
|
|
</div>
|
|
|
|
{{ end }}
|
|
|
|
{{ if .Params.story_id }}
|
|
|
|
{{ partial "commentlist.html" . }}
|
|
|
|
{{ end }}
|
|
|
|
</article>
|
|
|
|
<!-- {{ if or .PrevPage .NextPage }}
|
|
|
|
<nav class="navigation post-navigation is-active">
|
|
|
|
<div class="nav-links">
|
|
|
|
{{ if .PrevPage }}
|
|
|
|
<div class="nav-previous">
|
|
|
|
<a class="link-reverse" href="{{ .PrevPage.Permalink }}?ref=footer">
|
|
|
|
<span class="meta-nav">Previous</span><span class="post-title">{{ .PrevPage.Title }}</span>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
{{ end }}
|
|
|
|
{{ if .NextPage }}
|
|
|
|
<div class="nav-next">
|
|
|
|
<a class="link-reverse" href="{{ .NextPage.Permalink }}?ref=footer">
|
|
|
|
<span class="meta-nav">Next</span><span class="post-title">{{ .NextPage.Title }}</span>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
{{ end }}
|
|
|
|
</div>
|
|
|
|
</nav>
|
|
|
|
{{ end }} -->
|
|
|
|
</main>
|
|
|
|
{{ end }}
|