mirror of
https://github.com/imfing/hextra.git
synced 2025-06-20 05:51:26 -04:00
fix: use hugo.IsMultilingual
to replace deprecated .Site.IsMultiLingual
(#404)
This commit is contained in:

committed by
GitHub

parent
857c4e4ca1
commit
b2bc4f7098
@ -20,7 +20,7 @@
|
||||
{{- partial "language-switch.html" (dict "context" .) -}}
|
||||
{{- with $displayThemeToggle }}{{ partial "theme-toggle.html" }}{{ end -}}
|
||||
</div>
|
||||
{{- if or site.IsMultiLingual $displayThemeToggle -}}
|
||||
{{- if or hugo.IsMultilingual $displayThemeToggle -}}
|
||||
<hr class="dark:hx-border-neutral-800" />
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
{{- $changeLanguage := (T "changeLanguage") | default "Change language" -}}
|
||||
|
||||
{{- if site.IsMultiLingual -}}
|
||||
{{- if hugo.IsMultilingual -}}
|
||||
<div class="hx-flex hx-justify-items-start {{ if $grow }}hx-grow{{ end }}">
|
||||
<button
|
||||
title="{{ $changeLanguage }}"
|
||||
|
@ -43,9 +43,9 @@
|
||||
{{ $switchesClass := cond $disableSidebar "md:hx-hidden" "" -}}
|
||||
{{ $displayThemeToggle := (site.Params.theme.displayToggle | default true) -}}
|
||||
|
||||
{{ if or site.IsMultiLingual $displayThemeToggle }}
|
||||
<div class="{{ $switchesClass }} {{ with site.IsMultiLingual }}hx-justify-end{{ end }} hx-sticky hx-bottom-0 hx-bg-white dark:hx-bg-dark hx-mx-4 hx-py-4 hx-shadow-[0_-12px_16px_#fff] hx-flex hx-items-center hx-gap-2 dark:hx-border-neutral-800 dark:hx-shadow-[0_-12px_16px_#111] contrast-more:hx-border-neutral-400 contrast-more:hx-shadow-none contrast-more:dark:hx-shadow-none hx-border-t" data-toggle-animation="show">
|
||||
{{- with site.IsMultiLingual -}}
|
||||
{{ if or hugo.IsMultilingual $displayThemeToggle }}
|
||||
<div class="{{ $switchesClass }} {{ with hugo.IsMultilingual }}hx-justify-end{{ end }} hx-sticky hx-bottom-0 hx-bg-white dark:hx-bg-dark hx-mx-4 hx-py-4 hx-shadow-[0_-12px_16px_#fff] hx-flex hx-items-center hx-gap-2 dark:hx-border-neutral-800 dark:hx-shadow-[0_-12px_16px_#111] contrast-more:hx-border-neutral-400 contrast-more:hx-shadow-none contrast-more:dark:hx-shadow-none hx-border-t" data-toggle-animation="show">
|
||||
{{- with hugo.IsMultilingual -}}
|
||||
{{- partial "language-switch" (dict "context" $context "grow" true) -}}
|
||||
{{- with $displayThemeToggle }}{{ partial "theme-toggle" (dict "hideLabel" true) }}{{ end -}}
|
||||
{{- else -}}
|
||||
|
Reference in New Issue
Block a user