2024-05-06 12:00:46 +08:00
|
|
|
{{ define "main" }}
|
|
|
|
<main class="site--main">
|
2024-06-14 14:03:34 +08:00
|
|
|
<article class="post--single" itemscope="itemscope" itemtype="http://schema.org/Article"
|
|
|
|
data-id="{{ .File.UniqueID}}">
|
2024-05-06 12:00:46 +08:00
|
|
|
<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 }}
|
2024-06-14 14:03:34 +08:00
|
|
|
{{ if .Site.Params.post_view }}
|
|
|
|
<svg class="icon" viewBox="0 0 24 24" width="16" height="16" xmlns="http://www.w3.org/2000/svg">
|
|
|
|
<path fill-rule="evenodd" clip-rule="evenodd"
|
|
|
|
d="M12 9C10.3431 9 9 10.3431 9 12C9 13.6569 10.3431 15 12 15C13.6569 15 15 13.6569 15 12C15 10.3431 13.6569 9 12 9ZM11 12C11 11.4477 11.4477 11 12 11C12.5523 11 13 11.4477 13 12C13 12.5523 12.5523 13 12 13C11.4477 13 11 12.5523 11 12Z" />
|
|
|
|
<path fill-rule="evenodd" clip-rule="evenodd"
|
|
|
|
d="M21.83 11.2807C19.542 7.15186 15.8122 5 12 5C8.18777 5 4.45796 7.15186 2.17003 11.2807C1.94637 11.6844 1.94361 12.1821 2.16029 12.5876C4.41183 16.8013 8.1628 19 12 19C15.8372 19 19.5882 16.8013 21.8397 12.5876C22.0564 12.1821 22.0536 11.6844 21.83 11.2807ZM12 17C9.06097 17 6.04052 15.3724 4.09173 11.9487C6.06862 8.59614 9.07319 7 12 7C14.9268 7 17.9314 8.59614 19.9083 11.9487C17.9595 15.3724 14.939 17 12 17Z" />
|
|
|
|
</svg>
|
|
|
|
<span class="article--views"></span>
|
|
|
|
{{ end }}
|
2024-05-06 12:00:46 +08:00
|
|
|
</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>
|
2024-06-14 14:03:34 +08:00
|
|
|
{{ if .Site.Params.post_like }}
|
|
|
|
<div class="post--single__action">
|
|
|
|
<button class="button--like like-btn" aria-label="like the post">
|
|
|
|
<svg class="icon--active" viewBox="0 0 1024 1024" width="32" height="32">
|
|
|
|
<path
|
|
|
|
d="M780.8 204.8c-83.2-44.8-179.2-19.2-243.2 44.8L512 275.2 486.4 249.6c-64-64-166.4-83.2-243.2-44.8C108.8 275.2 89.6 441.6 185.6 537.6l32 32 153.6 153.6 102.4 102.4c25.6 25.6 57.6 25.6 83.2 0l102.4-102.4 153.6-153.6 32-32C934.4 441.6 915.2 275.2 780.8 204.8z">
|
|
|
|
</path>
|
|
|
|
</svg>
|
|
|
|
<svg class="icon--default" viewBox="0 0 1024 1024" width="32" height="32">
|
|
|
|
<path
|
|
|
|
d="M332.8 249.6c38.4 0 83.2 19.2 108.8 44.8L467.2 320 512 364.8 556.8 320l25.6-25.6c32-32 70.4-44.8 108.8-44.8 19.2 0 38.4 6.4 57.6 12.8 44.8 25.6 70.4 57.6 76.8 108.8 6.4 44.8-6.4 89.6-38.4 121.6L512 774.4 236.8 492.8C204.8 460.8 185.6 416 192 371.2c6.4-44.8 38.4-83.2 76.8-108.8C288 256 313.6 249.6 332.8 249.6L332.8 249.6M332.8 185.6C300.8 185.6 268.8 192 243.2 204.8 108.8 275.2 89.6 441.6 185.6 537.6l281.6 281.6C480 832 499.2 838.4 512 838.4s32-6.4 38.4-19.2l281.6-281.6c96-96 76.8-262.4-57.6-332.8-25.6-12.8-57.6-19.2-89.6-19.2-57.6 0-115.2 25.6-153.6 64L512 275.2 486.4 249.6C448 211.2 390.4 185.6 332.8 185.6L332.8 185.6z">
|
|
|
|
</path>
|
|
|
|
</svg>
|
|
|
|
<span class="count"></span>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
{{ end }}
|
2024-05-06 12:00:46 +08:00
|
|
|
<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 }}
|
2024-06-14 14:03:34 +08:00
|
|
|
{{ partial "twikoo.html" . }}
|
2024-05-06 12:00:46 +08:00
|
|
|
</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 }}
|