Dockerized the application, fixed fonts, improved SEO, upgraded to Nuxt 3.8.2
This commit is contained in:
+9
-15
@@ -13,9 +13,6 @@ const { pages } = storeToRefs(pageStore)
|
||||
|
||||
const swipe = useSwipe(card, {
|
||||
passive: true,
|
||||
onSwipe: (_touch: TouchEvent) => {
|
||||
console.log(card.value?.offsetWidth, swipe.lengthX.value)
|
||||
},
|
||||
onSwipeEnd: (_touch: TouchEvent, _direction: UseSwipeDirection) => {
|
||||
const currentPage = pages.value.find(
|
||||
(page) => page.path === route.fullPath,
|
||||
@@ -25,21 +22,18 @@ const swipe = useSwipe(card, {
|
||||
|
||||
if (
|
||||
card.value?.offsetWidth &&
|
||||
Math.abs(swipe.lengthX.value) / card.value?.offsetWidth >= 0.5
|
||||
Math.abs(swipe.lengthX.value) > 1.5 * Math.abs(swipe.lengthY.value) &&
|
||||
Math.abs(swipe.lengthX.value) / card.value?.offsetWidth >= 0.1
|
||||
) {
|
||||
if (swipe.lengthX.value > 0) {
|
||||
router.push(
|
||||
toRaw(pages.value)[
|
||||
currentIndex - 1 < 0
|
||||
router.push(
|
||||
toRaw(pages.value)[
|
||||
swipe.lengthX.value > 0
|
||||
? (currentIndex + 1) % pages.value.length
|
||||
: currentIndex - 1 < 0
|
||||
? pages.value.length - (currentIndex + 1)
|
||||
: currentIndex - 1
|
||||
].path,
|
||||
)
|
||||
} else {
|
||||
router.push(
|
||||
toRaw(pages.value)[(currentIndex + 1) % pages.value.length].path,
|
||||
)
|
||||
}
|
||||
].path,
|
||||
)
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user