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
-25
View File
@@ -9,31 +9,6 @@ const isMobile = smaller('md')
const { blobity } = useBlobity()
const usesDark = useDark({
storageKey: 'vuepress-color-scheme',
selector: 'html',
})
const dark = ref(false)
onMounted(() => {
const html = document.getElementsByTagName('html')![0]
usesDark.value = html.classList.contains('dark')
const observer = new MutationObserver((mutations) => {
for (const _ of mutations) {
dark.value = html.classList.contains('dark')
}
})
observer.observe(html, {
attributes: true,
attributeOldValue: true,
attributeFilter: ['class'],
})
})
onMounted(() => {
if (isMobile.value) {
blobity.value.destroy()