@@ -42,7 +42,6 @@ const logoStyle = computed(() => ({
42
42
}))
43
43
44
44
const unlocked = ref (false )
45
- const ready = useTimeout (300 )
46
45
</script >
47
46
48
47
<template >
@@ -78,14 +77,25 @@ const ready = useTimeout(300)
78
77
</template >
79
78
80
79
<div >
81
- <div class =" [perspective:600px] mb-32 group" >
82
- <div ref =" target" class =" h-48 max-w-64 mx-auto" :style =" cardStyle" >
83
- <img :class =" unlocked ? 'opacity-100' : 'opacity-40'" class =" absolute left-0 top-0 h-full w-full" src =" ~/assets/browser.svg" :style =" browserStyle" >
84
- <img :class =" unlocked ? 'opacity-0' : 'opacity-100'" class =" absolute left-0 h-32 top-8 w-full" src =" ~/assets/nuxt-oidc-auth.svg" :style =" logoStyle" >
85
- <button class =" absolute w-full h-full" @click =" unlocked = !unlocked" />
80
+ <ClientOnly >
81
+ <div class =" [perspective:600px] mb-32 group" >
82
+ <div ref =" target" class =" h-48 max-w-64 mx-auto" :style =" cardStyle" >
83
+ <img loading =" lazy" alt =" browser" :class =" unlocked ? 'opacity-100' : 'opacity-40'" class =" absolute left-0 top-0 h-full w-full" src =" ~/assets/browser.svg" :style =" browserStyle" >
84
+ <img loading =" lazy" alt =" lock-sign" :class =" unlocked ? 'opacity-0' : 'opacity-100'" class =" absolute left-0 h-32 top-8 w-full" src =" ~/assets/nuxt-oidc-auth.svg" :style =" logoStyle" >
85
+ <button name =" nuxt-oidc-auth-unlock" class =" absolute w-full h-full" @click =" unlocked = !unlocked" />
86
+ </div >
87
+ <div class =" transition-all duration-300 ease-out h-2 absolute group-hover:shadow-[0px_70px_32px_4px_rgba(0,220,130,0.75)] shadow-[0px_70px_33px_3px_rgba(0,220,130,0.75)] bottom-0 lg:left-[27.5%] left-[35%] w-[30%] lg:w-[45%] bg-slate-700" :style =" shadowStyle" />
86
88
</div >
87
- <div :class =" ready ? 'transition-all' : 'transition-transform'" class =" duration-300 ease-out h-2 absolute group-hover:shadow-[0px_70px_32px_4px_rgba(0,220,130,0.75)] shadow-[0px_70px_33px_3px_rgba(0,220,130,0.75)] bottom-0 lg:left-[27.5%] left-[35%] w-[30%] lg:w-[45%] bg-slate-700" :style =" shadowStyle" />
88
- </div >
89
+ <template #fallback >
90
+ <div class =" [perspective:600px] mb-32 group" >
91
+ <div ref =" target" class =" h-48 max-w-64 mx-auto" >
92
+ <img loading =" lazy" alt =" browser" :class =" unlocked ? 'opacity-100' : 'opacity-40'" class =" absolute left-0 top-0 h-full w-full" src =" ~/assets/browser.svg" >
93
+ <img loading =" lazy" alt =" lock-sign" :class =" unlocked ? 'opacity-0' : 'opacity-100'" class =" absolute left-0 h-32 top-8 w-full" src =" ~/assets/nuxt-oidc-auth.svg" >
94
+ <button class =" absolute w-full h-full" @click =" unlocked = !unlocked" />
95
+ </div >
96
+ </div >
97
+ </template >
98
+ </ClientOnly >
89
99
<MDC
90
100
:value =" page.hero.code"
91
101
class =" prose prose-primary dark:prose-invert mx-auto"
0 commit comments