From c572ae1d6274daca941c6fd6acf8c59e0f817a5f Mon Sep 17 00:00:00 2001 From: Youwen Wu Date: Sat, 6 Apr 2024 00:24:13 -0700 Subject: [PATCH] feat: add back to top button on /blog --- src/lib/components/BackToTop.svelte | 29 +++++++++++++++++++++++++++++ src/routes/+layout.svelte | 2 +- src/routes/blog/+layout.svelte | 2 ++ src/routes/blog/+page.svelte | 2 +- 4 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 src/lib/components/BackToTop.svelte diff --git a/src/lib/components/BackToTop.svelte b/src/lib/components/BackToTop.svelte new file mode 100644 index 0000000..59d8e1b --- /dev/null +++ b/src/lib/components/BackToTop.svelte @@ -0,0 +1,29 @@ + + + + +{#if showButton} +
+ +
+{/if} diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index d81253c..ce217b3 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -1,5 +1,5 @@ + diff --git a/src/routes/blog/+page.svelte b/src/routes/blog/+page.svelte index c19719d..d5865f2 100644 --- a/src/routes/blog/+page.svelte +++ b/src/routes/blog/+page.svelte @@ -43,7 +43,7 @@ {#if loaded}

my blog on computer science, math, games, art, and more.