From e033baa57f9ce897e4a9e6c646dccd632f396ff6 Mon Sep 17 00:00:00 2001 From: Alice Gaudon Date: Sun, 28 Nov 2021 16:43:46 +0100 Subject: [PATCH] front/BaseTemplate: allow disabling login link and logo label --- src/assets/views/templates/BaseTemplate.svelte | 5 ++++- src/assets/views/templates/base/BaseHeader.svelte | 7 +++++-- src/assets/views/templates/base/BaseHeaderLogo.svelte | 9 ++++++++- src/assets/views/templates/base/BaseNavMenuAuth.svelte | 4 +++- 4 files changed, 20 insertions(+), 5 deletions(-) diff --git a/src/assets/views/templates/BaseTemplate.svelte b/src/assets/views/templates/BaseTemplate.svelte index ac8ad85..9b27141 100644 --- a/src/assets/views/templates/BaseTemplate.svelte +++ b/src/assets/views/templates/BaseTemplate.svelte @@ -11,6 +11,9 @@ export let noHeader: boolean = false; export let noH1: boolean = false; export let noFooter: boolean = false; + + export let noLogoLabel = false; + export let noLoginLink = false; @@ -50,7 +53,7 @@ {#if !noHeader} - + {/if}
diff --git a/src/assets/views/templates/base/BaseHeader.svelte b/src/assets/views/templates/base/BaseHeader.svelte index 32e6c31..3df399b 100644 --- a/src/assets/views/templates/base/BaseHeader.svelte +++ b/src/assets/views/templates/base/BaseHeader.svelte @@ -3,6 +3,9 @@ import NavMenu from "../../components/NavMenu.svelte"; import BaseNavMenuLinks from "./BaseNavMenuLinks.svelte"; import BaseNavMenuAuth from "./BaseNavMenuAuth.svelte"; + + export let noLoginLink = false; + export let noLogoLabel = false;
- + - +
diff --git a/src/assets/views/templates/base/BaseHeaderLogo.svelte b/src/assets/views/templates/base/BaseHeaderLogo.svelte index b964873..4efd373 100644 --- a/src/assets/views/templates/base/BaseHeaderLogo.svelte +++ b/src/assets/views/templates/base/BaseHeaderLogo.svelte @@ -1,5 +1,7 @@ - + diff --git a/src/assets/views/templates/base/BaseNavMenuAuth.svelte b/src/assets/views/templates/base/BaseNavMenuAuth.svelte index 052ea70..03b4544 100644 --- a/src/assets/views/templates/base/BaseNavMenuAuth.svelte +++ b/src/assets/views/templates/base/BaseNavMenuAuth.svelte @@ -2,6 +2,8 @@ import {locals} from "../../../ts/stores.js"; import NavMenuItem from "../../components/NavMenuItem.svelte"; import {hasRoute, route} from "../../../../common/Routing"; + + export let noLoginLink = false; {#if hasRoute('auth')} @@ -12,7 +14,7 @@ - {:else} + {:else if !noLoginLink} {/if} {/if}