fix
This commit is contained in:
parent
463537345b
commit
db22f4998c
11
package-lock.json
generated
11
package-lock.json
generated
@ -31,6 +31,7 @@
|
|||||||
"vue": "^3.2.45",
|
"vue": "^3.2.45",
|
||||||
"vue-3d-loader": "^2.1.5",
|
"vue-3d-loader": "^2.1.5",
|
||||||
"vue-router": "^4.1.6",
|
"vue-router": "^4.1.6",
|
||||||
|
"vue-youtube-embed": "^2.2.2",
|
||||||
"web3": "^1.8.2"
|
"web3": "^1.8.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
@ -10426,6 +10427,11 @@
|
|||||||
"node": ">=0.10.0"
|
"node": ">=0.10.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/vue-youtube-embed": {
|
||||||
|
"version": "2.2.2",
|
||||||
|
"resolved": "https://registry.npmmirror.com/vue-youtube-embed/-/vue-youtube-embed-2.2.2.tgz",
|
||||||
|
"integrity": "sha512-l/EJuFMRK43AN73N+qxJnN0LB3uPl2xAghmr3dCvODWGCRWGjmGfrHaOtD93fu9J4co+CZLv1KP3akAsldC1aw=="
|
||||||
|
},
|
||||||
"node_modules/warning": {
|
"node_modules/warning": {
|
||||||
"version": "4.0.3",
|
"version": "4.0.3",
|
||||||
"resolved": "https://registry.npmmirror.com/warning/-/warning-4.0.3.tgz",
|
"resolved": "https://registry.npmmirror.com/warning/-/warning-4.0.3.tgz",
|
||||||
@ -18710,6 +18716,11 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"vue-youtube-embed": {
|
||||||
|
"version": "2.2.2",
|
||||||
|
"resolved": "https://registry.npmmirror.com/vue-youtube-embed/-/vue-youtube-embed-2.2.2.tgz",
|
||||||
|
"integrity": "sha512-l/EJuFMRK43AN73N+qxJnN0LB3uPl2xAghmr3dCvODWGCRWGjmGfrHaOtD93fu9J4co+CZLv1KP3akAsldC1aw=="
|
||||||
|
},
|
||||||
"warning": {
|
"warning": {
|
||||||
"version": "4.0.3",
|
"version": "4.0.3",
|
||||||
"resolved": "https://registry.npmmirror.com/warning/-/warning-4.0.3.tgz",
|
"resolved": "https://registry.npmmirror.com/warning/-/warning-4.0.3.tgz",
|
||||||
|
@ -33,7 +33,8 @@
|
|||||||
"vue": "^3.2.45",
|
"vue": "^3.2.45",
|
||||||
"vue-3d-loader": "^2.1.5",
|
"vue-3d-loader": "^2.1.5",
|
||||||
"vue-router": "^4.1.6",
|
"vue-router": "^4.1.6",
|
||||||
"web3": "^1.8.2"
|
"web3": "^1.8.2",
|
||||||
|
"youtube-player": "^5.6.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@vitejs/plugin-vue": "^4.0.0",
|
"@vitejs/plugin-vue": "^4.0.0",
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<layout></layout>
|
<Layout></Layout>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import layout from "@/components/layout/index.vue";
|
import Layout from "@/components/layout/index.vue";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
@ -32,6 +32,7 @@
|
|||||||
}"
|
}"
|
||||||
:modules="modules"
|
:modules="modules"
|
||||||
:loop="true"
|
:loop="true"
|
||||||
|
:autoplay="{ delay: 3500, disableOnInteraction: false }"
|
||||||
class="mySwiper"
|
class="mySwiper"
|
||||||
ref="myRef"
|
ref="myRef"
|
||||||
>
|
>
|
||||||
@ -55,10 +56,11 @@ import {
|
|||||||
EffectCoverflow,
|
EffectCoverflow,
|
||||||
Thumbs,
|
Thumbs,
|
||||||
FreeMode,
|
FreeMode,
|
||||||
|
Autoplay,
|
||||||
Navigation,
|
Navigation,
|
||||||
Pagination,
|
Pagination,
|
||||||
} from "swiper";
|
} from "swiper";
|
||||||
import { Swiper, SwiperSlide } from "swiper/vue";
|
import { Swiper, SwiperSlide, } from "swiper/vue";
|
||||||
import "swiper/css";
|
import "swiper/css";
|
||||||
import "swiper/css/navigation";
|
import "swiper/css/navigation";
|
||||||
import "swiper/css/thumbs";
|
import "swiper/css/thumbs";
|
||||||
@ -69,13 +71,38 @@ const ratio = ref(0.2); //视差偏移率
|
|||||||
const positionY1 = ref(0); //背景Y轴偏移量
|
const positionY1 = ref(0); //背景Y轴偏移量
|
||||||
const box = ref(null);
|
const box = ref(null);
|
||||||
const myRef = ref(null);
|
const myRef = ref(null);
|
||||||
const modules = [Pagination];
|
const modules = [Pagination, Autoplay];
|
||||||
const imageList = reactive([
|
const imageList = reactive([
|
||||||
{ imgSrc: new URL("@/assets/img/home/game-swiper-card/01.png", import.meta.url).href },
|
{
|
||||||
{ imgSrc: new URL("@/assets/img/home/game-swiper-card/02.png", import.meta.url).href },
|
imgSrc: new URL(
|
||||||
{ imgSrc: new URL("@/assets/img/home/game-swiper-card/03.png", import.meta.url).href },
|
"@/assets/img/home/game-swiper-card/01.png",
|
||||||
{ imgSrc: new URL("@/assets/img/home/game-swiper-card/04.png", import.meta.url).href },
|
import.meta.url
|
||||||
{ imgSrc: new URL("@/assets/img/home/game-swiper-card/05.png", import.meta.url).href },
|
).href,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
imgSrc: new URL(
|
||||||
|
"@/assets/img/home/game-swiper-card/02.png",
|
||||||
|
import.meta.url
|
||||||
|
).href,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
imgSrc: new URL(
|
||||||
|
"@/assets/img/home/game-swiper-card/03.png",
|
||||||
|
import.meta.url
|
||||||
|
).href,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
imgSrc: new URL(
|
||||||
|
"@/assets/img/home/game-swiper-card/04.png",
|
||||||
|
import.meta.url
|
||||||
|
).href,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
imgSrc: new URL(
|
||||||
|
"@/assets/img/home/game-swiper-card/05.png",
|
||||||
|
import.meta.url
|
||||||
|
).href,
|
||||||
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const handSlidePrev = () => {
|
const handSlidePrev = () => {
|
||||||
@ -141,7 +168,7 @@ function handleScroll() {
|
|||||||
}
|
}
|
||||||
.swiper {
|
.swiper {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
// padding-bottom: 50px;
|
// padding-bottom: 50px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.swiper-slide {
|
.swiper-slide {
|
||||||
@ -157,7 +184,6 @@ function handleScroll() {
|
|||||||
}
|
}
|
||||||
.swiper-content {
|
.swiper-content {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
}
|
}
|
||||||
.mySwiper {
|
.mySwiper {
|
||||||
position: relative;
|
position: relative;
|
||||||
@ -167,7 +193,6 @@ function handleScroll() {
|
|||||||
left: -640px;
|
left: -640px;
|
||||||
}
|
}
|
||||||
img {
|
img {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -193,15 +218,13 @@ function handleScroll() {
|
|||||||
:deep(.swiper-slide-next) {
|
:deep(.swiper-slide-next) {
|
||||||
margin-top: 100px;
|
margin-top: 100px;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
}
|
}
|
||||||
:deep(.swiper-slide-prev) {
|
:deep(.swiper-slide-prev) {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
}
|
}
|
||||||
.swiper-content {
|
.swiper-content {
|
||||||
padding-top: 136px;
|
padding-top: 136px;
|
||||||
padding-bottom: 300px;
|
padding-bottom: 300px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
84
src/components/global/VideomModal.vue
Normal file
84
src/components/global/VideomModal.vue
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
<template>
|
||||||
|
<div @click="openModal">
|
||||||
|
<h3>点击这里打开视频弹框</h3>
|
||||||
|
<a-modal
|
||||||
|
:visible="visible"
|
||||||
|
:destroyOnClose="true"
|
||||||
|
:closable="false"
|
||||||
|
:maskClosable="false"
|
||||||
|
:footer="null"
|
||||||
|
:wrapClassName="['video-modal']"
|
||||||
|
@cancel="closeModal"
|
||||||
|
>
|
||||||
|
<youtube :video-id="videoId" ref="youtubePlayer" :player-vars="playerOptions" @ready="onPlayerReady"></youtube>
|
||||||
|
</a-modal>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { ref, watch } from 'vue';
|
||||||
|
import { Modal } from 'ant-design-vue';
|
||||||
|
import VueYoutubeEmbed from 'vue-youtube-embed';
|
||||||
|
import 'ant-design-vue/dist/antd.css';
|
||||||
|
|
||||||
|
const visible = ref(false);
|
||||||
|
const videoId = 'REPLACE_WITH_YOUR_VIDEO_ID';
|
||||||
|
|
||||||
|
const openModal = () => {
|
||||||
|
visible.value = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
const closeModal = () => {
|
||||||
|
visible.value = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
const playerOptions = {
|
||||||
|
autoplay: 1,
|
||||||
|
controls: 1,
|
||||||
|
showinfo: 0,
|
||||||
|
rel: 0,
|
||||||
|
fs: 1,
|
||||||
|
iv_load_policy: 3,
|
||||||
|
};
|
||||||
|
|
||||||
|
const youtubePlayer = ref(null);
|
||||||
|
|
||||||
|
const onPlayerReady = (event) => {
|
||||||
|
if (event.target) {
|
||||||
|
event.target.playVideo();
|
||||||
|
event.target.getIframe().requestFullscreen().catch((error) => {
|
||||||
|
console.warn('无法全屏播放', error);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
watch(visible, (value) => {
|
||||||
|
if (!value && youtubePlayer.value) {
|
||||||
|
youtubePlayer.value.player.stopVideo();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.video-modal {
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.video-modal .ant-modal {
|
||||||
|
top: 0;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.video-modal .ant-modal-content {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.video-modal .ant-modal-body {
|
||||||
|
padding: 0;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
</style>
|
91
src/components/global/YouTubeVideo.vue
Normal file
91
src/components/global/YouTubeVideo.vue
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
<script setup>
|
||||||
|
import { ref, watch, onMounted, onBeforeUnmount } from "vue";
|
||||||
|
import YouTubePlayer from "youtube-player";
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
id: { type: String, default: "" },
|
||||||
|
src: { type: String, required: true },
|
||||||
|
width: { type: Number, default: 0 },
|
||||||
|
height: { type: Number, default: 0 }
|
||||||
|
});
|
||||||
|
|
||||||
|
const emit = defineEmits(["ended", "play", "pause"]);
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
initPlayer();
|
||||||
|
loadPlayer();
|
||||||
|
});
|
||||||
|
|
||||||
|
onBeforeUnmount(() => {
|
||||||
|
player && player.destroy();
|
||||||
|
});
|
||||||
|
|
||||||
|
const getVideoId = () => {
|
||||||
|
try {
|
||||||
|
const url = new URL(props.src);
|
||||||
|
return url.searchParams.get("v") || "";
|
||||||
|
} catch (error) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
let player = null;
|
||||||
|
const initPlayer = () => {
|
||||||
|
try {
|
||||||
|
player = YouTubePlayer(`youtube-${props.id}`, {
|
||||||
|
host: "https://www.youtube.com",
|
||||||
|
width: props.width,
|
||||||
|
height: props.height,
|
||||||
|
videoId: getVideoId(),
|
||||||
|
playsinline: 1,
|
||||||
|
rel: 0
|
||||||
|
});
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const loadPlayer = () => {
|
||||||
|
try {
|
||||||
|
player.loadVideoById(getVideoId());
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const play = () => player && player.playVideo();
|
||||||
|
const pause = () => player && player.pauseVideo();
|
||||||
|
|
||||||
|
// -1(未开始)0(已结束)1(正在播放)2(已暂停)3(正在缓冲)5(视频已插入)
|
||||||
|
let stateChangeListener;
|
||||||
|
const addStateChange = () => {
|
||||||
|
stateChangeListener = player?.on("stateChange", (event) => {
|
||||||
|
if (event.data === 0) emit("ended");
|
||||||
|
if (event.data === 1) emit("play");
|
||||||
|
if (event.data === 2) emit("pause");
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const removeStateChange = () => {
|
||||||
|
if (stateChangeListener && player) player.off(stateChangeListener);
|
||||||
|
};
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => props.src,
|
||||||
|
() => loadPlayer()
|
||||||
|
);
|
||||||
|
|
||||||
|
defineExpose({ play, pause });
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="youtube-video">
|
||||||
|
<div :id="'youtube-' + id"></div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.youtube-video {
|
||||||
|
width: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
</style>
|
@ -19,6 +19,7 @@
|
|||||||
}"
|
}"
|
||||||
:modules="modules"
|
:modules="modules"
|
||||||
:loop="true"
|
:loop="true"
|
||||||
|
:autoplay="{ delay: 3000, disableOnInteraction: false }"
|
||||||
class="mySwiper"
|
class="mySwiper"
|
||||||
ref="myRef"
|
ref="myRef"
|
||||||
:navigation="{
|
:navigation="{
|
||||||
@ -47,6 +48,7 @@ import {
|
|||||||
EffectCoverflow,
|
EffectCoverflow,
|
||||||
Thumbs,
|
Thumbs,
|
||||||
FreeMode,
|
FreeMode,
|
||||||
|
Autoplay,
|
||||||
Navigation,
|
Navigation,
|
||||||
Pagination,
|
Pagination,
|
||||||
} from "swiper";
|
} from "swiper";
|
||||||
@ -68,7 +70,7 @@ const imageList = reactive([
|
|||||||
{ imgSrc: new URL("@/assets/img/home/game-swiper-card/04.png", import.meta.url).href },
|
{ imgSrc: new URL("@/assets/img/home/game-swiper-card/04.png", import.meta.url).href },
|
||||||
{ imgSrc: new URL("@/assets/img/home/game-swiper-card/05.png", import.meta.url).href },
|
{ imgSrc: new URL("@/assets/img/home/game-swiper-card/05.png", import.meta.url).href },
|
||||||
]);
|
]);
|
||||||
const modules = [EffectCoverflow, Pagination];
|
const modules = [EffectCoverflow, Pagination,Autoplay];
|
||||||
const boxStyle4 = computed(() => ({
|
const boxStyle4 = computed(() => ({
|
||||||
perspective: "300px",
|
perspective: "300px",
|
||||||
transition: "0s",
|
transition: "0s",
|
||||||
|
@ -5,6 +5,8 @@
|
|||||||
:thumbs="{ swiper: thumbsSwiper }"
|
:thumbs="{ swiper: thumbsSwiper }"
|
||||||
:modules="modules"
|
:modules="modules"
|
||||||
class="mySwiper2"
|
class="mySwiper2"
|
||||||
|
:loop="true"
|
||||||
|
:autoplay="{ delay: 3500, disableOnInteraction: false }"
|
||||||
ref="myRef"
|
ref="myRef"
|
||||||
:navigation="{
|
:navigation="{
|
||||||
nextEl: '.swiper-button1-next',
|
nextEl: '.swiper-button1-next',
|
||||||
@ -55,8 +57,8 @@ import "swiper/css";
|
|||||||
import "swiper/css/free-mode";
|
import "swiper/css/free-mode";
|
||||||
import "swiper/css/navigation";
|
import "swiper/css/navigation";
|
||||||
import "swiper/css/thumbs";
|
import "swiper/css/thumbs";
|
||||||
import { FreeMode, Navigation, Thumbs } from "swiper";
|
import { FreeMode, Navigation, Thumbs , Autoplay} from "swiper";
|
||||||
const modules = [Thumbs, FreeMode];
|
const modules = [Thumbs, FreeMode,Autoplay];
|
||||||
const myRef = ref(null);
|
const myRef = ref(null);
|
||||||
const activeIndex = ref(null);
|
const activeIndex = ref(null);
|
||||||
const imageList = reactive([
|
const imageList = reactive([
|
||||||
|
@ -21,48 +21,15 @@
|
|||||||
<img src="@/assets/img/home/gallery-boder.png" alt="" />
|
<img src="@/assets/img/home/gallery-boder.png" alt="" />
|
||||||
</div>
|
</div>
|
||||||
<div class="slogan">
|
<div class="slogan">
|
||||||
<!-- <div class="slogan-title">CEBG WORK IN-PROCESS WORK SHOW.</div> -->
|
|
||||||
<div class="slogan-text">
|
<div class="slogan-text">
|
||||||
Come to be COMMENDER! Enjoy 3D CEBG and fight against other players!
|
Come to be COMMENDER! Enjoy 3D CEBG and fight against other players!
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="gallery-banner">
|
|
||||||
<div
|
|
||||||
v-for="(item, index) in imageList"
|
|
||||||
:key="index"
|
|
||||||
@click="handleClick(item)"
|
|
||||||
>
|
|
||||||
<img class="gallery-img" :src="item.imgSrc" alt="" />
|
|
||||||
</div>
|
|
||||||
</div> -->
|
|
||||||
<GalleryBanner></GalleryBanner>
|
<GalleryBanner></GalleryBanner>
|
||||||
<div class="btn">
|
<div class="btn">
|
||||||
<div class="go-to-btn"></div>
|
<!-- <div class="go-to-btn"></div> -->
|
||||||
</div>
|
</div>
|
||||||
<!-- <swiper
|
|
||||||
:modules="modules"
|
|
||||||
:loop="true"
|
|
||||||
:slides-per-view="3.5"
|
|
||||||
:space-between="15"
|
|
||||||
:autoplay="{ delay: 10000, disableOnInteraction: false }"
|
|
||||||
>
|
|
||||||
<swiper-slide v-for="(item, index) in imageList" :key="index">
|
|
||||||
<div class="hero-container">
|
|
||||||
<div class="mask">
|
|
||||||
<div class="background-tripple-corners-rectange">
|
|
||||||
<img
|
|
||||||
src="@/assets/img/home/gallery-botom-boder.png"
|
|
||||||
alt=""
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div class="video-btn">
|
|
||||||
<img src="@/assets/img/home/video-btn.png" alt="" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<img class="gallery-img" :src="item.imgSrc" alt="" />
|
|
||||||
</div>
|
|
||||||
</swiper-slide>
|
|
||||||
</swiper> -->
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="gameplay-bottom">
|
<div class="gameplay-bottom">
|
||||||
@ -90,16 +57,6 @@
|
|||||||
<img src="@/assets/img/home/viod-boder.png" alt="" />
|
<img src="@/assets/img/home/viod-boder.png" alt="" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
|
||||||
<iframe
|
|
||||||
:src="videoSrc"
|
|
||||||
frameborder="0"
|
|
||||||
allowfullscreen="true"
|
|
||||||
scrolling="no"
|
|
||||||
width="100%"
|
|
||||||
height="100%"
|
|
||||||
></iframe>
|
|
||||||
</div>
|
|
||||||
<VideoModal ref="videoModal" :video-src="videoSrc"> </VideoModal>
|
<VideoModal ref="videoModal" :video-src="videoSrc"> </VideoModal>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
<swiper
|
<swiper
|
||||||
@swiper="setHeroSwiper"
|
@swiper="setHeroSwiper"
|
||||||
:slides-per-view="1"
|
:slides-per-view="1"
|
||||||
|
:autoplay="{ delay: 3000, disableOnInteraction: false }"
|
||||||
:thumbs="{ swiper: heroThumbsSwiper }"
|
:thumbs="{ swiper: heroThumbsSwiper }"
|
||||||
:modules="modules"
|
:modules="modules"
|
||||||
class="hero-big"
|
class="hero-big"
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
<div class="dropdown">
|
<div class="dropdown">
|
||||||
<ul>
|
<ul>
|
||||||
<li v-for="(item, index) in nav.submenu" :key="index">
|
<li v-for="(item, index) in nav.submenu" :key="index">
|
||||||
<a class="link-name" href="#" v-if="i !== 2">
|
<a class="link-name" :href="item.link" v-if="i !== 2">
|
||||||
{{ item.label }}
|
{{ item.label }}
|
||||||
<img
|
<img
|
||||||
class="link-img"
|
class="link-img"
|
||||||
@ -129,11 +129,11 @@ const navList = reactive([
|
|||||||
name: "COMMUNITY",
|
name: "COMMUNITY",
|
||||||
path: "/contact",
|
path: "/contact",
|
||||||
submenu: [
|
submenu: [
|
||||||
{ label: "Twitter", link: "/products/1" },
|
{ label: "Twitter", link: "https://twitter.com/CEBG_GAME" },
|
||||||
{ label: "Youtube", link: "/products/2" },
|
{ label: "Youtube", link: "https://youtube.com/c/CryptoElitesBattlegrounds" },
|
||||||
{ label: "Facebook", link: "/products/3" },
|
{ label: "Facebook", link: "https://www.facebook.com/profile.php?id=100090965821157&mibextid=LQQJ4d" },
|
||||||
{ label: "Medium", link: "/products/3" },
|
{ label: "Medium", link: "https://medium.com/@CEBG-BATTLEGROUNDS" },
|
||||||
{ label: "Telegram", link: "/products/3" },
|
{ label: "Telegram", link: "https://t.me/CEBG_Rally" },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
@ -1,47 +0,0 @@
|
|||||||
<template>
|
|
||||||
<nav>
|
|
||||||
<ul>
|
|
||||||
<li
|
|
||||||
v-for="(navItem, index) in navItems"
|
|
||||||
:key="navItem.name"
|
|
||||||
@click="navigate(navItem.path, index)"
|
|
||||||
:class="{ 'active': activeIndex === index }"
|
|
||||||
>
|
|
||||||
{{ navItem.name }}
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</nav>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup>
|
|
||||||
import { ref, watchEffect } from 'vue';
|
|
||||||
import { useRouter, useRoute } from 'vue-router';
|
|
||||||
|
|
||||||
const navItems = [
|
|
||||||
{ name: 'Home', path: '/' },
|
|
||||||
{ name: 'About', path: '/about' },
|
|
||||||
// Add more items as needed
|
|
||||||
];
|
|
||||||
|
|
||||||
const router = useRouter();
|
|
||||||
const route = useRoute();
|
|
||||||
const activeIndex = ref(0);
|
|
||||||
|
|
||||||
const navigate = (path, index) => {
|
|
||||||
activeIndex.value = index;
|
|
||||||
router.push(path);
|
|
||||||
};
|
|
||||||
|
|
||||||
watchEffect(() => {
|
|
||||||
const index = navItems.findIndex((navItem) => navItem.path === route.path);
|
|
||||||
activeIndex.value = index !== -1 ? index : 0;
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
.active {
|
|
||||||
/* Add your active style here */
|
|
||||||
font-weight: bold;
|
|
||||||
color: blue;
|
|
||||||
}
|
|
||||||
</style>
|
|
18
src/main.js
18
src/main.js
@ -1,16 +1,16 @@
|
|||||||
import { createApp } from 'vue'
|
import { createApp } from "vue";
|
||||||
// import './style.css'
|
// import './style.css'
|
||||||
import './style/rest.css';
|
import "./style/rest.css";
|
||||||
import 'normalize.css';
|
import "normalize.css";
|
||||||
import "@/assets/text/text.css";
|
import "@/assets/text/text.css";
|
||||||
import Antd from 'ant-design-vue';
|
import Antd from "ant-design-vue";
|
||||||
import 'ant-design-vue/dist/antd.css';
|
import "ant-design-vue/dist/antd.css";
|
||||||
import pinia from "@/store";
|
import pinia from "@/store";
|
||||||
import router from "./router/index";
|
import router from "./router/index";
|
||||||
import VueAnimXyz from '@animxyz/vue3'
|
import VueAnimXyz from "@animxyz/vue3";
|
||||||
import '@animxyz/core' // Import css here if you haven't elsewhere
|
import "@animxyz/core"; // Import css here if you haven't elsewhere
|
||||||
import App from './App.vue'
|
import App from "./App.vue";
|
||||||
import vue3dLoader from "vue-3d-loader";
|
import vue3dLoader from "vue-3d-loader";
|
||||||
|
|
||||||
const app = createApp(App);
|
const app = createApp(App);
|
||||||
app.use(pinia).use(VueAnimXyz).use(vue3dLoader).use(Antd).use(router).mount('#app')
|
app.use(pinia).use(VueAnimXyz).use(vue3dLoader).use(Antd).use(router).mount("#app");
|
||||||
|
@ -1,12 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<!-- <NavBar></NavBar> -->
|
|
||||||
<IntroductionBanner></IntroductionBanner>
|
<IntroductionBanner></IntroductionBanner>
|
||||||
<VisionMission></VisionMission>
|
<VisionMission></VisionMission>
|
||||||
<Roadmap></Roadmap>
|
<Roadmap></Roadmap>
|
||||||
<Whitepaper></Whitepaper>
|
<Whitepaper></Whitepaper>
|
||||||
<LatestNews></LatestNews>
|
<LatestNews></LatestNews>
|
||||||
<!-- <FooterBar></FooterBar> -->
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user