diff --git a/assets/scss/general.scss b/assets/scss/general.scss new file mode 100644 index 0000000..e12bb0e --- /dev/null +++ b/assets/scss/general.scss @@ -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); + } +} diff --git a/assets/scss/partials/layout/article.scss b/assets/scss/partials/layout/article.scss index eb58e77..a809f8d 100644 --- a/assets/scss/partials/layout/article.scss +++ b/assets/scss/partials/layout/article.scss @@ -72,6 +72,10 @@ a { color: var(--body-text-color); } + + a.link { + box-shadow: unset; + } } } } @@ -104,7 +108,7 @@ list-style-type: none; counter-reset: item; - li a::before { + li a:first-of-type::before { counter-increment: item; content: counters(item, ".") ". "; font-weight: bold; @@ -166,7 +170,7 @@ } } -.related-contents { +.related-content { overflow-x: auto; padding-bottom: 15px; @@ -231,6 +235,16 @@ border-inline-start: var(--blockquote-border-size) solid var(--card-separator-color); padding: 15px calc(var(--card-padding) - var(--blockquote-border-size)); background-color: var(--blockquote-background-color); + + .cite { + display: block; + text-align: right; + font-size: 0.75em; + + a { + text-decoration: underline; + } + } } hr { diff --git a/assets/scss/style.scss b/assets/scss/style.scss index 43e95a5..e50d400 100644 --- a/assets/scss/style.scss +++ b/assets/scss/style.scss @@ -24,36 +24,5 @@ @import "partials/layout/404.scss"; @import "partials/layout/search.scss"; +@import "general.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); - } -} diff --git a/data/external.yaml b/data/external.yaml index fd2b665..777620d 100644 --- a/data/external.yaml +++ b/data/external.yaml @@ -1,6 +1,6 @@ Vibrant: - - src: https://cdn.jsdelivr.net/npm/node-vibrant@3.1.5/dist/vibrant.min.js - integrity: sha256-5NovOZc4iwiAWTYIFiIM7DxKUXKWvpVEuMEPLzcm5/g= + - src: https://cdn.jsdelivr.net/npm/node-vibrant@3.1.6/dist/vibrant.min.js + integrity: sha256-awcR2jno4kI5X0zL8ex0vi2z+KMkF24hUW8WePSA9HM= type: script PhotoSwipe: @@ -14,26 +14,24 @@ PhotoSwipe: type: script defer: true - - src: https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/default-skin/default-skin.css - integrity: sha256-c0uckgykQ9v5k+IqViZOZKc47Jn7KQil4/MP3ySA3F8= + - src: https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/default-skin/default-skin.min.css type: style - - src: https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe.css - integrity: sha256-SBLU4vv6CA6lHsZ1XyTdhyjJxCjPif/TRkjnsyGAGnE= + - src: https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe.min.css type: style KaTeX: - - src: https://cdn.jsdelivr.net/npm/katex@0.13.13/dist/katex.min.css - integrity: sha384-RZU/ijkSsFbcmivfdRBQDtwuwVqK7GMOw6IMvKyeWL2K5UAlyp6WonmB8m7Jd0Hn + - src: https://cdn.jsdelivr.net/npm/katex@0.15.6/dist/katex.min.css + integrity: sha256-J+iAE0sgH8QSz9hpcDxXIftnj65JEZgNhGcgReTTK9s= type: style - - src: https://cdn.jsdelivr.net/npm/katex@0.13.13/dist/katex.min.js - integrity: sha384-pK1WpvzWVBQiP0/GjnvRxV4mOb0oxFuyRxJlk6vVw146n3egcN5C925NCP7a7BY8 + - src: https://cdn.jsdelivr.net/npm/katex@0.15.6/dist/katex.min.js + integrity: sha256-InsNdER1b2xUewP+pKCUJpkhiqwHgqiPXDlIk7GzBu4= type: script defer: true - - src: https://cdn.jsdelivr.net/npm/katex@0.13.13/dist/contrib/auto-render.min.js - integrity: sha384-vZTG03m+2yp6N6BNi5iM4rW4oIwk5DfcNdFfxkk9ZWpDriOkXX8voJBFrAO7MpVl + - src: https://cdn.jsdelivr.net/npm/katex@0.15.6/dist/contrib/auto-render.min.js + integrity: sha256-y39Mpg7V3D4lhBX4x6O0bUqTV4pSrfgwEfGKfxkOdgI= type: script defer: true diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index ea576c2..18b6346 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -26,7 +26,7 @@ disqusShortname: hugo-theme-stack googleAnalytics: # 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 # Set hasCJKLanguage to true if DefaultContentLanguage is in [zh-cn ja ko] @@ -97,21 +97,20 @@ params: clientSecret: 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: serverURL: lang: - visitor: - avatar: + pageview: emoji: - - https://cdn.jsdelivr.net/gh/walinejs/emojis/weibo + - https://unpkg.com/@waline/emojis@1.0.1/weibo requiredMeta: - name - email - url - placeholder: locale: admin: Admin + placeholder: twikoo: envId: diff --git a/exampleSite/content/post/rich-content/index.md b/exampleSite/content/post/rich-content/index.md index f2b45db..1d45fba 100644 --- a/exampleSite/content/post/rich-content/index.md +++ b/exampleSite/content/post/rich-content/index.md @@ -39,4 +39,25 @@ Hugo ships with several [Built-in Shortcodes](https://gohugo.io/content-manageme ## Gist Shortcode -{{< gist spf13 7896402 >}} \ No newline at end of file +{{< 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 >}} + diff --git a/i18n/ar.yaml b/i18n/ar.yaml index 8af7ff9..b2970b1 100644 --- a/i18n/ar.yaml +++ b/i18n/ar.yaml @@ -23,7 +23,7 @@ article: tableOfContents: other: جدول المحتويات - relatedContents: + relatedContent: other: محتوى مشابهه lastUpdatedOn: diff --git a/i18n/bn.yaml b/i18n/bn.yaml new file mode 100644 index 0000000..0e54cb9 --- /dev/null +++ b/i18n/bn.yaml @@ -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 }}" diff --git a/i18n/ca.yaml b/i18n/ca.yaml index 33ad70e..af4167e 100644 --- a/i18n/ca.yaml +++ b/i18n/ca.yaml @@ -23,7 +23,7 @@ article: tableOfContents: other: Taula de contingut - relatedContents: + relatedContent: other: Continguts relacionats lastUpdatedOn: diff --git a/i18n/de.yaml b/i18n/de.yaml index 00a8e11..7ab5b56 100644 --- a/i18n/de.yaml +++ b/i18n/de.yaml @@ -23,7 +23,7 @@ article: tableOfContents: other: Inhaltsverzeichnis - relatedContents: + relatedContent: other: Verwandte Inhalte lastUpdatedOn: @@ -52,6 +52,10 @@ widget: title: other: Schlagwörter + categoriesCloud: + title: + other: Kategorien + search: title: other: Suche diff --git a/i18n/el.yaml b/i18n/el.yaml index 38d867f..27a147d 100644 --- a/i18n/el.yaml +++ b/i18n/el.yaml @@ -23,7 +23,7 @@ article: tableOfContents: other: Πινακας περιεχομενων - relatedContents: + relatedContent: other: Σχετικο περιεχομενο lastUpdatedOn: diff --git a/i18n/en.yaml b/i18n/en.yaml index 3d0ed03..fb07328 100644 --- a/i18n/en.yaml +++ b/i18n/en.yaml @@ -23,8 +23,8 @@ article: tableOfContents: other: Table of contents - relatedContents: - other: Related contents + relatedContent: + other: Related content lastUpdatedOn: other: Last updated on diff --git a/i18n/es.yaml b/i18n/es.yaml index 5f197da..76995da 100644 --- a/i18n/es.yaml +++ b/i18n/es.yaml @@ -23,7 +23,7 @@ article: tableOfContents: other: Tabla de contenido - relatedContents: + relatedContent: other: Contenidos relacionados lastUpdatedOn: diff --git a/i18n/fa.yaml b/i18n/fa.yaml new file mode 100644 index 0000000..3655757 --- /dev/null +++ b/i18n/fa.yaml @@ -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 }} diff --git a/i18n/fr.yaml b/i18n/fr.yaml index ac2e51a..c3feb1d 100644 --- a/i18n/fr.yaml +++ b/i18n/fr.yaml @@ -23,7 +23,7 @@ article: tableOfContents: other: Table des matières - relatedContents: + relatedContent: other: Contenus liés lastUpdatedOn: diff --git a/i18n/hu.yaml b/i18n/hu.yaml new file mode 100644 index 0000000..5e5af92 --- /dev/null +++ b/i18n/hu.yaml @@ -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 diff --git a/i18n/id.yaml b/i18n/id.yaml index deeb189..8104351 100644 --- a/i18n/id.yaml +++ b/i18n/id.yaml @@ -23,7 +23,7 @@ article: tableOfContents: other: Daftar Isi - relatedContents: + relatedContent: other: Konten terkait lastUpdatedOn: diff --git a/i18n/it.yaml b/i18n/it.yaml index 6c4114c..0cbeeab 100644 --- a/i18n/it.yaml +++ b/i18n/it.yaml @@ -23,7 +23,7 @@ article: tableOfContents: other: Indice - relatedContents: + relatedContent: other: Contenuti correlati lastUpdatedOn: @@ -51,6 +51,10 @@ widget: title: other: Tags + categoriesCloud: + title: + other: Categorie + search: title: other: Cerca diff --git a/i18n/ja.yaml b/i18n/ja.yaml index ec70d18..40380fd 100644 --- a/i18n/ja.yaml +++ b/i18n/ja.yaml @@ -11,7 +11,7 @@ article: tableOfContents: other: 目次 - relatedContents: + relatedContent: other: 関連するコンテンツ lastUpdatedOn: diff --git a/i18n/ko.yaml b/i18n/ko.yaml index b2202e6..5ded2b0 100644 --- a/i18n/ko.yaml +++ b/i18n/ko.yaml @@ -23,7 +23,7 @@ article: tableOfContents: other: 목차 - relatedContents: + relatedContent: other: 관련 글 lastUpdatedOn: diff --git a/i18n/nl.yaml b/i18n/nl.yaml index b9ecad3..a814232 100644 --- a/i18n/nl.yaml +++ b/i18n/nl.yaml @@ -17,7 +17,7 @@ list: other: Subsecties article: - relatedContents: + relatedContent: other: Gerelateerde inhoud lastUpdatedOn: other: Laatst bijgewerkt op @@ -38,6 +38,10 @@ widget: title: other: Tags + categoriesCloud: + title: + other: Categorie + search: title: other: Zoeken diff --git a/i18n/pl.yaml b/i18n/pl.yaml index 68c9bc8..e44a140 100644 --- a/i18n/pl.yaml +++ b/i18n/pl.yaml @@ -23,7 +23,7 @@ article: tableOfContents: other: Spis treści - relatedContents: + relatedContent: other: Powiązane artykuły lastUpdatedOn: diff --git a/i18n/pt-br.yaml b/i18n/pt-br.yaml index ffdbe41..e3cf582 100644 --- a/i18n/pt-br.yaml +++ b/i18n/pt-br.yaml @@ -23,7 +23,7 @@ article: tableOfContents: other: Índice - relatedContents: + relatedContent: other: Conteúdo relacionado lastUpdatedOn: diff --git a/i18n/ru.yaml b/i18n/ru.yaml index 65e3be6..b1f1e51 100644 --- a/i18n/ru.yaml +++ b/i18n/ru.yaml @@ -23,7 +23,7 @@ list: article: back: other: Назад - relatedContents: + relatedContent: other: Также рекомендуем lastUpdatedOn: other: Обновлено diff --git a/i18n/th.yaml b/i18n/th.yaml index b2ae1cd..9982c06 100644 --- a/i18n/th.yaml +++ b/i18n/th.yaml @@ -23,7 +23,7 @@ article: tableOfContents: other: สารบัญ - relatedContents: + relatedContent: other: เนื้อหาคล้ายคลึงกัน lastUpdatedOn: diff --git a/i18n/tr.yaml b/i18n/tr.yaml index fe9269b..2dbb9d5 100644 --- a/i18n/tr.yaml +++ b/i18n/tr.yaml @@ -17,7 +17,7 @@ list: other: Alt bölümler article: - relatedContents: + relatedContent: other: Alakalı içerikler lastUpdatedOn: other: Son güncelleme diff --git a/i18n/uk.yaml b/i18n/uk.yaml index 966e141..3bd4f71 100644 --- a/i18n/uk.yaml +++ b/i18n/uk.yaml @@ -24,7 +24,7 @@ article: tableOfContents: other: Зміст - relatedContents: + relatedContent: other: Схожі матеріали lastUpdatedOn: diff --git a/i18n/zh-cn.yaml b/i18n/zh-cn.yaml index 3579945..9350c2b 100644 --- a/i18n/zh-cn.yaml +++ b/i18n/zh-cn.yaml @@ -11,7 +11,7 @@ article: tableOfContents: other: 目录 - relatedContents: + relatedContent: other: 相关文章 lastUpdatedOn: diff --git a/i18n/zh-hk.yaml b/i18n/zh-hk.yaml index d927bdc..9e3c246 100644 --- a/i18n/zh-hk.yaml +++ b/i18n/zh-hk.yaml @@ -23,7 +23,7 @@ article: tableOfContents: other: 目錄 - relatedContents: + relatedContent: other: 相關內容 lastUpdatedOn: diff --git a/i18n/zh-tw.yaml b/i18n/zh-tw.yaml index 871d937..d9e124e 100644 --- a/i18n/zh-tw.yaml +++ b/i18n/zh-tw.yaml @@ -11,7 +11,7 @@ article: tableOfContents: other: 目錄 - relatedContents: + relatedContent: other: 相關文章 lastUpdatedOn: diff --git a/layouts/_default/single.html b/layouts/_default/single.html index c70df20..5f300bf 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -30,7 +30,7 @@ {{ partial "article/components/links" . }} {{ end }} - {{ partial "article/components/related-contents" . }} + {{ partial "article/components/related-content" . }} {{ if not (eq .Params.comments false) }} {{ partial "comments/include" . }} diff --git a/layouts/partials/article-list/tile.html b/layouts/partials/article-list/tile.html index 4ec5d57..be5744b 100644 --- a/layouts/partials/article-list/tile.html +++ b/layouts/partials/article-list/tile.html @@ -10,7 +10,7 @@ {{- $Width := $imageRaw.Width -}} {{- $Height := $imageRaw.Height -}} - {{- if (default true .Page.Site.Params.imageProcessing.cover.enabled) -}} + {{- if .context.Site.Params.imageProcessing.cover.enabled -}} {{- $thumbnail := $imageRaw.Fill .size -}} {{- $Permalink = $thumbnail.RelPermalink -}} {{- $Width = $thumbnail.Width -}} @@ -36,4 +36,4 @@ - \ No newline at end of file + diff --git a/layouts/partials/article/components/related-contents.html b/layouts/partials/article/components/related-content.html similarity index 71% rename from layouts/partials/article/components/related-contents.html rename to layouts/partials/article/components/related-content.html index 29cfff6..aba88e3 100644 --- a/layouts/partials/article/components/related-contents.html +++ b/layouts/partials/article/components/related-content.html @@ -1,8 +1,8 @@ {{ $related := (where (.Site.RegularPages.Related .) "Params.hidden" "!=" true) | first 5 }} {{ with $related }} -