Skip to content

Commit

Permalink
docs: fix usage
Browse files Browse the repository at this point in the history
  • Loading branch information
atinux committed Aug 19, 2024
1 parent 7f450f1 commit d5d0864
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions docs/pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,19 @@ useSeoMeta({
ogDescription: page.value.description,
ogImage: joinURL(url, '/social-card.png')
})
const videoLink = page.value.hero.links.find(link => link.id === 'intro-video')
videoLink.click = (e) => {
if (e.ctrlKey || e.metaKey) {
return
}
e?.preventDefault()
videoModalOpen.value = true
}
const videoLink = page.value?.hero?.links?.find(link => link.id === 'intro-video') || {}
onMounted(() => {
mediumZoom('[data-zoom-src]', {
margin: 5
})
videoLink.click = (e) => {
if (e.ctrlKey || e.metaKey) {
return
}
e?.preventDefault()
videoModalOpen.value = true
}
})
</script>

Expand Down

0 comments on commit d5d0864

Please sign in to comment.