File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,21 @@ defineOgImageComponent('Docs')
19
19
const evanTestimonial = computed (() => {
20
20
return home .value ?.testimonials .items .find (item => item .author .name === ' Evan You' )
21
21
})
22
+
23
+ const demoVideoLink = home .value ?.deploy ?.buttons ?.find (link => link .id === ' demo-video' ) || {}
24
+ const videoLink = ref (' ' )
25
+ const videoModalOpen = ref (false )
26
+
27
+ onMounted (() => {
28
+ demoVideoLink .click = (e ) => {
29
+ if (e .ctrlKey || e .metaKey ) {
30
+ return
31
+ }
32
+ e ?.preventDefault ()
33
+ videoLink .value = demoVideoLink .to
34
+ videoModalOpen .value = true
35
+ }
36
+ })
22
37
</script >
23
38
24
39
<template >
@@ -169,6 +184,18 @@ const evanTestimonial = computed(() => {
169
184
</div >
170
185
</li >
171
186
</ul >
187
+ <UModal v-model =" videoModalOpen" :ui =" { width: 'sm:max-w-4xl lg:max-w-5xl aspect-[16/9]' }" >
188
+ <div class =" p-3 h-full" >
189
+ <iframe
190
+ width =" 100%"
191
+ height =" 100%"
192
+ :src =" `https://www.youtube-nocookie.com/embed/${videoLink.split('=')[1]}`"
193
+ frameborder =" 0"
194
+ allow =" accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
195
+ allowfullscreen
196
+ />
197
+ </div >
198
+ </UModal >
172
199
</ULandingSection >
173
200
<ULandingSection :title =" page.faq.title" :description =" page.faq.description" :ui =" { container: 'max-w-5xl' }" >
174
201
<ULandingFAQ :items =" page?.faq.items" multiple >
You can’t perform that action at this time.
0 commit comments