diff --git a/svelte-app/src/app.scss b/svelte-app/src/app.scss index 1fb935fa3..5f64da3dd 100644 --- a/svelte-app/src/app.scss +++ b/svelte-app/src/app.scss @@ -30,23 +30,11 @@ img { body { @apply h-full w-full overflow-x-hidden; - @media (min-width: 0px) { background-color: $dark; - } - @media (min-width: 768px) { - background-color: $black; - } - --textColour: $light; &.light { - @media (min-width: 0px) { - background-color: $white; - } - @media (min-width: 768px) { - background-color: $light; - } - + background-color: $light; --textColour: $dark; } &:not(.is-loaded) { diff --git a/svelte-app/src/components/about/timeline.svelte b/svelte-app/src/components/about/timeline.svelte index b8dc857c3..a1ad326f9 100644 --- a/svelte-app/src/components/about/timeline.svelte +++ b/svelte-app/src/components/about/timeline.svelte @@ -75,22 +75,24 @@ icon="ChevronDown" class="{selected === i ? 'rotate-0' : '-rotate-90'} transition-all" /> -

- {dateDisplay(item.range.start, item.range.end)} -

-
-

+

- {item.title} -

- {#if item.subtitle} - -

{item.subtitle}

- {/if} + {dateDisplay(item.range.start, item.range.end)} +

+
+

+ {item.title} +

+ {#if item.subtitle} + +

{item.subtitle}

+ {/if} +
{#if selected === i && item.body} diff --git a/svelte-app/src/components/controls/language-toggle.svelte b/svelte-app/src/components/controls/language-toggle.svelte index ac2c8958c..d14fb8e06 100644 --- a/svelte-app/src/components/controls/language-toggle.svelte +++ b/svelte-app/src/components/controls/language-toggle.svelte @@ -10,11 +10,6 @@ import Icon from '$components/icon.svelte'; import Tooltip from '$components/tooltip.svelte'; - export let langs = [ - { lang: 'en', name: 'English' }, - { lang: 'fr', name: 'Français' } - ]; - let modalOpen = false; const handleClick = (event: Event, lang: string) => { @@ -40,106 +35,43 @@ modalOpen = false; navOpen.set(false); }; - - $: _langs = langs as ((typeof langs)[0] & { active: boolean })[]; - (modalOpen = false)} - on:confirm={modalConfirm} -/> - - - + - - - + confirmText={$t('Continue')} + open={modalOpen} + on:close={() => (modalOpen = false)} + on:confirm={modalConfirm} + /> - - + + + + + diff --git a/svelte-app/src/components/controls/menu-toggle.svelte b/svelte-app/src/components/controls/menu-toggle.svelte index f4f631c71..3a3ba39b6 100644 --- a/svelte-app/src/components/controls/menu-toggle.svelte +++ b/svelte-app/src/components/controls/menu-toggle.svelte @@ -8,7 +8,8 @@ - -
- - -
- - {#if $navOpen} -
- {#each navLinks as link, index} - - {/each} -
- {/if} - diff --git a/svelte-app/src/components/nav/nav-link.svelte b/svelte-app/src/components/nav/nav-link.svelte index 54577b29a..3a7af1d18 100644 --- a/svelte-app/src/components/nav/nav-link.svelte +++ b/svelte-app/src/components/nav/nav-link.svelte @@ -4,6 +4,7 @@ import { goto } from '$app/navigation'; import { navigating, page } from '$app/stores'; import { isLocalized, linkTo, t } from '$i18n'; + import { BASE_ANIMATION_DURATION } from '$lib/consts'; import { navOpen } from '$stores/navigation'; import Hoverable from '$components/hoverable.svelte'; @@ -12,11 +13,6 @@ name: string; url: string; }, - links: { - name: string; - url: string; - }[], - index: number, mobile = false, navigatingIsActive = false; @@ -31,11 +27,10 @@ if (mobile) { navOpen.set(false); } - goto(link.url).catch(() => undefined); + goto($linkTo(link.url)).catch(() => undefined); }; $: splitPath = $page?.url.pathname.split('/') || []; - $: truePath = link.url.slice($isLocalized ? 4 : 1); $: (isActive = (() => { let urlIncludesLink = $page?.url.pathname === link.url; @@ -43,17 +38,18 @@ urlIncludesLink ||= $navigating?.to?.url.pathname === link.url; } - return urlIncludesLink || (splitPath?.length > 1 && splitPath.indexOf(truePath) > 0); + return ( + urlIncludesLink || + (splitPath?.length > 1 && splitPath.indexOf(link.url.slice(1)) > 0) + ); })()), navOpen; {$t(link.name)} + {#if !mobile && (isActive || isHovered)} + + {/if} {#if mobile && (isActive || isHovered)} {/if} @@ -82,25 +86,14 @@