front/BaseTemplate: allow disabling header, h1 and footer via boolean attributes

This commit is contained in:
Alice Gaudon 2021-11-24 18:14:59 +01:00
parent f801f6a43b
commit aa1484749e

View File

@ -8,6 +8,9 @@
export let h1: string = title;
export let description: string;
export let refresh_after: number | undefined = undefined;
export let noHeader: boolean = false;
export let noH1: boolean = false;
export let noFooter: boolean = false;
</script>
<CommonScripts/>
@ -46,14 +49,16 @@
<link rel="stylesheet" href="/css/layout.css">
</svelte:head>
<BaseHeader/>
{#if !noHeader}
<BaseHeader/>
{/if}
<div class="flash-messages">
<FlashMessages/>
</div>
<main>
{#if h1}
{#if h1 && !noH1}
<h1>{h1}</h1>
{/if}
{#if $$slots.subtitle}
@ -64,4 +69,6 @@
<slot/>
</main>
<BaseFooter/>
{#if !noFooter}
<BaseFooter/>
{/if}