mirror of https://github.com/MedzikUser/portfolio
Scroll bottom after clicking the arrow
This commit is contained in:
parent
85c764e28f
commit
47dabfb470
|
@ -11,6 +11,13 @@
|
||||||
import photo from '../assets/photo.jpg';
|
import photo from '../assets/photo.jpg';
|
||||||
import SignalIcon from '../lib/Signal.svelte';
|
import SignalIcon from '../lib/Signal.svelte';
|
||||||
import Arrow from '$lib/Arrow.svelte';
|
import Arrow from '$lib/Arrow.svelte';
|
||||||
|
|
||||||
|
function scrollBottom() {
|
||||||
|
window.scrollTo({
|
||||||
|
top: document.body.scrollHeight,
|
||||||
|
behavior: 'smooth',
|
||||||
|
});
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:head>
|
<svelte:head>
|
||||||
|
@ -60,9 +67,9 @@
|
||||||
</footer>
|
</footer>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="absolute bottom-16 h-8 w-8 text-on-primary-token animate-bounce">
|
<button class="absolute bottom-16 h-8 w-8 text-on-primary-token animate-bounce" on:click={scrollBottom}>
|
||||||
<Arrow />
|
<Arrow />
|
||||||
</div>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="project-gradient mx-auto flex justify-center items-center p-16">
|
<div class="project-gradient mx-auto flex justify-center items-center p-16">
|
||||||
|
|
Loading…
Reference in New Issue