From e98452673ea8f0d840ac53c4d24e9d02c0a57646 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fe=CC=81lix=20Pe=CC=81ault?= Date: Tue, 3 Mar 2020 20:38:49 +0100 Subject: [PATCH] Use ZenScroll for smooth scroll on anchors --- src/routes/index.svelte | 3 ++- src/utils/functions.js | 13 ------------- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/src/routes/index.svelte b/src/routes/index.svelte index 98860c4..0c69f85 100644 --- a/src/routes/index.svelte +++ b/src/routes/index.svelte @@ -24,6 +24,7 @@ // Dependencies import * as basicScroll from 'basicscroll' import AOS from 'aos' + import zenscroll from 'zenscroll' // Components import Button from '../atoms/Button' @@ -110,7 +111,7 @@

{$site.description}

-
diff --git a/src/utils/functions.js b/src/utils/functions.js index 24d009b..be52c89 100644 --- a/src/utils/functions.js +++ b/src/utils/functions.js @@ -57,19 +57,6 @@ export const isInViewport = element => { -/* -** Smooth Scroll -*/ -export const smoothScroll = (event, element = null) => { - document.querySelector(element).scrollIntoView({ - behavior: 'smooth', - block: 'start' - }) - event.preventDefault() -} - - - /* ** Random String Generator */