From 442a67590ca3c1a9873199e4cff2678f04052ede Mon Sep 17 00:00:00 2001 From: Nathan Kershaw <63566309+nathan-nz@users.noreply.github.com> Date: Thu, 15 Jun 2023 16:18:28 +1200 Subject: [PATCH 1/2] Update settings.yml Add hide_all_from_anon --- settings.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/settings.yml b/settings.yml index c286be7..e79fe0a 100644 --- a/settings.yml +++ b/settings.yml @@ -86,7 +86,13 @@ current_link_icon_color: default: "" description: en: "Color of the active side-bar link icon. Leave blank to use current default." - + +hide_all_from_anon: + type: bool + default: false + description: + en: "Hide the entire side-bar from anonymous users" + hide_community_section: type: bool default: false From 6b32ab950ba077da61160195cde1296d5d9c89cb Mon Sep 17 00:00:00 2001 From: Nathan Kershaw <63566309+nathan-nz@users.noreply.github.com> Date: Thu, 15 Jun 2023 16:23:30 +1200 Subject: [PATCH 2/2] Update common.scss Add hiding sidebar from anon code --- common/common.scss | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/common/common.scss b/common/common.scss index 9e9e938..66fe0d1 100644 --- a/common/common.scss +++ b/common/common.scss @@ -59,6 +59,22 @@ color: $link_icon_color; } +// * hide entire Sidebar from anon * + +@if $hide_all_from_anon == "true" { + html.anon { + // Hide the narrow desktop sidebar + // sidebar mobile version which is activate on desktop too under 1000px width + .d-header .hamburger-panel { + display: none; + } + // Hide the header cloak when menu opens + .header-cloak { + display: none !important; + } + } +} + // * hide the Community Section * @if $hide_community_section == "true" {