|
@@ -1,5 +1,23 @@
|
|
|
<template>
|
|
|
- <div class="index">
|
|
|
+ <div v-if="showVideo" class="index-video">
|
|
|
+ <img
|
|
|
+ class="muted"
|
|
|
+ :src="isMuted ? MutedIcon : UnMutedIcon"
|
|
|
+ @click="handleMuted"
|
|
|
+ />
|
|
|
+
|
|
|
+ <video
|
|
|
+ id="bgVideo"
|
|
|
+ autoplay
|
|
|
+ muted
|
|
|
+ src="./index.mp4"
|
|
|
+ @ended="showVideo = false"
|
|
|
+ />
|
|
|
+
|
|
|
+ <img class="skip" src="./images/skip.png" @click="showVideo = false" />
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div v-else class="index">
|
|
|
<div class="index-header">
|
|
|
<ul>
|
|
|
<li
|
|
@@ -23,6 +41,21 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
+<script setup>
|
|
|
+import { ref } from "vue";
|
|
|
+import MutedIcon from "./images/muted.png";
|
|
|
+import UnMutedIcon from "./images/unmuted.png";
|
|
|
+
|
|
|
+const showVideo = ref(true);
|
|
|
+const isMuted = ref(true);
|
|
|
+
|
|
|
+const handleMuted = () => {
|
|
|
+ const video = document.getElementById("bgVideo");
|
|
|
+ isMuted.value = !isMuted.value;
|
|
|
+ video.muted = isMuted.value;
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
<style lang="scss" scoped>
|
|
|
@use "./index.scss";
|
|
|
</style>
|