diff --git a/README.md b/README.md index 121ea55..b071761 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Use this template: [CaiJimmy/hugo-theme-stack-starter](https://github.com/CaiJim ## Demo -* Stater template demo: [demo.stack.jimmycai.com](https://demo.stack.jimmycai.com) +* Starter template demo: [demo.stack.jimmycai.com](https://demo.stack.jimmycai.com) * Dev build: [dev.stack.jimmycai.com](https://dev.stack.jimmycai.com) ## Documentation diff --git a/assets/scss/partials/article.scss b/assets/scss/partials/article.scss index f085ff0..2c3a7af 100644 --- a/assets/scss/partials/article.scss +++ b/assets/scss/partials/article.scss @@ -92,16 +92,15 @@ .article-time, .article-translations { display: flex; - align-items: center; color: var(--card-text-color-tertiary); gap: 15px; - flex-wrap: wrap; svg { vertical-align: middle; width: 20px; height: 20px; stroke-width: 1.33; + flex-shrink: 0; } time, @@ -117,6 +116,16 @@ } } +.article-time { + flex-wrap: wrap; +} + +.article-translations { + & > div { + flex-wrap: wrap; + } +} + .article-category, .article-tags { display: flex; diff --git a/assets/scss/partials/layout/article.scss b/assets/scss/partials/layout/article.scss index 97c7e77..73757e4 100644 --- a/assets/scss/partials/layout/article.scss +++ b/assets/scss/partials/layout/article.scss @@ -264,6 +264,11 @@ font-family: var(--code-font-family); } + a, + code { + word-break: break-word; + } + .gallery { position: relative; display: flex; @@ -418,4 +423,14 @@ overflow-x: auto; overflow-y: hidden; } + + kbd { + border: 1px solid var(--kbd-border-color); + font-weight: bold; + font-size: 0.9em; + line-height: 1; + padding: 2px 4px; + border-radius: 4px; + display: inline-block; + } } diff --git a/assets/scss/partials/sidebar.scss b/assets/scss/partials/sidebar.scss index 95310ca..a6a77c5 100644 --- a/assets/scss/partials/sidebar.scss +++ b/assets/scss/partials/sidebar.scss @@ -79,6 +79,7 @@ @include respond(lg) { padding-top: var(--main-top-padding); + padding-bottom: var(--main-top-padding); } } diff --git a/assets/scss/variables.scss b/assets/scss/variables.scss index afddb80..6709f0c 100644 --- a/assets/scss/variables.scss +++ b/assets/scss/variables.scss @@ -16,7 +16,7 @@ $defaultTagColors: #fff, #fff, #fff, #fff, #fff; --accent-color: #34495e; --accent-color-darker: #2c3e50; --accent-color-text: #fff; - --body-text-color: #bababa; + --body-text-color: #707070; --tag-border-radius: 4px; @@ -56,7 +56,7 @@ $defaultTagColors: #fff, #fff, #fff, #fff, #fff; --card-text-color-main: #000; --card-text-color-secondary: #747474; - --card-text-color-tertiary: #bababa; + --card-text-color-tertiary: #767676; --card-separator-color: rgba(218, 218, 218, 0.5); --card-border-radius: 10px; @@ -123,6 +123,8 @@ $defaultTagColors: #fff, #fff, #fff, #fff, #fff; --table-border-color: #dadada; --tr-even-background-color: #efefee; + --kbd-border-color: #dadada; + &[data-scheme="dark"] { --code-background-color: #272822; --code-text-color: rgba(255, 255, 255, 0.9); diff --git a/assets/ts/search.tsx b/assets/ts/search.tsx index 68db7b3..856b48d 100644 --- a/assets/ts/search.tsx +++ b/assets/ts/search.tsx @@ -227,6 +227,7 @@ class Search { Search.updateQueryString(keywords, true); if (keywords === '') { + lastSearch = ''; return this.clear(); } diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index c1b48dd..b723dea 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -3,24 +3,28 @@ languageCode: en-us theme: hugo-theme-stack paginate: 5 title: Example Site +copyright: Example Person languages: en: languageName: English title: Example Site - description: Example description weight: 1 + params: + description: Example description zh-cn: languageName: 中文 title: 演示站点 - description: 演示说明 weight: 2 + params: + description: 演示说明 ar: languageName: عربي languagedirection: rtl title: موقع تجريبي - description: وصف تجريبي weight: 3 + params: + description: وصف تجريبي # Change it to your Disqus shortname before using disqusShortname: hugo-theme-stack @@ -224,7 +228,7 @@ markup: goldmark: renderer: ## Set to true if you have HTML content inside Markdown - unsafe: false + unsafe: true tableOfContents: endLevel: 4 ordered: true diff --git a/exampleSite/content/post/markdown-syntax/index.md b/exampleSite/content/post/markdown-syntax/index.md index 0254cca..c584c4c 100644 --- a/exampleSite/content/post/markdown-syntax/index.md +++ b/exampleSite/content/post/markdown-syntax/index.md @@ -159,7 +159,7 @@ H2O Xn + Yn = Zn -Press CTRL+ALT+Delete to end the session. +Press CTRL + ALT + Delete to end the session. Most salamanders are nocturnal, and hunt for insects, worms, and other small creatures. diff --git a/i18n/pl.yaml b/i18n/pl.yaml index cc5aed6..7dddbb1 100644 --- a/i18n/pl.yaml +++ b/i18n/pl.yaml @@ -7,6 +7,8 @@ darkMode: list: page: one: "{{ .Count }} strona" + few: "{{ .Count }} strony" + many: "{{ .Count }} stron" other: "{{ .Count }} stron" section: @@ -14,7 +16,9 @@ list: subsection: one: Podsekcja - other: Podsekcje + few: Podsekcje + many: Podsekcji + other: Podsekcji article: back: @@ -28,9 +32,11 @@ article: lastUpdatedOn: other: Ostatnio zaktualizowany - + readingTime: one: "Przeczytasz w {{ .Count }} minutę" + few: "Przeczytasz w {{ .Count }} minuty" + many: "Przeczytasz w {{ .Count }} minut" other: "Przeczytasz w {{ .Count }} minut" notFound: @@ -55,6 +61,9 @@ search: other: Wpisz coś... resultTitle: + one: "#PAGES_COUNT strona (#TIME_SECONDS sekund)" + few: "#PAGES_COUNT strony (#TIME_SECONDS sekund)" + many: "#PAGES_COUNT stron (#TIME_SECONDS sekund)" other: "#PAGES_COUNT stron (#TIME_SECONDS sekund)" footer: diff --git a/i18n/zh-tw.yaml b/i18n/zh-tw.yaml index fe52c74..9a7ffc2 100644 --- a/i18n/zh-tw.yaml +++ b/i18n/zh-tw.yaml @@ -4,6 +4,18 @@ toggleMenu: darkMode: other: 夜晚模式 +list: + page: + one: "第 {{ .Count }} 頁" + other: "第 {{ .Count }} 頁" + + section: + other: 段落 + + subsection: + one: 小節 + other: 小節 + article: back: other: 返回 @@ -18,11 +30,13 @@ article: other: 最後更新 readingTime: + one: "閱讀時間: {{ .Count }} 分鐘" other: "閱讀時間: {{ .Count }} 分鐘" notFound: title: other: 404 錯誤 + subtitle: other: 頁面不存在 diff --git a/layouts/page/search.html b/layouts/page/search.html index 7c424a6..fbfb74d 100644 --- a/layouts/page/search.html +++ b/layouts/page/search.html @@ -1,11 +1,11 @@ {{ define "body-class" }}template-search{{ end }} {{ define "head" }} {{- with .OutputFormats.Get "json" -}} - + {{- end -}} {{ end }} {{ define "main" }} -
+

diff --git a/layouts/partials/article/components/math.html b/layouts/partials/article/components/math.html index d05861c..8e62151 100644 --- a/layouts/partials/article/components/math.html +++ b/layouts/partials/article/components/math.html @@ -7,6 +7,7 @@ { left: "$", right: "$", display: false }, { left: "\\(", right: "\\)", display: false }, { left: "\\[", right: "\\]", display: true } - ] + ], + ignoredClasses: ["gist"] });}) \ No newline at end of file diff --git a/layouts/partials/comments/provider/remark42.html b/layouts/partials/comments/provider/remark42.html index fa284eb..18acf1b 100644 --- a/layouts/partials/comments/provider/remark42.html +++ b/layouts/partials/comments/provider/remark42.html @@ -13,7 +13,7 @@ show_email_subscription: {{ default true .show_email_subscription }} }; - function(e, n) { + !function(e, n) { for (var o = 0; o < e.length; o++) { var r = n.createElement('script'), c = '.js', diff --git a/layouts/partials/comments/provider/twikoo.html b/layouts/partials/comments/provider/twikoo.html index 9ca3652..182500b 100644 --- a/layouts/partials/comments/provider/twikoo.html +++ b/layouts/partials/comments/provider/twikoo.html @@ -1,4 +1,4 @@ - +