🛠 fix: Empty block when locale switcher is hidden (#678)

pull/699/head
Tomy Hsieh 2023-11-08 16:49:08 -05:00
parent e3015b9006
commit 0109db6173
No known key found for this signature in database
GPG Key ID: 4E6AF0EEDD2205F8
4 changed files with 5 additions and 5 deletions

View File

@ -4,7 +4,7 @@
<nav class="pb-4 text-base font-medium text-neutral-500 dark:text-neutral-400">
<ul class="flex flex-col list-none sm:flex-row">
{{ range .Site.Menus.footer }}
{{ if and (eq .Params.action "locale") (and (not page.IsTranslated) (not site.IsMultiLingual)) }}
{{ if and (eq .Params.action "locale") (or (not page.IsTranslated) (not site.IsMultiLingual)) }}
{{ continue }}
{{ end }}
<li class="mb-1 group text-end sm:mb-0 sm:me-7 sm:last:me-0">

View File

@ -9,7 +9,7 @@
<ul class="flex flex-col list-none text-end sm:flex-row">
{{ if .Site.Menus.main }}
{{ range .Site.Menus.main }}
{{ if and (eq .Params.action "locale") (and (not page.IsTranslated) (not site.IsMultiLingual)) }}
{{ if and (eq .Params.action "locale") (or (not page.IsTranslated) (not site.IsMultiLingual)) }}
{{ continue }}
{{ end }}
<li class="group mb-1 sm:mb-0 sm:me-7 sm:last:me-0.5">

View File

@ -25,7 +25,7 @@
</li>
{{ if .Site.Menus.main }}
{{ range .Site.Menus.main }}
{{ if and (eq .Params.action "locale") (and (not page.IsTranslated) (not site.IsMultiLingual)) }}
{{ if and (eq .Params.action "locale") (or (not page.IsTranslated) (not site.IsMultiLingual)) }}
{{ continue }}
{{ end }}
<li class="mb-1 group">

View File

@ -25,7 +25,7 @@
</li>
{{ if .Site.Menus.main }}
{{ range .Site.Menus.main }}
{{ if and (eq .Params.action "locale") (and (not page.IsTranslated) (not site.IsMultiLingual)) }}
{{ if and (eq .Params.action "locale") (or (not page.IsTranslated) (not site.IsMultiLingual)) }}
{{ continue }}
{{ end }}
<li class="mb-1 group">
@ -129,7 +129,7 @@
<ul class="flex-row hidden list-none text-end sm:flex">
{{ if .Site.Menus.main }}
{{ range .Site.Menus.main }}
{{ if and (eq .Params.action "locale") (and (not page.IsTranslated) (not site.IsMultiLingual)) }}
{{ if and (eq .Params.action "locale") (or (not page.IsTranslated) (not site.IsMultiLingual)) }}
{{ continue }}
{{ end }}
<li class="mb-1 group sm:mb-0 sm:me-7 sm:last:me-0">