Compare commits

..

10 commits

Author SHA1 Message Date
fe877ee21f added plausible and stars 2024-02-29 20:54:00 -05:00
Jimmy Cai
405e84291a release: 3.22.0 2024-02-26 12:44:11 +01:00
James McMurry
800f815988
fix(sidebar): hide translations selector if only one translation available (#950)
hide translations menu if only one translation available
2024-02-26 12:43:14 +01:00
kragleh
255abd5c88
feat(i18n): add Slovak translation (#930) 2024-02-23 23:58:07 +01:00
flexxgaad
f53fc128bd
fix(config): site.DisqusShortname and site.GoogleAnalytics are deprecated (#952)
Remove deprecations. Fixes #895
2024-02-23 23:16:24 +01:00
WaterLemons2k
188e49ef41
fix(widgets): ensure params is not nil (#943)
* fix(partials): ensure params always exist

If the `params` key is not defined in the config file, accessing `params` results in a `nil pointer evaluating interface {}` error because `params` does not exist.

This can be fixed by ensuring that params is always a map.

* style(widgets): `default` no pipes required
2024-02-23 23:00:39 +01:00
Gleb A
76dc61f0d5
feat(i18n): add Belarusian translation (#937)
* feat(i18n): add Belarusian translation

* Removed .gitignore changes
2024-02-23 00:03:55 +01:00
Jimmy Cai
03ee3369e1
fix: title does not show pagination data (#945)
* fix: title does not show pagination data

This is caused by partialCached. It turns out that the `.RelPermalink` is the same for all pages generated by the paginator, so they will show the same title as the first page.

closes https://github.com/CaiJimmy/hugo-theme-stack/issues/941

* doc(exampleSite): set paginate to 3 to force pagination
2024-02-19 10:54:02 +01:00
Aman Rawat
21da06e448
feat(i18n): add Hindi translation (#889) 2023-10-28 23:59:27 +02:00
Jarao
20bf719411
fix(comments): twikoo icon & count text color not visible on dark theme (#890)
* fix(comments): twikoo icon & count text color

* fix(comments): twikoo prompt color
2023-10-28 23:51:05 +02:00
11 changed files with 264 additions and 28 deletions

View file

@ -1,10 +1,18 @@
baseurl: https://example.com baseurl: https://example.com
languageCode: en-us languageCode: en-us
theme: hugo-theme-stack theme: hugo-theme-stack
paginate: 5 paginate: 3
title: Example Site title: Example Site
copyright: Example Person copyright: Example Person
# Theme i18n support
# 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]
# This will make .Summary and .WordCount behave correctly for CJK languages.
hasCJKLanguage: false
languages: languages:
en: en:
languageName: English languageName: English
@ -26,19 +34,13 @@ languages:
params: params:
description: وصف تجريبي description: وصف تجريبي
services:
# Change it to your Disqus shortname before using # Change it to your Disqus shortname before using
disqusShortname: hugo-theme-stack disqus:
shortname: "hugo-theme-stack"
# GA Tracking ID # GA Tracking ID
googleAnalytics: googleAnalytics:
id:
# Theme i18n support
# 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]
# This will make .Summary and .WordCount behave correctly for CJK languages.
hasCJKLanguage: false
permalinks: permalinks:
post: /p/:slug/ post: /p/:slug/

72
i18n/be.yaml Normal file
View file

@ -0,0 +1,72 @@
toggleMenu:
other: Паказаць/схаваць меню
darkMode:
other: Цёмны рэжым
list:
page:
one: "{{ .Count }} старонка"
few: "{{ .Count }} старонкі"
many: "{{ .Count }} старонак"
other: "{{ .Count }} старонкі"
section:
other: Раздзел
subsection:
one: Падраздзел
few: Падраздзелы
many: Падраздзелы
other: Падраздзелы
article:
back:
other: Назад
relatedContent:
other: Таксама рэкамендуем
lastUpdatedOn:
other: Абноўлена
tableOfContents:
other: Змест
readingTime:
other: "Час чытання: {{ .Count }} хв."
notFound:
title:
other: Не знойдзена
subtitle:
other: Запытваемая старонка не існуе
widget:
archives:
title:
other: Архівы
more:
other: Яшчэ
tagCloud:
title:
other: Тэгі
search:
title:
other: Пошук
placeholder:
other: Увядзіце нешта...
resultTitle:
other: "Знайдзена #PAGES_COUNT старонак (за #TIME_SECONDS с.)"
footer:
builtWith:
other: Створана пры дапамозе {{ .Generator }}
designedBy:
other: Тэма {{ .Theme }}, дызайн {{ .DesignedBy }}

73
i18n/hi.yaml Normal file
View file

@ -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: 404 नहीं मिला।
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 }}

71
i18n/sk.yaml Normal file
View file

@ -0,0 +1,71 @@
toggleMenu:
other: Skryť menu
darkMode:
other: Tmavý režim
list:
page:
one: "{{ .Count }} stránka"
other: "{{ .Count }} stránok"
section:
other: Kategórie
subsection:
one: Podkategória
other: Podkategórie
article:
back:
other: Späť
tableOfContents:
other: Obsah
relatedContent:
other: Súvisiace
lastUpdatedOn:
other: Naposledy aktualizované
readingTime:
one: "{{ .Count }} minúta"
other: "{{ .Count }} minút"
notFound:
title:
other: Nenájdené
subtitle:
other: Tato stránka neexistuje
widget:
archives:
title:
other: Archívy
more:
other: Viac
tagCloud:
title:
other: Štítky
categoriesCloud:
title:
other: Kategórie
search:
title:
other: Hladať
placeholder:
other: Zadajte niečo...
resultTitle:
other: "#PAGES_COUNT stránok (#TIME_SECONDS sekúnd)"
footer:
builtWith:
other: Vytvorené pomocou {{ .Generator }}
designedBy:
other: Šablóna {{ .Theme }} od {{ .DesignedBy }}

View file

@ -7,6 +7,11 @@
<body class="{{ block `body-class` . }}{{ end }}"> <body class="{{ block `body-class` . }}{{ end }}">
{{- partial "head/colorScheme" . -}} {{- partial "head/colorScheme" . -}}
<section class="animated-background" style="position:fixed;z-index:-1;">
<div id="stars1"></div>
<div id="stars2"></div>
<div id="stars3"></div>
</section>
{{/* The container is wider when there's any activated widget */}} {{/* The container is wider when there's any activated widget */}}
{{- $hasWidget := false -}} {{- $hasWidget := false -}}
{{- range .Site.Params.widgets -}} {{- range .Site.Params.widgets -}}

View file

@ -13,7 +13,9 @@
} }
.twikoo .el-input-group__prepend, .twikoo .el-input-group__prepend,
.twikoo .tk-action-icon, .twikoo .tk-action-icon,
.twikoo .tk-submit-action-icon,
.twikoo .tk-time, .twikoo .tk-time,
.twikoo .tk-comments-no,
.twikoo .tk-comments-count { .twikoo .tk-comments-count {
color: var(--twikoo-body-text-color); color: var(--twikoo-body-text-color);
} }
@ -28,6 +30,9 @@
.twikoo .el-button{ .twikoo .el-button{
color: var(--twikoo-body-text-color)!important; color: var(--twikoo-body-text-color)!important;
} }
.twikoo .el-input__count {
color: var(--twikoo-body-text-color) !important;
}
.OwO .OwO-body { .OwO .OwO-body {
background-color: var(--body-background) !important; background-color: var(--body-background) !important;
color: var(--body-text-color) !important; color: var(--body-text-color) !important;

View file

@ -1,4 +1,4 @@
{{- $ThemeVersion := "3.21.0" -}} {{- $ThemeVersion := "3.22.0" -}}
<footer class="site-footer"> <footer class="site-footer">
<section class="copyright"> <section class="copyright">
&copy; &copy;

View file

@ -5,7 +5,7 @@
<meta name='description' content='{{ $description }}'> <meta name='description' content='{{ $description }}'>
{{ with .Params.Keywords }}<meta name="keywords" content="{{ delimit . ", " }}">{{ end }} {{ with .Params.Keywords }}<meta name="keywords" content="{{ delimit . ", " }}">{{ end }}
{{- $title := partialCached "data/title" . .RelPermalink -}} {{- $title := partial "data/title" . -}}
<title>{{ $title }}</title> <title>{{ $title }}</title>
<link rel='canonical' href='{{ .Permalink }}'> <link rel='canonical' href='{{ .Permalink }}'>

View file

@ -0,0 +1,3 @@
{{ if .Site.Params.plausible }}
<script defer data-domain="{{ .Site.Params.plausible_domain }}" src="{{ .Site.Params.plausible_script }}"></script>
{{ end }}

View file

@ -77,6 +77,7 @@
<div class="menu-bottom-section"> <div class="menu-bottom-section">
{{- $currentLanguageCode := .Language.Lang -}} {{- $currentLanguageCode := .Language.Lang -}}
{{ if ( compare.Gt .Site.Home.AllTranslations 1 ) }}
{{ with .Site.Home.AllTranslations }} {{ with .Site.Home.AllTranslations }}
<li id="i18n-switch"> <li id="i18n-switch">
{{ partial "helper/icon" "language" }} {{ partial "helper/icon" "language" }}
@ -87,6 +88,7 @@
</select> </select>
</li> </li>
{{ end }} {{ end }}
{{ end }}
{{ if (default false .Site.Params.colorScheme.toggle) }} {{ if (default false .Site.Params.colorScheme.toggle) }}
<li id="dark-mode-toggle"> <li id="dark-mode-toggle">

View file

@ -4,7 +4,10 @@
<aside class="sidebar right-sidebar sticky"> <aside class="sidebar right-sidebar sticky">
{{ range $widget := . }} {{ range $widget := . }}
{{ if templates.Exists (printf "partials/widget/%s.html" .type) }} {{ if templates.Exists (printf "partials/widget/%s.html" .type) }}
{{ partial (printf "widget/%s" .type) (dict "Context" $context "Params" .params) }} <!-- Ensure that the `params` is not nil -->
{{- $params := default dict .params -}}
{{ partial (printf "widget/%s" .type) (dict "Context" $context "Params" $params) }}
{{ else }} {{ else }}
{{ warnf "Widget %s not found" .type }} {{ warnf "Widget %s not found" .type }}
{{ end }} {{ end }}