added a leftbar
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
2023-02-12 10:59:55 +01:00
parent 57a50a5810
commit e1ed3d53db
6 changed files with 48 additions and 6 deletions

View File

@@ -1,9 +1,29 @@
<template>
<div class="h-screen snap-y snap-mandatory overflow-y-auto overflow-x-hidden bg-dark-200">
<Heading />
<About />
<Skills />
<LayoutLeftbar />
<div id="observe" class="h-screen snap-y snap-mandatory overflow-y-auto overflow-x-hidden bg-dark-200">
<SlidesHeading id="heading" />
<SlidesAbout id="about" />
<SlidesSkills id="skills" />
</div>
</template>
<script setup></script>
<script setup>
const router = useRouter()
const callback = (entries, observer) => {
entries.forEach(entry => {
if (entry.isIntersecting) {
router.replace({ hash: '#' + entry.target.id})
}
})
}
onMounted(() => {
let targets = document.querySelectorAll('section')
const observer = new IntersectionObserver(callback, { root: document.querySelector('#observe'), threshold: 0.9 })
targets.forEach(target => {
observer.observe(target)
})
})
</script>