From 8cb11d721f550932b3851bc7fa595d55b44faa7c Mon Sep 17 00:00:00 2001 From: Farrel Franqois Date: Mon, 19 Jul 2021 17:21:49 +0700 Subject: [PATCH 1/5] feat(i18n): Improve Indonesian translation (#265) --- i18n/id.yaml | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/i18n/id.yaml b/i18n/id.yaml index 31cea39..35a7fab 100644 --- a/i18n/id.yaml +++ b/i18n/id.yaml @@ -1,24 +1,48 @@ toggleMenu: other: Tampilkan Menu +darkMode: + other: Mode Gelap + +list: + page: + one: "{{ .Count }} halaman" + other: "{{ .Count }} halaman" + + section: + other: Bagian + + subsection: + one: Subbagian + other: Subbagian + article: + back: + other: Kembali + + tableOfContents: + other: Daftar Isi + relatedContents: other: Konten terkait + lastUpdatedOn: other: Terakhir diperbarui pada notFound: title: - other: Not Found + other: Tidak ditemukan subtitle: - other: Halaman ini tidak ada. + other: Halaman yang Anda akses tidak ditemukan. widget: archives: title: other: Arsip + more: other: Lebih + tagCloud: title: other: Tag @@ -26,13 +50,16 @@ widget: search: title: other: Cari + placeholder: other: Ketik sesuatu... + resultTitle: other: "#PAGES_COUNT halaman (#TIME_SECONDS detik)" footer: builtWith: other: Dibangun dengan {{ .Generator }} + designedBy: other: Tema {{ .Theme }} dirancang oleh {{ .DesignedBy }} From a25e6463bdc9900e5f999d276a0e5d92ee1f8d9a Mon Sep 17 00:00:00 2001 From: Hendra Manudinata <87532060+manudinath@users.noreply.github.com> Date: Fri, 23 Jul 2021 16:56:52 +0800 Subject: [PATCH 2/5] feat(sidebar): add option to disable avatar in left sidebar (#268) * Allow to disable logo image in left sidebar * Enable sidebar avatar by default for backward compatibility Co-authored-by: Jimmy Cai --- exampleSite/config.yaml | 1 + layouts/partials/sidebar/left.html | 2 ++ 2 files changed, 3 insertions(+) diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index 578c574..de5d951 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -37,6 +37,7 @@ params: emoji: 🍥 subtitle: Lorem ipsum dolor sit amet, consectetur adipiscing elit. avatar: + enabled: true local: true src: img/avatar.png diff --git a/layouts/partials/sidebar/left.html b/layouts/partials/sidebar/left.html index c7158bb..af483e3 100644 --- a/layouts/partials/sidebar/left.html +++ b/layouts/partials/sidebar/left.html @@ -7,6 +7,7 @@
{{ with .Site.Params.sidebar.avatar }} + {{ if (default true .enabled) }}
{{ if not .local }} @@ -26,6 +27,7 @@ {{ . }} {{ end }}
+ {{ end }} {{ end }}

{{ .Site.Title }}

{{ .Site.Params.sidebar.subtitle }}

From dcfc7b55895146380eabb511b5aaf9835f1f5e36 Mon Sep 17 00:00:00 2001 From: Bachrul uluum <49960993+uluumbch@users.noreply.github.com> Date: Fri, 23 Jul 2021 23:37:30 +0700 Subject: [PATCH 3/5] feat(article): reading time (#204) * add reading time feature * Revert change in jsconfig.json * feat: add article.readingTime param, and improve style * Revert change in jsconfig.json x2 * Remove reading time in compact layout It doesn't look right to me for now * feat: add i18n support to reading time string * Hide footer.article-time when there's not content Co-authored-by: Jimmy Cai --- assets/icons/date.svg | 9 +++++++ assets/scss/partials/article.scss | 7 ++++++ exampleSite/config.yaml | 1 + i18n/en.yaml | 5 ++++ .../partials/article/components/details.html | 25 ++++++++++++++----- 5 files changed, 41 insertions(+), 6 deletions(-) create mode 100644 assets/icons/date.svg diff --git a/assets/icons/date.svg b/assets/icons/date.svg new file mode 100644 index 0000000..ed92a90 --- /dev/null +++ b/assets/icons/date.svg @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/assets/scss/partials/article.scss b/assets/scss/partials/article.scss index c71cab4..459c22f 100644 --- a/assets/scss/partials/article.scss +++ b/assets/scss/partials/article.scss @@ -95,7 +95,9 @@ display: flex; align-items: center; color: var(--card-text-color-tertiary); + gap: 15px; margin-top: 10px; + flex-wrap: wrap; svg { vertical-align: middle; @@ -108,6 +110,11 @@ time { font-size: 1.4rem; } + + & > div { + display: inline-flex; + align-items: center; + } } .article-category, diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index de5d951..2ff6a1e 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -44,6 +44,7 @@ params: article: math: false toc: true + readingTime: true license: enabled: true default: Licensed under CC BY-NC-SA 4.0 diff --git a/i18n/en.yaml b/i18n/en.yaml index 21b1310..e279278 100644 --- a/i18n/en.yaml +++ b/i18n/en.yaml @@ -29,6 +29,11 @@ article: lastUpdatedOn: 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: title: other: Not Found diff --git a/layouts/partials/article/components/details.html b/layouts/partials/article/components/details.html index 5c5397b..64d6c6e 100644 --- a/layouts/partials/article/components/details.html +++ b/layouts/partials/article/components/details.html @@ -21,12 +21,25 @@ {{ end }} - {{- if not .Date.IsZero -}} + {{ if or (not .Date.IsZero) (.Site.Params.article.readingTime) }}
- {{ partial "helper/icon" "clock" }} - + {{ if not .Date.IsZero }} +
+ {{ partial "helper/icon" "date" }} + +
+ {{ end }} + + {{ if .Site.Params.article.readingTime }} +
+ {{ partial "helper/icon" "clock" }} + +
+ {{ end }}
- {{- end -}} + {{ end }} \ No newline at end of file From 44e3d20bad845a515657308d38692e7f431b4d05 Mon Sep 17 00:00:00 2001 From: Simon Guest Date: Mon, 26 Jul 2021 05:50:52 +1200 Subject: [PATCH 4/5] feat(article): use `markdownify` for licence in article (#273) * Use markdownify for licence in article So we can use links, e.g. to credits for main photo. * refactor: move .article-copyright style to partials/layout/article Co-authored-by: Jimmy Cai --- assets/scss/partials/layout/article.scss | 6 ++++++ layouts/partials/article/components/footer.html | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/assets/scss/partials/layout/article.scss b/assets/scss/partials/layout/article.scss index ebf94a7..5331a61 100644 --- a/assets/scss/partials/layout/article.scss +++ b/assets/scss/partials/layout/article.scss @@ -70,6 +70,12 @@ flex-wrap: wrap; text-transform: unset; } + + .article-copyright { + a { + color: var(--body-text-color); + } + } } } } diff --git a/layouts/partials/article/components/footer.html b/layouts/partials/article/components/footer.html index f518d76..c6a7662 100644 --- a/layouts/partials/article/components/footer.html +++ b/layouts/partials/article/components/footer.html @@ -4,7 +4,7 @@ {{ if and (.Site.Params.article.license.enabled) (not (eq .Params.license false)) }}
{{ partial "helper/icon" "copyright" }} - {{ default .Site.Params.article.license.default .Params.license }} + {{ default .Site.Params.article.license.default .Params.license | markdownify }}
{{ end }} @@ -16,4 +16,4 @@ {{- end -}} - \ No newline at end of file + From d86b857635de302d7cceb64112e68a573e17b4de Mon Sep 17 00:00:00 2001 From: zhixuan <59254886+zhixuan666@users.noreply.github.com> Date: Tue, 27 Jul 2021 03:59:24 +0900 Subject: [PATCH 5/5] chore: update `KaTeX` to 0.13.13 (#275) --- data/external.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/data/external.yaml b/data/external.yaml index 2721e76..427c8aa 100644 --- a/data/external.yaml +++ b/data/external.yaml @@ -23,16 +23,16 @@ PhotoSwipe: type: style KaTeX: - - src: https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/katex.min.css - integrity: sha384-AfEj0r4/OFrOo5t7NnNe46zW/tFgW6x/bCJG8FqQCEo3+Aro6EYUG4+cU+KJWu/X + - src: https://cdn.jsdelivr.net/npm/katex@0.13.13/dist/katex.min.css + integrity: sha384-RZU/ijkSsFbcmivfdRBQDtwuwVqK7GMOw6IMvKyeWL2K5UAlyp6WonmB8m7Jd0Hn type: style - - src: https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/katex.min.js - integrity: sha384-g7c+Jr9ZivxKLnZTDUhnkOnsh30B4H0rpLUpJ4jAIKs4fnJI+sEnkvrMWph2EDg4 + - src: https://cdn.jsdelivr.net/npm/katex@0.13.13/dist/katex.min.js + integrity: sha384-pK1WpvzWVBQiP0/GjnvRxV4mOb0oxFuyRxJlk6vVw146n3egcN5C925NCP7a7BY8 type: script defer: true - - src: https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/contrib/auto-render.min.js - integrity: sha384-mll67QQFJfxn0IYznZYonOWZ644AWYC+Pt2cHqMaRhXVrursRwvLnLaebdGIlYNa + - src: https://cdn.jsdelivr.net/npm/katex@0.13.13/dist/contrib/auto-render.min.js + integrity: sha384-vZTG03m+2yp6N6BNi5iM4rW4oIwk5DfcNdFfxkk9ZWpDriOkXX8voJBFrAO7MpVl type: script defer: true