diff --git a/i18n/zh-cn.yaml b/i18n/zh-cn.yaml index 9c82d8b..1cced98 100644 --- a/i18n/zh-cn.yaml +++ b/i18n/zh-cn.yaml @@ -9,9 +9,12 @@ backToTop: "返回顶部" changeLanguage: "切换语言" changeTheme: "切换主题" copyright: "© 2023 Hextra Project." +dark: "深色" editThisPage: "在 GitHub 上编辑此页 →" lastUpdated: "最后更新于" +light: "浅色" noResultsFound: "无结果" onThisPage: "此页上" +poweredBy: "由 Hextra 驱动" readMore: "更多 →" searchPlaceholder: "搜索文档..." diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 64a387a..756115e 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -2,6 +2,7 @@ {{- $displayThemeToggle := site.Params.theme.displayToggle | default true -}} {{- $copyright := (T "copyright") | default "© 2023 Hextra." -}} +{{- $poweredBy := (T "poweredBy") | default "Powered by Hextra" -}} {{- $footerWidth := "max-w-screen-xl" -}} {{- with .Site.Params.footer.width -}} @@ -27,7 +28,7 @@ class="{{ $footerWidth }} mx-auto flex justify-center py-12 pl-[max(env(safe-area-inset-left),1.5rem)] pr-[max(env(safe-area-inset-right),1.5rem)] text-gray-600 dark:text-gray-400 md:justify-start" >
- {{- if (.Site.Params.footer.displayPoweredBy | default true) }}
{{ template "theme-credit" . }}
{{ end }} + {{- if (.Site.Params.footer.displayPoweredBy | default true) }}
{{ template "theme-credit" $poweredBy }}
{{ end }} {{- if .Site.Params.footer.displayCopyright }}
{{ $copyright | markdownify }}
{{ end }}
@@ -36,7 +37,7 @@ {{- define "theme-credit" -}} Powered by Hextra + >{{ . | safeHTML }} {{- partial "utils/icon.html" (dict "name" "hextra" "attributes" "height=1em class=\"inline-block ml-1 align-text-bottom\"") -}} diff --git a/layouts/partials/theme-toggle.html b/layouts/partials/theme-toggle.html index b7619c0..35558c5 100644 --- a/layouts/partials/theme-toggle.html +++ b/layouts/partials/theme-toggle.html @@ -1,6 +1,8 @@ {{- $hideLabel := .hideLabel | default false -}} {{- $changeTheme := (T "changeTheme") | default "Change theme" -}} +{{- $light := (T "light") | default "Light" -}} +{{- $dark := (T "dark") | default "Dark" -}}