🛠 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"> <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"> <ul class="flex flex-col list-none sm:flex-row">
{{ range .Site.Menus.footer }} {{ 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 }} {{ continue }}
{{ end }} {{ end }}
<li class="mb-1 group text-end sm:mb-0 sm:me-7 sm:last:me-0"> <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"> <ul class="flex flex-col list-none text-end sm:flex-row">
{{ if .Site.Menus.main }} {{ if .Site.Menus.main }}
{{ range .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 }} {{ continue }}
{{ end }} {{ end }}
<li class="group mb-1 sm:mb-0 sm:me-7 sm:last:me-0.5"> <li class="group mb-1 sm:mb-0 sm:me-7 sm:last:me-0.5">

View File

@ -25,7 +25,7 @@
</li> </li>
{{ if .Site.Menus.main }} {{ if .Site.Menus.main }}
{{ range .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 }} {{ continue }}
{{ end }} {{ end }}
<li class="mb-1 group"> <li class="mb-1 group">

View File

@ -25,7 +25,7 @@
</li> </li>
{{ if .Site.Menus.main }} {{ if .Site.Menus.main }}
{{ range .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 }} {{ continue }}
{{ end }} {{ end }}
<li class="mb-1 group"> <li class="mb-1 group">
@ -129,7 +129,7 @@
<ul class="flex-row hidden list-none text-end sm:flex"> <ul class="flex-row hidden list-none text-end sm:flex">
{{ if .Site.Menus.main }} {{ if .Site.Menus.main }}
{{ range .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 }} {{ continue }}
{{ end }} {{ end }}
<li class="mb-1 group sm:mb-0 sm:me-7 sm:last:me-0"> <li class="mb-1 group sm:mb-0 sm:me-7 sm:last:me-0">