mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2025-04-29 20:13:31 +08:00
Merge branch 'master' into drop-non-extended
This commit is contained in:
commit
d595e8feff
9
assets/icons/date.svg
Normal file
9
assets/icons/date.svg
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-calendar-time" width="56" height="56" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||||
|
<path stroke="none" d="M0 0h24v24H0z"/>
|
||||||
|
<path d="M11.795 21h-6.795a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v4" />
|
||||||
|
<circle cx="18" cy="18" r="4" />
|
||||||
|
<path d="M15 3v4" />
|
||||||
|
<path d="M7 3v4" />
|
||||||
|
<path d="M3 11h16" />
|
||||||
|
<path d="M18 16.496v1.504l1 1" />
|
||||||
|
</svg>
|
After Width: | Height: | Size: 508 B |
@ -95,7 +95,9 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
color: var(--card-text-color-tertiary);
|
color: var(--card-text-color-tertiary);
|
||||||
|
gap: 15px;
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
|
||||||
svg {
|
svg {
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
@ -108,6 +110,11 @@
|
|||||||
time {
|
time {
|
||||||
font-size: 1.4rem;
|
font-size: 1.4rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
& > div {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.article-category,
|
.article-category,
|
||||||
|
@ -70,6 +70,12 @@
|
|||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
text-transform: unset;
|
text-transform: unset;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.article-copyright {
|
||||||
|
a {
|
||||||
|
color: var(--body-text-color);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -185,32 +191,40 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
color: var(--card-text-color-main);
|
color: var(--card-text-color-main);
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
#TableOfContents {
|
#TableOfContents {
|
||||||
ol {
|
overflow-x: auto;
|
||||||
counter-reset: item;
|
max-height: 75vh;
|
||||||
list-style-type: none;
|
|
||||||
padding: 0;
|
ol,
|
||||||
|
ul {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
& > li {
|
ol {
|
||||||
padding: 0;
|
list-style-type: none;
|
||||||
margin: 0;
|
counter-reset: item;
|
||||||
|
|
||||||
|
li:before {
|
||||||
|
counter-increment: item;
|
||||||
|
content: counters(item, ".") ". ";
|
||||||
|
font-weight: bold;
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
& > ul {
|
||||||
|
padding: 0 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
li {
|
li {
|
||||||
margin: 15px 20px;
|
margin: 15px 20px;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
|
|
||||||
&::before {
|
& > ol,
|
||||||
counter-increment: item;
|
& > ul {
|
||||||
content: counters(item, ".") ". ";
|
|
||||||
font-weight: bold;
|
|
||||||
margin-right: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
& > ol {
|
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
padding-left: 10px;
|
padding-left: 10px;
|
||||||
margin-bottom: -5px;
|
margin-bottom: -5px;
|
||||||
@ -379,7 +393,8 @@
|
|||||||
padding-bottom: 56.25%;
|
padding-bottom: 56.25%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
& > iframe {
|
& > iframe,
|
||||||
|
& > video {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
@ -23,16 +23,16 @@ PhotoSwipe:
|
|||||||
type: style
|
type: style
|
||||||
|
|
||||||
KaTeX:
|
KaTeX:
|
||||||
- src: https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/katex.min.css
|
- src: https://cdn.jsdelivr.net/npm/katex@0.13.13/dist/katex.min.css
|
||||||
integrity: sha384-AfEj0r4/OFrOo5t7NnNe46zW/tFgW6x/bCJG8FqQCEo3+Aro6EYUG4+cU+KJWu/X
|
integrity: sha384-RZU/ijkSsFbcmivfdRBQDtwuwVqK7GMOw6IMvKyeWL2K5UAlyp6WonmB8m7Jd0Hn
|
||||||
type: style
|
type: style
|
||||||
|
|
||||||
- src: https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/katex.min.js
|
- src: https://cdn.jsdelivr.net/npm/katex@0.13.13/dist/katex.min.js
|
||||||
integrity: sha384-g7c+Jr9ZivxKLnZTDUhnkOnsh30B4H0rpLUpJ4jAIKs4fnJI+sEnkvrMWph2EDg4
|
integrity: sha384-pK1WpvzWVBQiP0/GjnvRxV4mOb0oxFuyRxJlk6vVw146n3egcN5C925NCP7a7BY8
|
||||||
type: script
|
type: script
|
||||||
defer: true
|
defer: true
|
||||||
|
|
||||||
- src: https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/contrib/auto-render.min.js
|
- src: https://cdn.jsdelivr.net/npm/katex@0.13.13/dist/contrib/auto-render.min.js
|
||||||
integrity: sha384-mll67QQFJfxn0IYznZYonOWZ644AWYC+Pt2cHqMaRhXVrursRwvLnLaebdGIlYNa
|
integrity: sha384-vZTG03m+2yp6N6BNi5iM4rW4oIwk5DfcNdFfxkk9ZWpDriOkXX8voJBFrAO7MpVl
|
||||||
type: script
|
type: script
|
||||||
defer: true
|
defer: true
|
||||||
|
@ -11,7 +11,7 @@ disqusShortname: hugo-theme-stack
|
|||||||
googleAnalytics:
|
googleAnalytics:
|
||||||
|
|
||||||
# Theme i18n support
|
# Theme i18n support
|
||||||
# Available values: en, fr, id, ja, ko, pt-br, zh-cn, es, de, nl
|
# Available values: en, fr, id, ja, ko, pt-br, zh-cn, es, de, nl, it
|
||||||
DefaultContentLanguage: en
|
DefaultContentLanguage: en
|
||||||
|
|
||||||
permalinks:
|
permalinks:
|
||||||
@ -37,12 +37,14 @@ params:
|
|||||||
emoji: 🍥
|
emoji: 🍥
|
||||||
subtitle: Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
subtitle: Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
||||||
avatar:
|
avatar:
|
||||||
|
enabled: true
|
||||||
local: true
|
local: true
|
||||||
src: img/avatar.png
|
src: img/avatar.png
|
||||||
|
|
||||||
article:
|
article:
|
||||||
math: false
|
math: false
|
||||||
toc: true
|
toc: true
|
||||||
|
readingTime: true
|
||||||
license:
|
license:
|
||||||
enabled: true
|
enabled: true
|
||||||
default: Licensed under CC BY-NC-SA 4.0
|
default: Licensed under CC BY-NC-SA 4.0
|
||||||
@ -85,6 +87,12 @@ params:
|
|||||||
locale:
|
locale:
|
||||||
admin: Admin
|
admin: Admin
|
||||||
|
|
||||||
|
twikoo:
|
||||||
|
envId:
|
||||||
|
region:
|
||||||
|
path:
|
||||||
|
lang:
|
||||||
|
|
||||||
widgets:
|
widgets:
|
||||||
enabled:
|
enabled:
|
||||||
- search
|
- search
|
||||||
|
@ -29,6 +29,11 @@ article:
|
|||||||
lastUpdatedOn:
|
lastUpdatedOn:
|
||||||
other: Last updated on
|
other: Last updated on
|
||||||
|
|
||||||
|
readingTime:
|
||||||
|
one: "{{ .Count }} min read"
|
||||||
|
### Seems that there's no need to add 's' even if it's plural in English
|
||||||
|
other: "{{ .Count }} min read"
|
||||||
|
|
||||||
notFound:
|
notFound:
|
||||||
title:
|
title:
|
||||||
other: Not Found
|
other: Not Found
|
||||||
|
35
i18n/id.yaml
35
i18n/id.yaml
@ -1,24 +1,52 @@
|
|||||||
toggleMenu:
|
toggleMenu:
|
||||||
other: Tampilkan Menu
|
other: Tampilkan Menu
|
||||||
|
|
||||||
|
darkMode:
|
||||||
|
other: Mode Gelap
|
||||||
|
|
||||||
|
list:
|
||||||
|
page:
|
||||||
|
one: "{{ .Count }} halaman"
|
||||||
|
other: "{{ .Count }} halaman"
|
||||||
|
|
||||||
|
section:
|
||||||
|
other: Bagian
|
||||||
|
|
||||||
|
subsection:
|
||||||
|
one: Subbagian
|
||||||
|
other: Subbagian
|
||||||
|
|
||||||
article:
|
article:
|
||||||
|
back:
|
||||||
|
other: Kembali
|
||||||
|
|
||||||
|
tableOfContents:
|
||||||
|
other: Daftar Isi
|
||||||
|
|
||||||
relatedContents:
|
relatedContents:
|
||||||
other: Konten terkait
|
other: Konten terkait
|
||||||
|
|
||||||
lastUpdatedOn:
|
lastUpdatedOn:
|
||||||
other: Terakhir diperbarui pada
|
other: Terakhir diperbarui pada
|
||||||
|
|
||||||
|
readingTime:
|
||||||
|
one: "Waktu Membaca: {{ .Count }} menit"
|
||||||
|
other: "Waktu Membaca: {{ .Count }} menit"
|
||||||
|
|
||||||
notFound:
|
notFound:
|
||||||
title:
|
title:
|
||||||
other: Not Found
|
other: Tidak ditemukan
|
||||||
subtitle:
|
subtitle:
|
||||||
other: Halaman ini tidak ada.
|
other: Halaman yang Anda akses tidak ditemukan.
|
||||||
|
|
||||||
widget:
|
widget:
|
||||||
archives:
|
archives:
|
||||||
title:
|
title:
|
||||||
other: Arsip
|
other: Arsip
|
||||||
|
|
||||||
more:
|
more:
|
||||||
other: Lebih
|
other: Lebih
|
||||||
|
|
||||||
tagCloud:
|
tagCloud:
|
||||||
title:
|
title:
|
||||||
other: Tag
|
other: Tag
|
||||||
@ -26,13 +54,16 @@ widget:
|
|||||||
search:
|
search:
|
||||||
title:
|
title:
|
||||||
other: Cari
|
other: Cari
|
||||||
|
|
||||||
placeholder:
|
placeholder:
|
||||||
other: Ketik sesuatu...
|
other: Ketik sesuatu...
|
||||||
|
|
||||||
resultTitle:
|
resultTitle:
|
||||||
other: "#PAGES_COUNT halaman (#TIME_SECONDS detik)"
|
other: "#PAGES_COUNT halaman (#TIME_SECONDS detik)"
|
||||||
|
|
||||||
footer:
|
footer:
|
||||||
builtWith:
|
builtWith:
|
||||||
other: Dibangun dengan {{ .Generator }}
|
other: Dibangun dengan {{ .Generator }}
|
||||||
|
|
||||||
designedBy:
|
designedBy:
|
||||||
other: Tema {{ .Theme }} dirancang oleh {{ .DesignedBy }}
|
other: Tema {{ .Theme }} dirancang oleh {{ .DesignedBy }}
|
||||||
|
69
i18n/it.yaml
Normal file
69
i18n/it.yaml
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
toggleMenu:
|
||||||
|
other: Toggle Menu
|
||||||
|
|
||||||
|
darkMode:
|
||||||
|
other: Dark Mode
|
||||||
|
|
||||||
|
list:
|
||||||
|
page:
|
||||||
|
one: "{{ .Count }} pagina"
|
||||||
|
other: "{{ .Count }} pagine"
|
||||||
|
|
||||||
|
section:
|
||||||
|
other: Sezione
|
||||||
|
|
||||||
|
subsection:
|
||||||
|
one: Sottosezione
|
||||||
|
other: Sottosezioni
|
||||||
|
|
||||||
|
article:
|
||||||
|
back:
|
||||||
|
other: Indietro
|
||||||
|
|
||||||
|
tableOfContents:
|
||||||
|
other: Indice
|
||||||
|
|
||||||
|
relatedContents:
|
||||||
|
other: Contenuti correlati
|
||||||
|
|
||||||
|
lastUpdatedOn:
|
||||||
|
other: Aggiornato il
|
||||||
|
|
||||||
|
readingTime:
|
||||||
|
one: "{{ .Count }} min per leggere"
|
||||||
|
other: "{{ .Count }} min per leggere"
|
||||||
|
|
||||||
|
notFound:
|
||||||
|
title:
|
||||||
|
other: Non trovato
|
||||||
|
subtitle:
|
||||||
|
other: Questa pagina non esiste.
|
||||||
|
|
||||||
|
widget:
|
||||||
|
archives:
|
||||||
|
title:
|
||||||
|
other: Archivi
|
||||||
|
|
||||||
|
more:
|
||||||
|
other: Di più
|
||||||
|
|
||||||
|
tagCloud:
|
||||||
|
title:
|
||||||
|
other: Tags
|
||||||
|
|
||||||
|
search:
|
||||||
|
title:
|
||||||
|
other: Cerca
|
||||||
|
|
||||||
|
placeholder:
|
||||||
|
other: Scrivi qualcosa...
|
||||||
|
|
||||||
|
resultTitle:
|
||||||
|
other: "#PAGES_COUNT pagine (#TIME_SECONDS secondi)"
|
||||||
|
|
||||||
|
footer:
|
||||||
|
builtWith:
|
||||||
|
other: Realizzato con {{ .Generator }}
|
||||||
|
|
||||||
|
designedBy:
|
||||||
|
other: Tema {{ .Theme }} realizzato da {{ .DesignedBy }}
|
@ -17,6 +17,9 @@ article:
|
|||||||
lastUpdatedOn:
|
lastUpdatedOn:
|
||||||
other: 最終更新
|
other: 最終更新
|
||||||
|
|
||||||
|
readingTime:
|
||||||
|
other: "読了時間: {{ .Count }}分"
|
||||||
|
|
||||||
notFound:
|
notFound:
|
||||||
title:
|
title:
|
||||||
other: 404 Not Found
|
other: 404 Not Found
|
||||||
|
@ -21,10 +21,14 @@ list:
|
|||||||
other: Подразделы
|
other: Подразделы
|
||||||
|
|
||||||
article:
|
article:
|
||||||
|
back:
|
||||||
|
other: Назад
|
||||||
relatedContents:
|
relatedContents:
|
||||||
other: Также рекомендуем
|
other: Также рекомендуем
|
||||||
lastUpdatedOn:
|
lastUpdatedOn:
|
||||||
other: Обновлено
|
other: Обновлено
|
||||||
|
tableOfContents:
|
||||||
|
other: Содержание
|
||||||
|
|
||||||
notFound:
|
notFound:
|
||||||
title:
|
title:
|
||||||
|
@ -17,6 +17,9 @@ article:
|
|||||||
lastUpdatedOn:
|
lastUpdatedOn:
|
||||||
other: 最后更新于
|
other: 最后更新于
|
||||||
|
|
||||||
|
readingTime:
|
||||||
|
other: "阅读时长: {{ .Count }} 分钟"
|
||||||
|
|
||||||
notFound:
|
notFound:
|
||||||
title:
|
title:
|
||||||
other: 404 错误
|
other: 404 错误
|
||||||
|
@ -21,12 +21,25 @@
|
|||||||
</h3>
|
</h3>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{- if not .Date.IsZero -}}
|
{{ if or (not .Date.IsZero) (.Site.Params.article.readingTime) }}
|
||||||
<footer class="article-time">
|
<footer class="article-time">
|
||||||
{{ partial "helper/icon" "clock" }}
|
{{ if not .Date.IsZero }}
|
||||||
|
<div>
|
||||||
|
{{ partial "helper/icon" "date" }}
|
||||||
<time class="article-time--published">
|
<time class="article-time--published">
|
||||||
{{- .Date.Format (or .Site.Params.dateFormat.published "Jan 02, 2006") -}}
|
{{- .Date.Format (or .Site.Params.dateFormat.published "Jan 02, 2006") -}}
|
||||||
</time>
|
</time>
|
||||||
</footer>
|
</div>
|
||||||
{{- end -}}
|
{{ end }}
|
||||||
|
|
||||||
|
{{ if .Site.Params.article.readingTime }}
|
||||||
|
<div>
|
||||||
|
{{ partial "helper/icon" "clock" }}
|
||||||
|
<time class="article-time--reading">
|
||||||
|
{{ T "article.readingTime" .ReadingTime }}
|
||||||
|
</time>
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
</footer>
|
||||||
|
{{ end }}
|
||||||
</div>
|
</div>
|
@ -4,7 +4,7 @@
|
|||||||
{{ if and (.Site.Params.article.license.enabled) (not (eq .Params.license false)) }}
|
{{ if and (.Site.Params.article.license.enabled) (not (eq .Params.license false)) }}
|
||||||
<section class="article-copyright">
|
<section class="article-copyright">
|
||||||
{{ partial "helper/icon" "copyright" }}
|
{{ partial "helper/icon" "copyright" }}
|
||||||
<span>{{ default .Site.Params.article.license.default .Params.license }}</span>
|
<span>{{ default .Site.Params.article.license.default .Params.license | markdownify }}</span>
|
||||||
</section>
|
</section>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
49
layouts/partials/comments/provider/twikoo.html
Normal file
49
layouts/partials/comments/provider/twikoo.html
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
<script src="//cdn.jsdelivr.net/npm/twikoo@1.4.3/dist/twikoo.all.min.js"></script>
|
||||||
|
<div id="tcomment"></div>
|
||||||
|
<style>
|
||||||
|
.twikoo {
|
||||||
|
background-color: var(--card-background);
|
||||||
|
border-radius: var(--card-border-radius);
|
||||||
|
box-shadow: var(--shadow-l1);
|
||||||
|
padding: var(--card-padding);
|
||||||
|
}
|
||||||
|
:root[data-scheme="dark"] {
|
||||||
|
--twikoo-body-text-color-main: rgba(255, 255, 255, 0.9);
|
||||||
|
--twikoo-body-text-color: rgba(255, 255, 255, 0.7);
|
||||||
|
}
|
||||||
|
.twikoo .el-input-group__prepend,
|
||||||
|
.twikoo .tk-action-icon,
|
||||||
|
.twikoo .tk-time,
|
||||||
|
.twikoo .tk-comments-count {
|
||||||
|
color: var(--twikoo-body-text-color);
|
||||||
|
}
|
||||||
|
.twikoo .el-input__inner,
|
||||||
|
.twikoo .el-textarea__inner,
|
||||||
|
.twikoo .tk-preview-container,
|
||||||
|
.twikoo .tk-content,
|
||||||
|
.twikoo .tk-nick,
|
||||||
|
.twikoo .tk-send {
|
||||||
|
color: var(--twikoo-body-text-color-main);
|
||||||
|
}
|
||||||
|
.twikoo .el-button{
|
||||||
|
color: var(--twikoo-body-text-color)!important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
{{- with .Site.Params.comments.twikoo -}}
|
||||||
|
<script>
|
||||||
|
twikoo.init({
|
||||||
|
envId: '{{- .envId -}}',
|
||||||
|
el: '#tcomment',
|
||||||
|
{{- with .region -}}
|
||||||
|
region: '{{- . -}}',
|
||||||
|
{{- end -}}
|
||||||
|
{{- with .path -}}
|
||||||
|
path: '{{- . -}}',
|
||||||
|
{{- end -}}
|
||||||
|
{{- with .lang -}}
|
||||||
|
lang: '{{- . -}}',
|
||||||
|
{{- end -}}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
{{- end -}}
|
@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
<header class="site-info">
|
<header class="site-info">
|
||||||
{{ with .Site.Params.sidebar.avatar }}
|
{{ with .Site.Params.sidebar.avatar }}
|
||||||
|
{{ if (default true .enabled) }}
|
||||||
<figure class="site-avatar">
|
<figure class="site-avatar">
|
||||||
{{ if not .local }}
|
{{ if not .local }}
|
||||||
<img src="{{ .src }}" width="300" height="300" class="site-logo" loading="lazy" alt="Avatar">
|
<img src="{{ .src }}" width="300" height="300" class="site-logo" loading="lazy" alt="Avatar">
|
||||||
@ -27,6 +28,7 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
</figure>
|
</figure>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
<h1 class="site-name"><a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a></h1>
|
<h1 class="site-name"><a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a></h1>
|
||||||
<h2 class="site-description">{{ .Site.Params.sidebar.subtitle }}</h2>
|
<h2 class="site-description">{{ .Site.Params.sidebar.subtitle }}</h2>
|
||||||
</header>
|
</header>
|
||||||
|
13
layouts/shortcodes/video.html
Normal file
13
layouts/shortcodes/video.html
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<div class="video-wrapper">
|
||||||
|
<video
|
||||||
|
controls
|
||||||
|
{{ with .Get "poster" }}poster="{{- . -}}"{{ end }}
|
||||||
|
{{ with .Get "src" }}src="{{- . -}}"{{ end }}
|
||||||
|
{{ with .Get "autoplay" }}autoplay{{ end }}
|
||||||
|
>
|
||||||
|
<p>
|
||||||
|
Your browser doesn't support HTML5 video. Here is a
|
||||||
|
<a href="{{ with .Get "src" }}{{- . -}}{{ end }}">link to the video</a> instead.
|
||||||
|
</p>
|
||||||
|
</video>
|
||||||
|
</div>
|
Loading…
Reference in New Issue
Block a user