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/assets/scss/partials/layout/article.scss b/assets/scss/partials/layout/article.scss index ebf94a7..ef64da9 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); + } + } } } } @@ -185,32 +191,40 @@ display: flex; flex-direction: column; color: var(--card-text-color-main); + overflow: hidden; #TableOfContents { - ol { - counter-reset: item; - list-style-type: none; - padding: 0; + overflow-x: auto; + max-height: 75vh; + + ol, + ul { margin: 0; + padding: 0; } - & > li { - padding: 0; - margin: 0; + ol { + list-style-type: none; + counter-reset: item; + + li:before { + counter-increment: item; + content: counters(item, ".") ". "; + font-weight: bold; + margin-right: 5px; + } + } + + & > ul { + padding: 0 1em; } li { margin: 15px 20px; padding: 5px; - &::before { - counter-increment: item; - content: counters(item, ".") ". "; - font-weight: bold; - margin-right: 5px; - } - - & > ol { + & > ol, + & > ul { margin-top: 10px; padding-left: 10px; margin-bottom: -5px; @@ -379,7 +393,8 @@ padding-bottom: 56.25%; overflow: hidden; - & > iframe { + & > iframe, + & > video { position: absolute; width: 100%; height: 100%; 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 diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index 578c574..4046887 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -11,7 +11,7 @@ disqusShortname: hugo-theme-stack googleAnalytics: # 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 permalinks: @@ -37,12 +37,14 @@ params: emoji: 🍥 subtitle: Lorem ipsum dolor sit amet, consectetur adipiscing elit. avatar: + enabled: true local: true src: img/avatar.png article: math: false toc: true + readingTime: true license: enabled: true default: Licensed under CC BY-NC-SA 4.0 @@ -85,6 +87,12 @@ params: locale: admin: Admin + twikoo: + envId: + region: + path: + lang: + widgets: enabled: - search 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/i18n/id.yaml b/i18n/id.yaml index 31cea39..2af893a 100644 --- a/i18n/id.yaml +++ b/i18n/id.yaml @@ -1,24 +1,52 @@ 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 + readingTime: + one: "Waktu Membaca: {{ .Count }} menit" + other: "Waktu Membaca: {{ .Count }} menit" + 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 +54,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 }} diff --git a/i18n/it.yaml b/i18n/it.yaml new file mode 100644 index 0000000..6c4114c --- /dev/null +++ b/i18n/it.yaml @@ -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 }} diff --git a/i18n/ja.yaml b/i18n/ja.yaml index 1331fb1..3f9978d 100644 --- a/i18n/ja.yaml +++ b/i18n/ja.yaml @@ -17,6 +17,9 @@ article: lastUpdatedOn: other: 最終更新 + readingTime: + other: "読了時間: {{ .Count }}分" + notFound: title: other: 404 Not Found diff --git a/i18n/ru.yaml b/i18n/ru.yaml index f0c562f..863642e 100644 --- a/i18n/ru.yaml +++ b/i18n/ru.yaml @@ -21,10 +21,14 @@ list: other: Подразделы article: + back: + other: Назад relatedContents: other: Также рекомендуем lastUpdatedOn: other: Обновлено + tableOfContents: + other: Содержание notFound: title: diff --git a/i18n/zh-CN.yaml b/i18n/zh-CN.yaml index 551e0a3..0f08310 100644 --- a/i18n/zh-CN.yaml +++ b/i18n/zh-CN.yaml @@ -17,6 +17,9 @@ article: lastUpdatedOn: other: 最后更新于 + readingTime: + other: "阅读时长: {{ .Count }} 分钟" + notFound: title: other: 404 错误 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) }} - {{- end -}} + {{ end }} \ No newline at end of file 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 + diff --git a/layouts/partials/comments/provider/twikoo.html b/layouts/partials/comments/provider/twikoo.html new file mode 100644 index 0000000..4dbf976 --- /dev/null +++ b/layouts/partials/comments/provider/twikoo.html @@ -0,0 +1,49 @@ + +
+ + +{{- with .Site.Params.comments.twikoo -}} + +{{- end -}} 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 }}

diff --git a/layouts/shortcodes/video.html b/layouts/shortcodes/video.html new file mode 100644 index 0000000..733761a --- /dev/null +++ b/layouts/shortcodes/video.html @@ -0,0 +1,13 @@ +
+ +