Merge branch 'master' into patch-1

This commit is contained in:
Jimmy Cai 2022-06-10 20:54:44 +02:00 committed by GitHub
commit fbbe1bcd71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
36 changed files with 293 additions and 86 deletions

31
assets/scss/general.scss Normal file
View File

@ -0,0 +1,31 @@
a {
text-decoration: none;
color: var(--accent-color);
&:hover {
color: var(--accent-color-darker);
}
&.link {
box-shadow: 0px -2px 0px rgba(var(--link-background-color), var(--link-background-opacity)) inset;
transition: all 0.3s ease;
&:hover {
box-shadow: 0px calc(-1rem * var(--article-line-height)) 0px rgba(var(--link-background-color), var(--link-background-opacity-hover)) inset;
}
}
}
.section-title {
text-transform: uppercase;
margin-top: 0;
margin-bottom: 10px;
display: block;
font-size: 1.6rem;
font-weight: bold;
color: var(--body-text-color);
a {
color: var(--body-text-color);
}
}

View File

@ -72,6 +72,10 @@
a { a {
color: var(--body-text-color); color: var(--body-text-color);
} }
a.link {
box-shadow: unset;
}
} }
} }
} }
@ -166,7 +170,7 @@
} }
} }
.related-contents { .related-content {
overflow-x: auto; overflow-x: auto;
padding-bottom: 15px; padding-bottom: 15px;
@ -231,6 +235,16 @@
border-inline-start: var(--blockquote-border-size) solid var(--card-separator-color); border-inline-start: var(--blockquote-border-size) solid var(--card-separator-color);
padding: 15px calc(var(--card-padding) - var(--blockquote-border-size)); padding: 15px calc(var(--card-padding) - var(--blockquote-border-size));
background-color: var(--blockquote-background-color); background-color: var(--blockquote-background-color);
.cite {
display: block;
text-align: right;
font-size: 0.75em;
a {
text-decoration: underline;
}
}
} }
hr { hr {

View File

@ -24,36 +24,5 @@
@import "partials/layout/404.scss"; @import "partials/layout/404.scss";
@import "partials/layout/search.scss"; @import "partials/layout/search.scss";
@import "general.scss";
@import "custom.scss"; @import "custom.scss";
a {
text-decoration: none;
color: var(--accent-color);
&:hover {
color: var(--accent-color-darker);
}
&.link {
box-shadow: 0px -2px 0px rgba(var(--link-background-color), var(--link-background-opacity)) inset;
transition: all 0.3s ease;
&:hover {
box-shadow: 0px -10px 0px rgba(var(--link-background-color), var(--link-background-opacity-hover)) inset;
}
}
}
.section-title {
text-transform: uppercase;
margin-top: 0;
margin-bottom: 10px;
display: block;
font-size: 1.6rem;
font-weight: bold;
color: var(--body-text-color);
a {
color: var(--body-text-color);
}
}

View File

@ -1,6 +1,6 @@
Vibrant: Vibrant:
- src: https://cdn.jsdelivr.net/npm/node-vibrant@3.1.5/dist/vibrant.min.js - src: https://cdn.jsdelivr.net/npm/node-vibrant@3.1.6/dist/vibrant.min.js
integrity: sha256-5NovOZc4iwiAWTYIFiIM7DxKUXKWvpVEuMEPLzcm5/g= integrity: sha256-awcR2jno4kI5X0zL8ex0vi2z+KMkF24hUW8WePSA9HM=
type: script type: script
PhotoSwipe: PhotoSwipe:
@ -14,26 +14,24 @@ PhotoSwipe:
type: script type: script
defer: true defer: true
- src: https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/default-skin/default-skin.css - src: https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/default-skin/default-skin.min.css
integrity: sha256-c0uckgykQ9v5k+IqViZOZKc47Jn7KQil4/MP3ySA3F8=
type: style type: style
- src: https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe.css - src: https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe.min.css
integrity: sha256-SBLU4vv6CA6lHsZ1XyTdhyjJxCjPif/TRkjnsyGAGnE=
type: style type: style
KaTeX: KaTeX:
- src: https://cdn.jsdelivr.net/npm/katex@0.13.13/dist/katex.min.css - src: https://cdn.jsdelivr.net/npm/katex@0.15.6/dist/katex.min.css
integrity: sha384-RZU/ijkSsFbcmivfdRBQDtwuwVqK7GMOw6IMvKyeWL2K5UAlyp6WonmB8m7Jd0Hn integrity: sha256-J+iAE0sgH8QSz9hpcDxXIftnj65JEZgNhGcgReTTK9s=
type: style type: style
- src: https://cdn.jsdelivr.net/npm/katex@0.13.13/dist/katex.min.js - src: https://cdn.jsdelivr.net/npm/katex@0.15.6/dist/katex.min.js
integrity: sha384-pK1WpvzWVBQiP0/GjnvRxV4mOb0oxFuyRxJlk6vVw146n3egcN5C925NCP7a7BY8 integrity: sha256-InsNdER1b2xUewP+pKCUJpkhiqwHgqiPXDlIk7GzBu4=
type: script type: script
defer: true defer: true
- src: https://cdn.jsdelivr.net/npm/katex@0.13.13/dist/contrib/auto-render.min.js - src: https://cdn.jsdelivr.net/npm/katex@0.15.6/dist/contrib/auto-render.min.js
integrity: sha384-vZTG03m+2yp6N6BNi5iM4rW4oIwk5DfcNdFfxkk9ZWpDriOkXX8voJBFrAO7MpVl integrity: sha256-y39Mpg7V3D4lhBX4x6O0bUqTV4pSrfgwEfGKfxkOdgI=
type: script type: script
defer: true defer: true

View File

@ -26,7 +26,7 @@ disqusShortname: hugo-theme-stack
googleAnalytics: googleAnalytics:
# Theme i18n support # Theme i18n support
# Available values: ar, ca, de, el, en, es, fr, id, it, ja, ko, nl, pt-br, th, uk, zh-cn, zh-hk, zh-tw # Available values: ar, bn, ca, de, el, en, es, fr, hu, id, it, ja, ko, nl, pt-br, th, uk, zh-cn, zh-hk, zh-tw
DefaultContentLanguage: en DefaultContentLanguage: en
# Set hasCJKLanguage to true if DefaultContentLanguage is in [zh-cn ja ko] # Set hasCJKLanguage to true if DefaultContentLanguage is in [zh-cn ja ko]
@ -97,21 +97,20 @@ params:
clientSecret: clientSecret:
autoCreateIssue: false autoCreateIssue: false
# Waline client configuration see: https://waline.js.org/en/reference/client.html # Waline client configuration see: https://waline.js.org/en/reference/component.html
waline: waline:
serverURL: serverURL:
lang: lang:
visitor: pageview:
avatar:
emoji: emoji:
- https://cdn.jsdelivr.net/gh/walinejs/emojis/weibo - https://unpkg.com/@waline/emojis@1.0.1/weibo
requiredMeta: requiredMeta:
- name - name
- email - email
- url - url
placeholder:
locale: locale:
admin: Admin admin: Admin
placeholder:
twikoo: twikoo:
envId: envId:

View File

@ -40,3 +40,24 @@ Hugo ships with several [Built-in Shortcodes](https://gohugo.io/content-manageme
## Gist Shortcode ## Gist Shortcode
{{< gist spf13 7896402 >}} {{< gist spf13 7896402 >}}
## Quote Shortcode
Stack adds a `quote` shortcode. For example:
{{< quote author="A famous person" source="The book they wrote" url="https://en.wikipedia.org/wiki/Book">}}
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
{{< /quote >}}
{{< quote source="Anonymous book" url="https://en.wikipedia.org/wiki/Book">}}
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
{{< /quote >}}
{{< quote source="Some book">}}
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
{{< /quote >}}
{{< quote author="Somebody">}}
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
{{< /quote >}}

View File

@ -23,7 +23,7 @@ article:
tableOfContents: tableOfContents:
other: جدول المحتويات other: جدول المحتويات
relatedContents: relatedContent:
other: محتوى مشابهه other: محتوى مشابهه
lastUpdatedOn: lastUpdatedOn:

73
i18n/bn.yaml Normal file
View File

@ -0,0 +1,73 @@
toggleMenu:
other: টগল মেনু
darkMode:
other: ডার্ক মোড
list:
page:
one: "{{ .Count }} পৃষ্ঠা"
other: "{{ .Count }} পৃষ্ঠা"
section:
other: অনুচ্ছেদ
subsection:
one: উপঅনুচ্ছেদ
other: উপঅনুচ্ছেদ
article:
back:
other: পেছনে যান
tableOfContents:
other: সূচিপত্র
relatedContent:
other: সম্পর্কিত বিষয়বস্তু
lastUpdatedOn:
other: শেষ হালনাগাদ করা হয়েছে
readingTime:
one: "{{ .Count }} মিনিটে পড়া যাবে"
other: "{{ .Count }} মিনিটে পড়া যাবে"
notFound:
title:
other: পাওয়া যায়নি
subtitle:
other: এই পৃষ্ঠাটি বিদ্যমান নেই
widget:
archives:
title:
other: আর্কাইভ
more:
other: আরও
tagCloud:
title:
other: ট্যাগ
categoriesCloud:
title:
other: বিভাগ
search:
title:
other: অনুসন্ধান
placeholder:
other: কিছু টাইপ করুন...
resultTitle:
other: "#PAGES_COUNT পৃষ্ঠা (#TIME_SECONDS সেকেন্ড)"
footer:
builtWith:
other: "{{ .Generator }} দিয়ে নির্মিত"
designedBy:
other: "থিম {{ .Theme }} ডিজাইন করেছেন {{ .DesignedBy }}"

View File

@ -23,7 +23,7 @@ article:
tableOfContents: tableOfContents:
other: Taula de contingut other: Taula de contingut
relatedContents: relatedContent:
other: Continguts relacionats other: Continguts relacionats
lastUpdatedOn: lastUpdatedOn:

View File

@ -23,7 +23,7 @@ article:
tableOfContents: tableOfContents:
other: Inhaltsverzeichnis other: Inhaltsverzeichnis
relatedContents: relatedContent:
other: Verwandte Inhalte other: Verwandte Inhalte
lastUpdatedOn: lastUpdatedOn:
@ -52,6 +52,10 @@ widget:
title: title:
other: Schlagwörter other: Schlagwörter
categoriesCloud:
title:
other: Kategorien
search: search:
title: title:
other: Suche other: Suche

View File

@ -23,7 +23,7 @@ article:
tableOfContents: tableOfContents:
other: Πινακας περιεχομενων other: Πινακας περιεχομενων
relatedContents: relatedContent:
other: Σχετικο περιεχομενο other: Σχετικο περιεχομενο
lastUpdatedOn: lastUpdatedOn:

View File

@ -23,8 +23,8 @@ article:
tableOfContents: tableOfContents:
other: Table of contents other: Table of contents
relatedContents: relatedContent:
other: Related contents other: Related content
lastUpdatedOn: lastUpdatedOn:
other: Last updated on other: Last updated on

View File

@ -23,7 +23,7 @@ article:
tableOfContents: tableOfContents:
other: Tabla de contenido other: Tabla de contenido
relatedContents: relatedContent:
other: Contenidos relacionados other: Contenidos relacionados
lastUpdatedOn: lastUpdatedOn:

View File

@ -23,7 +23,7 @@ article:
tableOfContents: tableOfContents:
other: Table des matières other: Table des matières
relatedContents: relatedContent:
other: Contenus liés other: Contenus liés
lastUpdatedOn: lastUpdatedOn:

73
i18n/hu.yaml Normal file
View File

@ -0,0 +1,73 @@
toggleMenu:
other: Menü Kapcsolása
darkMode:
other: Sötét Mód
list:
page:
one: "{{ .Count }} oldal"
other: "{{ .Count }} oldalak"
section:
other: Szekció
subsection:
one: Alszekció
other: Alszekciók
article:
back:
other: Vissza
tableOfContents:
other: Tartalomjegyzék
relatedContent:
other: Kapcsolódó tartalom
lastUpdatedOn:
other: Utolsó frissítés időpontja
readingTime:
one: "{{ .Count }} percnyi olvasmány"
other: "{{ .Count }} percnyi olvasmány"
notFound:
title:
other: Nem található
subtitle:
other: Ez az oldal nem létezik
widget:
archives:
title:
other: Archívum
more:
other: Több
tagCloud:
title:
other: Cimkék
categoriesCloud:
title:
other: Kategóriák
search:
title:
other: Keresés
placeholder:
other: Írj valamit...
resultTitle:
other: "#PAGES_COUNT oldal (#TIME_SECONDS másodperc alatt)"
footer:
builtWith:
other: "{{ .Generator }} használatával készült"
designedBy:
other: A {{ .Theme }} dizájnt {{ .DesignedBy }} tervezte

View File

@ -23,7 +23,7 @@ article:
tableOfContents: tableOfContents:
other: Daftar Isi other: Daftar Isi
relatedContents: relatedContent:
other: Konten terkait other: Konten terkait
lastUpdatedOn: lastUpdatedOn:

View File

@ -23,7 +23,7 @@ article:
tableOfContents: tableOfContents:
other: Indice other: Indice
relatedContents: relatedContent:
other: Contenuti correlati other: Contenuti correlati
lastUpdatedOn: lastUpdatedOn:
@ -51,6 +51,10 @@ widget:
title: title:
other: Tags other: Tags
categoriesCloud:
title:
other: Categorie
search: search:
title: title:
other: Cerca other: Cerca

View File

@ -11,7 +11,7 @@ article:
tableOfContents: tableOfContents:
other: 目次 other: 目次
relatedContents: relatedContent:
other: 関連するコンテンツ other: 関連するコンテンツ
lastUpdatedOn: lastUpdatedOn:

View File

@ -23,7 +23,7 @@ article:
tableOfContents: tableOfContents:
other: 목차 other: 목차
relatedContents: relatedContent:
other: 관련 글 other: 관련 글
lastUpdatedOn: lastUpdatedOn:

View File

@ -17,7 +17,7 @@ list:
other: Subsecties other: Subsecties
article: article:
relatedContents: relatedContent:
other: Gerelateerde inhoud other: Gerelateerde inhoud
lastUpdatedOn: lastUpdatedOn:
other: Laatst bijgewerkt op other: Laatst bijgewerkt op
@ -38,6 +38,10 @@ widget:
title: title:
other: Tags other: Tags
categoriesCloud:
title:
other: Categorie
search: search:
title: title:
other: Zoeken other: Zoeken

View File

@ -23,7 +23,7 @@ article:
tableOfContents: tableOfContents:
other: Spis treści other: Spis treści
relatedContents: relatedContent:
other: Powiązane artykuły other: Powiązane artykuły
lastUpdatedOn: lastUpdatedOn:

View File

@ -23,7 +23,7 @@ article:
tableOfContents: tableOfContents:
other: Índice other: Índice
relatedContents: relatedContent:
other: Conteúdo relacionado other: Conteúdo relacionado
lastUpdatedOn: lastUpdatedOn:

View File

@ -23,7 +23,7 @@ list:
article: article:
back: back:
other: Назад other: Назад
relatedContents: relatedContent:
other: Также рекомендуем other: Также рекомендуем
lastUpdatedOn: lastUpdatedOn:
other: Обновлено other: Обновлено

View File

@ -23,7 +23,7 @@ article:
tableOfContents: tableOfContents:
other: สารบัญ other: สารบัญ
relatedContents: relatedContent:
other: เนื้อหาคล้ายคลึงกัน other: เนื้อหาคล้ายคลึงกัน
lastUpdatedOn: lastUpdatedOn:

View File

@ -17,7 +17,7 @@ list:
other: Alt bölümler other: Alt bölümler
article: article:
relatedContents: relatedContent:
other: Alakalı içerikler other: Alakalı içerikler
lastUpdatedOn: lastUpdatedOn:
other: Son güncelleme other: Son güncelleme

View File

@ -24,7 +24,7 @@ article:
tableOfContents: tableOfContents:
other: Зміст other: Зміст
relatedContents: relatedContent:
other: Схожі матеріали other: Схожі матеріали
lastUpdatedOn: lastUpdatedOn:

View File

@ -11,7 +11,7 @@ article:
tableOfContents: tableOfContents:
other: 目录 other: 目录
relatedContents: relatedContent:
other: 相关文章 other: 相关文章
lastUpdatedOn: lastUpdatedOn:

View File

@ -23,7 +23,7 @@ article:
tableOfContents: tableOfContents:
other: 目錄 other: 目錄
relatedContents: relatedContent:
other: 相關內容 other: 相關內容
lastUpdatedOn: lastUpdatedOn:

View File

@ -11,7 +11,7 @@ article:
tableOfContents: tableOfContents:
other: 目錄 other: 目錄
relatedContents: relatedContent:
other: 相關文章 other: 相關文章
lastUpdatedOn: lastUpdatedOn:

View File

@ -30,7 +30,7 @@
{{ partial "article/components/links" . }} {{ partial "article/components/links" . }}
{{ end }} {{ end }}
{{ partial "article/components/related-contents" . }} {{ partial "article/components/related-content" . }}
{{ if not (eq .Params.comments false) }} {{ if not (eq .Params.comments false) }}
{{ partial "comments/include" . }} {{ partial "comments/include" . }}

View File

@ -10,7 +10,7 @@
{{- $Width := $imageRaw.Width -}} {{- $Width := $imageRaw.Width -}}
{{- $Height := $imageRaw.Height -}} {{- $Height := $imageRaw.Height -}}
{{- if (default true .Page.Site.Params.imageProcessing.cover.enabled) -}} {{- if .context.Site.Params.imageProcessing.cover.enabled -}}
{{- $thumbnail := $imageRaw.Fill .size -}} {{- $thumbnail := $imageRaw.Fill .size -}}
{{- $Permalink = $thumbnail.RelPermalink -}} {{- $Permalink = $thumbnail.RelPermalink -}}
{{- $Width = $thumbnail.Width -}} {{- $Width = $thumbnail.Width -}}

View File

@ -1,8 +1,8 @@
{{ $related := (where (.Site.RegularPages.Related .) "Params.hidden" "!=" true) | first 5 }} {{ $related := (where (.Site.RegularPages.Related .) "Params.hidden" "!=" true) | first 5 }}
{{ with $related }} {{ with $related }}
<aside class="related-contents--wrapper"> <aside class="related-content--wrapper">
<h2 class="section-title">{{ T "article.relatedContents" }}</h2> <h2 class="section-title">{{ T "article.relatedContent" }}</h2>
<div class="related-contents"> <div class="related-content">
<div class="flex article-list--tile"> <div class="flex article-list--tile">
{{ range . }} {{ range . }}
{{ partial "article-list/tile" (dict "context" . "size" "250x150" "Type" "articleList") }} {{ partial "article-list/tile" (dict "context" . "size" "250x150" "Type" "articleList") }}

View File

@ -13,7 +13,7 @@
<script> <script>
window.addEventListener('onColorSchemeChange', (e) => { window.addEventListener('onColorSchemeChange', (e) => {
if (DISQUS) { if (typeof DISQUS == 'object') {
DISQUS.reset({ DISQUS.reset({
reload: true reload: true
}); });

View File

@ -1,4 +1,4 @@
<script src="//cdn.jsdelivr.net/npm/twikoo@1.4.18/dist/twikoo.all.min.js"></script> <script src="//cdn.jsdelivr.net/npm/twikoo@1.5.11/dist/twikoo.all.min.js"></script>
<div id="tcomment"></div> <div id="tcomment"></div>
<style> <style>
.twikoo { .twikoo {

View File

@ -1,4 +1,5 @@
<script src='//cdn.jsdelivr.net/npm/@waline/client/dist/Waline.min.js'></script> <script src='//unpkg.com/@waline/client@v2/dist/waline.js'></script>
<link href='//unpkg.com/@waline/client@v2/dist/waline.css' rel='stylesheet'/>
<div id="waline" class="waline-container"></div> <div id="waline" class="waline-container"></div>
<style> <style>
.waline-container { .waline-container {
@ -6,15 +7,16 @@
border-radius: var(--card-border-radius); border-radius: var(--card-border-radius);
box-shadow: var(--shadow-l1); box-shadow: var(--shadow-l1);
padding: var(--card-padding); padding: var(--card-padding);
--waline-font-size: var(--article-font-size);
} }
.waline-container .vcount { .waline-container .wl-count {
color: var(--card-text-color-main); color: var(--card-text-color-main);
} }
</style> </style>
{{- with .Site.Params.comments.waline -}} {{- with .Site.Params.comments.waline -}}
{{- $config := dict "el" "#waline" "dark" `html[data-scheme="dark"]` -}} {{- $config := dict "el" "#waline" "dark" `html[data-scheme="dark"]` -}}
{{- $replaceKeys := dict "serverurl" "serverURL" "requiredmeta" "requiredMeta" "wordlimit" "wordLimit" "pagesize" "pageSize" "avatarcdn" "avatarCDN" "avatarforce" "avatarForce" -}} {{- $replaceKeys := dict "serverurl" "serverURL" "requiredmeta" "requiredMeta" "wordlimit" "wordLimit" "pagesize" "pageSize" "imageuploader" "imageUploader" "texrenderer" "texRenderer" -}}
{{- range $key, $val := . -}} {{- range $key, $val := . -}}
{{- if $val -}} {{- if $val -}}
@ -27,6 +29,6 @@
<script> <script>
/// Waline client configuration see: https://waline.js.org/en/reference/client.html /// Waline client configuration see: https://waline.js.org/en/reference/client.html
new Waline({{ $config | jsonify | safeJS }}); Waline.init({{ $config | jsonify | safeJS }});
</script> </script>
{{- end -}} {{- end -}}

View File

@ -0,0 +1,15 @@
<blockquote>
<p>{{ .Inner | markdownify }}</p>
{{- if or (.Get "author") (.Get "source") -}}
<span class="cite"><span></span>
{{- if .Get "author" -}}
<span>
{{- .Get "author" -}}{{- if .Get "source" -}}, {{ end -}}
</span>
{{- end -}}
{{- with .Get "url" -}}<a href="{{ . }}">{{- end -}}
<cite>{{ .Get "source" }}</cite>
{{- if .Get "url" -}}</a>{{- end -}}
</span>
{{- end -}}
</blockquote>