aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2022-11-11 20:25:50 -0800
committerAdam Soltys <[email protected]>2022-11-11 20:25:50 -0800
commit801aeaf8175fd043a349addb48ee663986615b9a (patch)
treebbacbc0de60e4c19668a7f7752b8b2c3d00166c3 /src
parent20449bd44c6d6deefd357d2cdab6e26645b67afa (diff)
downloadcoinos-ui-801aeaf8175fd043a349addb48ee663986615b9a.tar.gz
coinos-ui-801aeaf8175fd043a349addb48ee663986615b9a.zip
logo scrolls to top
Diffstat (limited to 'src')
-rw-r--r--src/components/LandingHeader.svelte12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/components/LandingHeader.svelte b/src/components/LandingHeader.svelte
index 35b9de06..04ec1dca 100644
--- a/src/components/LandingHeader.svelte
+++ b/src/components/LandingHeader.svelte
@@ -10,19 +10,23 @@
export let user;
let showMobileMenu = false;
+ let header;
const mobileMenuButtonClick = (section) => {
showMobileMenu = false;
scroll(section);
};
</script>
-<header class="w-full lg:w-5/6 py-5 mx-auto fixed md:sticky z-10 top-0 bg-white/90">
+<header
+ class="w-full lg:w-5/6 py-5 mx-auto fixed md:sticky z-10 top-0 bg-white/90"
+ bind:this={header}
+>
<nav class="block xl:flex flex-wrap justify-between items-center">
<div class="flex justify-start md:justify-center items-center md:space-x-10">
- <a href="/" class="hidden md:block">
- <Icon icon="logo" style="mb-5 xl:mb-0" />
+ <a href="/" on:click={(() => console.log('HMM'), scroll(header))}>
+ <Icon icon="logo" style="hidden md:block mb-5 xl:mb-0" />
+ <Icon icon="logo" style="block md:hidden ml-5 w-48" />
</a>
- <Icon icon="logo" style="block md:hidden ml-5 w-48" />
</div>
<!-- desktop nav -->