Skip to content

Commit 8e0d26b

Browse files
committed
add: scroll bobber now scrolls
1 parent d64d00c commit 8e0d26b

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

src/App.svelte

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
<p class="mt-100 mb-10">theres no content here yet...</p>
3232
</main>
33-
<footer class="hidden w-full md:flex flex-row justify-end fixed bottom-0 p-1">
33+
<footer class="hidden md:flex flex-row justify-end fixed bottom-0 right-0 p-1">
3434
<a
3535
href="https://github.com/jumpyjacko/jumpyjacko.github.io"
3636
target="_blank"
@@ -39,7 +39,11 @@
3939
source code
4040
</a>
4141
</footer>
42-
<div class="fixed bottom-0 w-full flex justify-center pb-1 z-[-1]">
42+
<button
43+
class="fixed bottom-0 w-full flex justify-center pt-4 pb-1"
44+
onclick={() => window.scrollBy(0, window.innerHeight / 2)}
45+
aria-label="Scroll to content"
46+
>
4347
<svg
4448
bind:this={scrollIndicator}
4549
width="60"
@@ -53,7 +57,7 @@
5357
fill="none"
5458
/>
5559
</svg>
56-
</div>
60+
</button>
5761

5862
<style>
5963
:global {

src/app.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@
99

1010
* {
1111
transition: color 0.15s, background-color 0.15s;
12+
scroll-behavior: smooth;
1213
}

0 commit comments

Comments
 (0)