diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index d1d9a10..07743e1 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -1,17 +1,15 @@ name: Bug Report description: File a bug report -title: "[Bug]: " -labels: ["bug"] body: - type: markdown attributes: value: | - Thanks for taking the time to fill out this bug report! Please provide as much information as possible and make sure you have checked the [documentation](https://docs.stack.jimmycai.com/). + Thanks for taking the time to fill out this bug report! Please provide as much information as possible and make sure you have checked the [documentation](https://stack.jimmycai.com/). - type: textarea id: what-happened attributes: label: What happened? - description: Also tell us, what did you expect to happen? Please be as detailed as possible, include screenshots and any other information that might help us reproduce the problem. + description: Also tell us, what did you expect to happen? Please be as detailed as possible, including screenshots and any other information that might help us reproduce the problem. placeholder: Tell us what you see! validations: required: true @@ -55,21 +53,13 @@ body: label: Relevant log output description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks. render: shell - - type: markdown - attributes: - value: | - If the issue is not present on the [demo site](https://demo.stack.jimmycai.com), in order to better understand the problem, please provide the link to the source code of your website (not the generated HTML). - Or link to a minimal reproduction of the problem if there are sensible data. - type: input - id: bug-url + id: minimal-reproduction-url attributes: - label: Link to the page with bug - placeholder: https://demo.stack.jimmycai.com - value: https://demo.stack.jimmycai.com + label: Link to Minimal Reproducible Example + description: | + Use [CaiJimmy/hugo-theme-stack-starter](https://github.com/CaiJimmy/hugo-theme-stack-starter) to create a minimal reproduction of the problem. + A minimal reproduction is required so that others can help debug your issue. If a report is vague (e.g. just a generic error message) and has no reproduction, it may be auto-closed. + placeholder: https://github.com/username/your-repository validations: required: true - - type: input - id: source-repo - attributes: - label: Link to the source repository - placeholder: https://github.com/CaiJimmy/hugo-theme-stack 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 a041e9b..7d4722c 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 3f1fd5f..276650b 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; @@ -430,4 +435,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 75332a7..65126dc 100644 --- a/assets/scss/partials/sidebar.scss +++ b/assets/scss/partials/sidebar.scss @@ -83,6 +83,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/assets/ts/smoothAnchors.ts b/assets/ts/smoothAnchors.ts index 46a4a03..16ab6a3 100644 --- a/assets/ts/smoothAnchors.ts +++ b/assets/ts/smoothAnchors.ts @@ -21,8 +21,8 @@ function setupSmoothAnchors() { aElement.addEventListener("click", clickEvent => { clickEvent.preventDefault(); - const targetId = aElement.getAttribute("href").substring(1), - target = document.getElementById(targetId) as HTMLElement, + const targetId = decodeURI(aElement.getAttribute("href").substring(1)), + target = document.getElementById(targetId) as HTMLElement, offset = target.getBoundingClientRect().top - document.documentElement.getBoundingClientRect().top; window.history.pushState({}, "", aElement.getAttribute("href")); diff --git a/exampleSite/content/post/markdown-syntax/index.md b/exampleSite/content/post/markdown-syntax/index.md index 752a655..d710d8e 100644 --- a/exampleSite/content/post/markdown-syntax/index.md +++ b/exampleSite/content/post/markdown-syntax/index.md @@ -150,7 +150,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/exampleSite/content/post/math-typesetting/index.md b/exampleSite/content/post/math-typesetting/index.md index 48fdc79..ce8d0bf 100644 --- a/exampleSite/content/post/math-typesetting/index.md +++ b/exampleSite/content/post/math-typesetting/index.md @@ -37,11 +37,7 @@ In this example we will be using [KaTeX](https://katex.org/) ### Examples -{{< math.inline >}} -
-Inline math: \(\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…\) -
-{{ math.inline >}} +Inline math: $\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…$ Block math: $$ diff --git a/i18n/pl.yaml b/i18n/pl.yaml index 767eb64..fc27ccd 100644 --- a/i18n/pl.yaml +++ b/i18n/pl.yaml @@ -5,11 +5,15 @@ darkMode: Tryb ciemny list: page: one: "{{ .Count }} strona" + few: "{{ .Count }} strony" + many: "{{ .Count }} stron" other: "{{ .Count }} stron" section: Sekcja subsection: one: Podsekcja - other: Podsekcje + few: Podsekcje + many: Podsekcji + other: Podsekcji article: back: Wróć @@ -18,6 +22,8 @@ article: lastUpdatedOn: Ostatnio zaktualizowany readingTime: one: "Przeczytasz w {{ .Count }} minutę" + few: "Przeczytasz w {{ .Count }} minuty" + many: "Przeczytasz w {{ .Count }} minut" other: "Przeczytasz w {{ .Count }} minut" notFound: @@ -30,13 +36,20 @@ widget: more: Więcej tagCloud: title: Tagi + categoriesCloud: title: Kategorie search: title: Szukaj + placeholder: Wpisz coś... - resultTitle: "#PAGES_COUNT stron (#TIME_SECONDS sekund)" + + 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: builtWith: Zbudowano z {{ .Generator }} diff --git a/i18n/vi.yaml b/i18n/vi.yaml new file mode 100644 index 0000000..13dc624 --- /dev/null +++ b/i18n/vi.yaml @@ -0,0 +1,74 @@ +toggleMenu: + other: Hiển thị Menu + +darkMode: + other: Chế độ nền tối + +list: + page: + one: "{{ .Count }} trang" + other: "{{ .Count }} trang" + + section: + other: Section + + subsection: + one: Subsection + other: Subsections + +article: + back: + other: Trở lại + + tableOfContents: + other: Mục lục + + relatedContent: + other: Bài viết liên quan + + lastUpdatedOn: + other: Cập nhật lần cuối + + readingTime: + one: "{{ .Count }} phút đọc" + other: "{{ .Count }} phút đọc" + +notFound: + title: + other: Không tìm thấy + + subtitle: + other: Trang này không tồn tại + +widget: + archives: + title: + other: Lưu trữ + + more: + other: Còn nữa + + tagCloud: + title: + other: Nhãn dán + + categoriesCloud: + title: + other: Chuỗi bài + +search: + title: + other: Tìm kiếm + + placeholder: + other: Nhập từ khoá ... + + resultTitle: + other: "#PAGES_COUNT trang (#TIME_SECONDS giây)" + +footer: + builtWith: + other: Built with {{ .Generator }} + + designedBy: + other: Theme {{ .Theme }} thiết kế bởi {{ .DesignedBy }} diff --git a/i18n/zh-tw.yaml b/i18n/zh-tw.yaml index 8c1acee..00fa403 100644 --- a/i18n/zh-tw.yaml +++ b/i18n/zh-tw.yaml @@ -2,6 +2,18 @@ toggleMenu: 切換選單 darkMode: 夜晚模式 +list: + page: + one: "第 {{ .Count }} 頁" + other: "第 {{ .Count }} 頁" + + section: + other: 段落 + + subsection: + one: 小節 + other: 小節 + article: back: 返回 tableOfContents: 目錄 @@ -19,8 +31,14 @@ widget: more: 更多 tagCloud: title: 標籤雲 + categoriesCloud: + title: 分類 search: title: 搜尋 placeholder: 輸入關鍵字... resultTitle: "#PAGES_COUNT 個結果 (用時 #TIME_SECONDS 秒)" + +footer: + builtWith: 使用 {{ .Generator }} 建立 + designedBy: 主題 {{ .Theme }} 由 {{ .DesignedBy }} 設計 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" }} -