From 07e74844200fdbaf36f3e44572ea750783f15944 Mon Sep 17 00:00:00 2001 From: bcakmakoglu <78412429+bcakmakoglu@users.noreply.github.com> Date: Sat, 25 Jun 2022 00:13:27 +0200 Subject: [PATCH] chore(docs): enable animated background on intro node click --- docs/components/home/flows/Intro.vue | 110 +++++++++++++++++---------- 1 file changed, 68 insertions(+), 42 deletions(-) diff --git a/docs/components/home/flows/Intro.vue b/docs/components/home/flows/Intro.vue index 656b423c..d127504a 100644 --- a/docs/components/home/flows/Intro.vue +++ b/docs/components/home/flows/Intro.vue @@ -9,6 +9,7 @@ import Heart from '~icons/mdi/heart' const breakpoints = useBreakpoints(breakpointsTailwind) const dark = ref(false) +const animatedBackground = ref(false) onMounted(() => { const html = document.getElementsByTagName('html')![0] @@ -84,6 +85,8 @@ onNodeClick(async ({ node }) => { if (node.id === 'intro') { if (disabled.value) return + animatedBackground.value = !animatedBackground.value + if (clickInterval.value) { clearInterval(clickInterval.value) } @@ -243,44 +246,55 @@ const animations = ref<{ className: string; duration: number }[]>(shuffle(create