From 5dc09b99d8073369fef68ec07fd89c39f53eae9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dawid=20Wro=CC=81bel?= Date: Thu, 25 Apr 2024 17:56:36 +0200 Subject: [PATCH] Hide lang switch separator if not multilang --- layouts/partials/header.html | 38 +++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 75c31799..ecee33e0 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -72,24 +72,26 @@ {{- $lang := .Lang}} {{- $separator := or $label_text (not site.Params.disableThemeToggle)}} - {{- with site.Home.AllTranslations }} - + {{- if gt (len site.Home.AllTranslations) 1 }} + {{ with site.Home.AllTranslations }} + + {{- end }} {{- end }}