From d78756f367e6da3046b6d4de4c847144a4c79495 Mon Sep 17 00:00:00 2001 From: Backwards Date: Thu, 16 Jan 2025 00:55:38 +0000 Subject: [PATCH] Moved Tracker to its own component and Fixed its coloring in light mode --- src/lib/components/Common/Tracker.svelte | 81 +++++++++++++ src/lib/stores/currentSection.js | 6 + src/routes/+page.svelte | 139 +++++++++++------------ src/routes/about/+page.svelte | 47 +++----- 4 files changed, 166 insertions(+), 107 deletions(-) create mode 100644 src/lib/components/Common/Tracker.svelte create mode 100644 src/lib/stores/currentSection.js diff --git a/src/lib/components/Common/Tracker.svelte b/src/lib/components/Common/Tracker.svelte new file mode 100644 index 0000000..966fac3 --- /dev/null +++ b/src/lib/components/Common/Tracker.svelte @@ -0,0 +1,81 @@ + + +

{currentSection}

+{#if includeFirst ? currentSection >= 0 : currentSection > 0} +
+ {#each slides as _, i} +
+ {/each} +
+{/if} + + diff --git a/src/lib/stores/currentSection.js b/src/lib/stores/currentSection.js new file mode 100644 index 0000000..90885fb --- /dev/null +++ b/src/lib/stores/currentSection.js @@ -0,0 +1,6 @@ +import { writable } from "svelte/store"; + +export let sectionStore = { + about: writable(), + main: writable() +}; \ No newline at end of file diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index fe71f60..379e771 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -1,92 +1,85 @@
- {#each slides as content} -
- -
- {/each} + {#each slides as content} +
+ +
+ {/each}
-{#if currentSection > 0} -
- {#each slides.slice(1) as _, i} -
- {/each} -
-{/if} + diff --git a/src/routes/about/+page.svelte b/src/routes/about/+page.svelte index a16cee7..929d142 100644 --- a/src/routes/about/+page.svelte +++ b/src/routes/about/+page.svelte @@ -1,17 +1,25 @@