主页移除占位内容并迁移为 /demo 演示页
- 主页删除推荐/热门视频占位区与 mock 数据引用,仅保留页脚(主题/语言切换、占位链接、站点版权)并让页脚贴底 - 新增 DemoView 原样保留占位模板,注册 /demo 懒加载路由(无入口链接、无守卫) - 占位组件与 mock 数据保留供演示页使用,入口包体积减小
This commit is contained in:
3 files changed
+60
-18
No files matched your search
@@ -18,6 +18,11 @@ const router = createRouter({
|
||||
name: 'home',
|
||||
component: HomeView,
|
||||
},
|
||||
{
|
||||
path: '/demo',
|
||||
name: 'demo',
|
||||
component: () => import('../views/DemoView.vue'),
|
||||
},
|
||||
{
|
||||
path: '/login',
|
||||
name: 'login',
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import VideoSection from '@/components/home/VideoSection.vue'
|
||||
import LanguageSwitcher from '@/components/layout/LanguageSwitcher.vue'
|
||||
import ThemeSwitcher from '@/components/layout/ThemeSwitcher.vue'
|
||||
import { hotVideos, recommendVideos } from '@/mock/home'
|
||||
import { useSiteStore } from '@/stores/site'
|
||||
|
||||
const { t } = useI18n()
|
||||
const site = useSiteStore()
|
||||
|
||||
const recommendTabs = [
|
||||
'category.all',
|
||||
'category.anime',
|
||||
'category.movie',
|
||||
'category.video',
|
||||
] as const
|
||||
|
||||
const footerLinkKeys = [
|
||||
'footer.links.about',
|
||||
'footer.links.help',
|
||||
'footer.links.terms',
|
||||
'footer.links.privacy',
|
||||
'footer.links.guidelines',
|
||||
'footer.links.contact',
|
||||
] as const
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="mx-auto max-w-[1600px] space-y-6 px-4 py-4">
|
||||
<VideoSection
|
||||
:title="t('home.recommend')"
|
||||
:tabs="recommendTabs.map((key) => t(key))"
|
||||
:videos="recommendVideos"
|
||||
/>
|
||||
<VideoSection :title="t('home.hot')" :videos="hotVideos" />
|
||||
|
||||
<footer class="rounded-xl bg-surface px-6 py-6 text-center text-xs text-content-3">
|
||||
<div class="mb-4 flex flex-wrap items-center justify-center gap-x-6 gap-y-3">
|
||||
<ThemeSwitcher />
|
||||
<LanguageSwitcher />
|
||||
</div>
|
||||
<nav class="mb-3 flex flex-wrap items-center justify-center gap-x-4 gap-y-2">
|
||||
<a v-for="key in footerLinkKeys" :key="key" href="#" class="hover:text-primary">
|
||||
{{ t(key) }}
|
||||
</a>
|
||||
</nav>
|
||||
<p>{{ site.footer || t('footer.copyright') }}</p>
|
||||
</footer>
|
||||
</div>
|
||||
</template>
|
||||
@@ -1,21 +1,12 @@
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import VideoSection from '@/components/home/VideoSection.vue'
|
||||
import LanguageSwitcher from '@/components/layout/LanguageSwitcher.vue'
|
||||
import ThemeSwitcher from '@/components/layout/ThemeSwitcher.vue'
|
||||
import { hotVideos, recommendVideos } from '@/mock/home'
|
||||
import { useSiteStore } from '@/stores/site'
|
||||
|
||||
const { t } = useI18n()
|
||||
const site = useSiteStore()
|
||||
|
||||
const recommendTabs = [
|
||||
'category.all',
|
||||
'category.anime',
|
||||
'category.movie',
|
||||
'category.video',
|
||||
] as const
|
||||
|
||||
const footerLinkKeys = [
|
||||
'footer.links.about',
|
||||
'footer.links.help',
|
||||
@@ -27,15 +18,10 @@ const footerLinkKeys = [
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="mx-auto max-w-[1600px] space-y-6 px-4 py-4">
|
||||
<VideoSection
|
||||
:title="t('home.recommend')"
|
||||
:tabs="recommendTabs.map((key) => t(key))"
|
||||
:videos="recommendVideos"
|
||||
/>
|
||||
<VideoSection :title="t('home.hot')" :videos="hotVideos" />
|
||||
|
||||
<footer class="rounded-xl bg-surface px-6 py-6 text-center text-xs text-content-3">
|
||||
<div
|
||||
class="mx-auto flex min-h-[calc(100vh-3.5rem)] max-w-[1600px] flex-col px-4 py-4"
|
||||
>
|
||||
<footer class="mt-auto rounded-xl bg-surface px-6 py-6 text-center text-xs text-content-3">
|
||||
<div class="mb-4 flex flex-wrap items-center justify-center gap-x-6 gap-y-3">
|
||||
<ThemeSwitcher />
|
||||
<LanguageSwitcher />
|
||||
|
||||
Reference in New Issue
Block a user