From 7a2b7904bff296de53622c86681fc505a36f74f0 Mon Sep 17 00:00:00 2001 From: hossainemruz Date: Mon, 13 Jun 2022 21:09:16 +0600 Subject: [PATCH] Refactor showFlags logic Signed-off-by: hossainemruz --- layouts/partials/helpers/country-code.html | 5 ----- .../partials/navigators/floating-lang-selector.html | 12 ++++++++---- layouts/partials/navigators/lang-selector-2.html | 12 +++++++----- layouts/partials/navigators/lang-selector.html | 13 +++++++------ 4 files changed, 22 insertions(+), 20 deletions(-) diff --git a/layouts/partials/helpers/country-code.html b/layouts/partials/helpers/country-code.html index 0c5e365..925d70e 100644 --- a/layouts/partials/helpers/country-code.html +++ b/layouts/partials/helpers/country-code.html @@ -20,10 +20,5 @@ {{ end }} {{ end }} -{{/* if specified via "params.showFlags" field, then countryCode is set to be empty. */}} -{{ if eq site.Params.showFlags false }} - {{ $countryCode = "" }} -{{ end }} - {{/* return the country code */}} {{ return $countryCode }} diff --git a/layouts/partials/navigators/floating-lang-selector.html b/layouts/partials/navigators/floating-lang-selector.html index 625c01f..921fdc5 100644 --- a/layouts/partials/navigators/floating-lang-selector.html +++ b/layouts/partials/navigators/floating-lang-selector.html @@ -5,15 +5,19 @@