chore(docs): cleanup

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
braks
2023-05-02 23:27:09 +02:00
committed by Braks
parent af126607bc
commit 87c55541dd
9 changed files with 60 additions and 184 deletions
+9 -3
View File
@@ -6,13 +6,15 @@ import Heart from '~icons/mdi/heart'
const breakpoints = useBreakpoints(breakpointsTailwind)
const dark = ref(false)
const isDark = ref(false)
onMounted(() => {
const html = document.getElementsByTagName('html')![0]
isDark.value = html.classList.contains('dark')
const observer = new MutationObserver(() => {
dark.value = html.classList.contains('dark')
isDark.value = html.classList.contains('dark')
})
observer.observe(html, {
@@ -20,6 +22,10 @@ onMounted(() => {
attributeOldValue: true,
attributeFilter: ['class'],
})
onBeforeUnmount(() => {
observer.disconnect()
})
})
const initialEdges = [
@@ -186,7 +192,7 @@ function scrollTo() {
<template>
<VueFlow ref="el">
<Background variant="lines" :pattern-color="dark ? '#ffffff' : '#000000'" :size="0.7" :gap="100" />
<Background variant="lines" :pattern-color="isDark ? '#fff' : '#000'" :size="0.7" :gap="100" />
<template #node-box="props">
<template v-if="props.id === 'intro'">