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 @@