We use cookies to ensure you get the best experience on our website. By continuing, you agree
to our use of cookies.
diff --git a/src/lib/components/Dropdown.svelte b/src/lib/components/Dropdown.svelte
index 3940f8a..0c3c645 100644
--- a/src/lib/components/Dropdown.svelte
+++ b/src/lib/components/Dropdown.svelte
@@ -1,43 +1,51 @@
-
-
- isOpen = !isOpen}>
- {#if indicator}
- {@html isOpen ? DropdownIcon.open : DropdownIcon.closed }
- {/if}
-
-
-
-
-
\ No newline at end of file
+
+
+ (isOpen = !isOpen)}>
+ {#if indicator}
+ {@html isOpen ? DropdownIcon.open : DropdownIcon.closed}
+ {/if}
+
+
+
+ {#if isOpen}
+
+ {/if}
+
diff --git a/src/lib/components/Nav.svelte b/src/lib/components/Nav.svelte
index 6018b49..5879ace 100644
--- a/src/lib/components/Nav.svelte
+++ b/src/lib/components/Nav.svelte
@@ -1,110 +1,136 @@
-
-
+
diff --git a/src/lib/components/NavLinkParent.svelte b/src/lib/components/NavLinkParent.svelte
index b15005a..57ea726 100644
--- a/src/lib/components/NavLinkParent.svelte
+++ b/src/lib/components/NavLinkParent.svelte
@@ -1,14 +1,39 @@
-
- {text}
- {#each children ?? [] as child}
- {child.text}
- {/each}
-
\ No newline at end of file
+{#if !isMobile}
+
+ {text}
+ {#each children ?? [] as child}
+ {child.text}
+ {/each}
+
+{:else}
+
+ {#if isOpen}
+
+ {/if}
+{/if}
diff --git a/src/lib/components/NavLinks.svelte b/src/lib/components/NavLinks.svelte
index b7643b1..51c657e 100644
--- a/src/lib/components/NavLinks.svelte
+++ b/src/lib/components/NavLinks.svelte
@@ -2,10 +2,12 @@
import { type NavLinkItem } from '$lib/types/Nav/NavLinkItem';
import NavLinkParent from './NavLinkParent.svelte';
+ export let isMobile = false;
+
const links: NavLinkItem[] = [
{
text: 'Products',
- href: '/products',
+ href: '/products'
},
{
text: 'Parent',
@@ -13,26 +15,26 @@
children: [
{
text: 'Submenu 1',
- href: '/',
+ href: '/'
},
{
text: 'Submenu 2',
- href: '/',
- },
- ],
+ href: '/'
+ }
+ ]
},
{
text: 'Example Product',
- href: '/tools/exampleproduct',
- },
+ href: '/tools/exampleproduct'
+ }
];
-
+
{#each links as link}
{#if link.isParent}
-
+
{:else}
{link.text}
{/if}
diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte
index e9471e0..600a745 100644
--- a/src/routes/+layout.svelte
+++ b/src/routes/+layout.svelte
@@ -6,13 +6,13 @@
import { invalidate } from '$app/navigation';
import CookieConsent from '$lib/components/CookieConsent.svelte';
import Nav from '$lib/components/Nav.svelte';
+ import { slide } from 'svelte/transition';
+ import { cubicInOut } from 'svelte/easing';
export let data;
let { supabase, session } = data;
$: ({ supabase, session } = data);
-
-
let localGeneral: any;
const unsubscribeToGeneralStore = general.subscribe((value) => {
localGeneral = value;
@@ -40,10 +40,6 @@
return () => data.subscription.unsubscribe();
});
-
-
-
-
@@ -126,52 +122,53 @@
-
- {#if localGeneral.toastType == 'success'}
-
- {:else}
-
-
-
-
-
- {/if}
+{#if !localGeneral.hideToast}
+
+ {#if localGeneral.toastType == 'success'}
+
+ {:else}
+
+
+
+
+
+ {/if}
-
{localGeneral.toastMessage == '' ? 'Added to basket' : localGeneral.toastMessage}
-
+
{localGeneral.toastMessage == '' ? 'Added to basket' : localGeneral.toastMessage}
+
+{/if}