From e9d5f116fac2ed7424a8184d6cf3dfeefa7fa8d4 Mon Sep 17 00:00:00 2001 From: Josh Creek <8179928+jcreek@users.noreply.github.com> Date: Tue, 14 May 2024 20:54:57 +0100 Subject: [PATCH 1/2] feat(#5): Add cookie consent banner --- src/lib/components/CookieConsent.svelte | 37 +++++++++++++++++++++++++ src/routes/+layout.svelte | 18 ++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 src/lib/components/CookieConsent.svelte diff --git a/src/lib/components/CookieConsent.svelte b/src/lib/components/CookieConsent.svelte new file mode 100644 index 0000000..5e1c64f --- /dev/null +++ b/src/lib/components/CookieConsent.svelte @@ -0,0 +1,37 @@ + + +{#if !cookiesAccepted} +
+

+ We use cookies to ensure you get the best experience on our website. By continuing, you agree + to our use of cookies. +

+ +
+{/if} diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 3fa38ee..0b3f792 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -1,11 +1,13 @@ @@ -44,6 +55,10 @@ + + {#if cookiesAccepted} + + {/if}
@@ -162,6 +177,8 @@ + +
+