forked from Backwards/backwards.dev
Fixed Tracker
This commit is contained in:
parent
a7d1cf28ba
commit
56545bc3a3
@ -7,8 +7,6 @@
|
||||
slides,
|
||||
includeFirst = true;
|
||||
|
||||
console.log(page, slides, includeFirst);
|
||||
|
||||
let newSlides = includeFirst ? slides : slides.slice(1);
|
||||
|
||||
let pageSection = sectionStore[page];
|
||||
@ -17,12 +15,9 @@
|
||||
|
||||
onMount(() => {
|
||||
pageSection.subscribe((cs) => {
|
||||
console.log(cs);
|
||||
currentSection = cs;
|
||||
});
|
||||
});
|
||||
|
||||
// let currentSection = 0
|
||||
</script>
|
||||
|
||||
{#if includeFirst ? currentSection >= 0 : currentSection > 0}
|
||||
@ -31,7 +26,7 @@
|
||||
out:fly={{ x: 50, duration: 300 }}
|
||||
class="tracker"
|
||||
>
|
||||
{#each slides as _, i}
|
||||
{#each newSlides as _, i}
|
||||
<div
|
||||
class="tracker-dot {(includeFirst ? i : i + 1) ===
|
||||
currentSection
|
||||
|
Loading…
x
Reference in New Issue
Block a user