mirror of
https://github.com/amir20/dozzle.git
synced 2025-12-28 16:06:40 +01:00
Updates with dark and light video
This commit is contained in:
@@ -1,10 +1,34 @@
|
||||
<script setup></script>
|
||||
<script lang="ts" setup>
|
||||
import { useMutationObserver } from "@vueuse/core";
|
||||
import { onMounted, ref } from "vue";
|
||||
|
||||
const isDark = ref(false);
|
||||
onMounted(() => {
|
||||
isDark.value = document.documentElement.classList.contains("dark");
|
||||
});
|
||||
|
||||
useMutationObserver(
|
||||
document.documentElement,
|
||||
(mutations) => {
|
||||
isDark.value = document.documentElement.classList.contains("dark");
|
||||
},
|
||||
{
|
||||
attributes: true,
|
||||
attributeFilter: ["class"],
|
||||
}
|
||||
);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<browser-window drop-shadow-md>
|
||||
<video muted loop autoplay playsinline poster="../media/poster.png">
|
||||
<source src="../media/dozzle.webm" type="video/webm" />
|
||||
<source src="../media/dozzle.mp4" type="video/mp4" />
|
||||
<video muted loop autoplay playsinline poster="../media/poster.png" v-if="isDark">
|
||||
<source src="../media/dozzle-dark.webm" type="video/webm" />
|
||||
<source src="../media/dozzle-dark.mp4" type="video/mp4" />
|
||||
<img src="../media/poster.png" alt="" />
|
||||
</video>
|
||||
<video muted loop autoplay playsinline poster="../media/poster.png" v-else>
|
||||
<source src="../media/dozzle-light.webm" type="video/webm" />
|
||||
<source src="../media/dozzle-light.mp4" type="video/mp4" />
|
||||
<img src="../media/poster.png" alt="" />
|
||||
</video>
|
||||
</browser-window>
|
||||
|
||||
BIN
docs/.vitepress/theme/media/dozzle-light.mp4
Normal file
BIN
docs/.vitepress/theme/media/dozzle-light.mp4
Normal file
Binary file not shown.
BIN
docs/.vitepress/theme/media/dozzle-light.webm
Normal file
BIN
docs/.vitepress/theme/media/dozzle-light.webm
Normal file
Binary file not shown.
Reference in New Issue
Block a user