diff --git a/assets/ts/colorScheme.ts b/assets/ts/colorScheme.ts index e17ff07..7c4ff77 100644 --- a/assets/ts/colorScheme.ts +++ b/assets/ts/colorScheme.ts @@ -9,6 +9,8 @@ class StackColorScheme { this.bindMatchMedia(); this.currentScheme = this.getSavedScheme(); + this.dispatchEvent(document.body.dataset.scheme as colorScheme); + if (toggleEl) this.bindClick(toggleEl); diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index a0266c8..fb89f51 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -60,7 +60,6 @@ params: archives: limit: 5 - path: archives tagCloud: limit: 10 @@ -82,7 +81,7 @@ params: colorScheme: # Display toggle toggle: true - + # Available values: auto, light, dark default: auto diff --git a/i18n/en.yaml b/i18n/en.yaml index e131b61..99d34ce 100644 --- a/i18n/en.yaml +++ b/i18n/en.yaml @@ -16,10 +16,6 @@ list: one: Subsection other: Subsections -archives: - categories: - other: Categories - article: relatedContents: other: Related contents diff --git a/i18n/ja.yaml b/i18n/ja.yaml index e83e531..e9744c2 100644 --- a/i18n/ja.yaml +++ b/i18n/ja.yaml @@ -4,10 +4,6 @@ toggleMenu: darkMode: other: ダークモード -archives: - categories: - other: 分類 - article: relatedContents: other: 関連するコンテンツ diff --git a/i18n/pt-BR.yaml b/i18n/pt-BR.yaml index 5380c68..8240755 100644 --- a/i18n/pt-BR.yaml +++ b/i18n/pt-BR.yaml @@ -1,9 +1,20 @@ toggleMenu: other: Alternar Menu -archives: - categories: - other: Categorias +darkMode: + other: Modo Escuro + +list: + page: + one: "{{ .Count }} página" + other: "{{ .Count }} páginas" + + section: + other: Seção + + subsection: + one: Subseção + other: Subseções article: relatedContents: diff --git a/i18n/ru.yaml b/i18n/ru.yaml index f606ffa..f0c562f 100644 --- a/i18n/ru.yaml +++ b/i18n/ru.yaml @@ -12,17 +12,13 @@ list: other: "{{ .Count }} страниц" section: - other: Разделы + other: Раздел subsection: one: Подраздел - few: Подраздела - many: Подразделов - other: Подразделов - -archives: - categories: - other: Категории + few: Подразделы + many: Подразделы + other: Подразделы article: relatedContents: @@ -32,7 +28,7 @@ article: notFound: title: - other: Не найшено + other: Не найдено subtitle: other: Запрашиваемая страница не существует @@ -58,4 +54,4 @@ footer: builtWith: other: Создано при помощи {{ .Generator }} designedBy: - other: Тема {{ .Theme }} дизайн {{ .DesignedBy }} + other: Тема {{ .Theme }}, дизайн {{ .DesignedBy }} diff --git a/i18n/tr.yaml b/i18n/tr.yaml index fbcb7b0..fe9269b 100644 --- a/i18n/tr.yaml +++ b/i18n/tr.yaml @@ -16,10 +16,6 @@ list: one: Alt bölüm other: Alt bölümler -archives: - categories: - other: Kategoriler - article: relatedContents: other: Alakalı içerikler diff --git a/i18n/zh-CN.yaml b/i18n/zh-CN.yaml index 0583bf7..9f1ac94 100644 --- a/i18n/zh-CN.yaml +++ b/i18n/zh-CN.yaml @@ -4,10 +4,6 @@ toggleMenu: darkMode: other: 暗色模式 -archives: - categories: - other: 分类 - article: relatedContents: other: 相关文章 diff --git a/layouts/_default/archives.html b/layouts/_default/archives.html index 49c0ddf..321aa6d 100644 --- a/layouts/_default/archives.html +++ b/layouts/_default/archives.html @@ -1,11 +1,12 @@ {{ define "body-class" }}template-archives{{ end }} {{ define "main" }} - {{ $categories := ($.Site.GetPage "taxonomyTerm" "categories").Pages }} - {{ if $categories }} -