mirror of
https://github.com/tachiyomiorg/website.git
synced 2024-12-21 07:31:58 +01:00
Fix rendering errors while build (#33)
* Fix rendering errors while build. * Add missing check.
This commit is contained in:
parent
5c33c7a1c7
commit
01f1803c84
@ -1,5 +1,5 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { inject } from "vue"
|
import { inject, onMounted, ref } from "vue"
|
||||||
import { useData } from "vitepress"
|
import { useData } from "vitepress"
|
||||||
|
|
||||||
import VPIconMoon from "vitepress/dist/client/theme-default/components/icons/VPIconMoon.vue"
|
import VPIconMoon from "vitepress/dist/client/theme-default/components/icons/VPIconMoon.vue"
|
||||||
@ -11,7 +11,12 @@ const toggleAppearance = inject("toggle-appearance", () => {
|
|||||||
isDark.value = !isDark.value
|
isDark.value = !isDark.value
|
||||||
})
|
})
|
||||||
|
|
||||||
const supportsViewTransition = "startViewTransition" in document
|
const supportsViewTransition = ref(false)
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
supportsViewTransition.value = "startViewTransition" in document
|
||||||
|
&& window.matchMedia("(prefers-reduced-motion: no-preference)").matches
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
Loading…
Reference in New Issue
Block a user