Files
AIGC/demo/frontend/src/views/Welcome.vue

292 lines
5.7 KiB
Vue
Raw Normal View History

2025-10-21 16:50:33 +08:00
<template>
<div class="welcome-page">
<!-- 导航栏 -->
<header class="navbar">
<div class="navbar-content">
2025-11-13 17:01:39 +08:00
<div class="logo">
<img src="/images/backgrounds/logo.svg" alt="Logo" />
</div>
2025-10-21 16:50:33 +08:00
<nav class="nav-links">
2025-11-13 17:01:39 +08:00
<a href="#" class="nav-link" @click.prevent="goToTextToVideo">{{ $t('welcome.textToVideo') }}</a>
<a href="#" class="nav-link" @click.prevent="goToImageToVideo">{{ $t('welcome.imageToVideo') }}</a>
<a href="#" class="nav-link" @click.prevent="goToStoryboardVideo">{{ $t('welcome.storyboardVideo') }}</a>
2025-10-21 16:50:33 +08:00
</nav>
<div class="nav-actions">
<LanguageSwitcher />
<button class="nav-button" @click="goToLogin">{{ $t('welcome.startExperience') }}</button>
</div>
2025-10-21 16:50:33 +08:00
</div>
</header>
<!-- 主要内容 -->
<main class="content">
<h1 class="title">
<span class="title-line">
<span class="bright-text">智创</span><span class="gradient-text">无限</span>
2025-10-21 16:50:33 +08:00
</span>
<span class="title-line">
<span class="bright-text">灵感</span><span class="gradient-text">变现</span>
2025-10-21 16:50:33 +08:00
</span>
</h1>
<button class="main-button" @click="goToLogin">立即体验</button>
2025-10-21 16:50:33 +08:00
</main>
</div>
</template>
<script setup>
import { useRouter } from 'vue-router'
import LanguageSwitcher from '@/components/LanguageSwitcher.vue'
const router = useRouter()
// 跳转到登录页面
const goToLogin = () => {
router.push('/login')
}
2025-11-13 17:01:39 +08:00
// 跳转到文生视频页面
const goToTextToVideo = () => {
router.push('/text-to-video/create')
}
// 跳转到图生视频页面
const goToImageToVideo = () => {
router.push('/image-to-video/create')
}
// 跳转到分镜视频页面
const goToStoryboardVideo = () => {
router.push('/storyboard-video/create')
}
2025-10-21 16:50:33 +08:00
</script>
<style scoped>
.welcome-page {
position: relative;
width: 100%;
min-height: 100vh;
2025-10-21 16:50:33 +08:00
overflow: hidden;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.welcome-page::before {
content: '';
position: absolute;
top: 0;
left: 50%;
transform: translateX(-50%);
width: 2156px;
height: 1394px;
background: url('/images/backgrounds/27.jpg') center/cover no-repeat;
z-index: -1;
}
2025-10-21 16:50:33 +08:00
/* 导航栏 */
.navbar {
position: fixed;
top: 20px;
left: 50%;
transform: translateX(-50%);
width: 95%;
max-width: 1200px;
background: rgba(26, 26, 46, 0.8);
backdrop-filter: blur(10px);
z-index: 1000;
height: 60px;
border-radius: 30px;
border: 1px solid rgba(255, 255, 255, 0.1);
}
.navbar-content {
width: 100%;
margin: 0 auto;
padding: 0 20px;
height: 100%;
display: flex;
align-items: center;
justify-content: space-between;
position: relative;
}
.logo {
2025-11-13 17:01:39 +08:00
display: flex;
align-items: center;
}
.logo img {
height: 35px;
width: auto;
2025-10-21 16:50:33 +08:00
}
.nav-links {
display: flex;
gap: 30px;
margin-left: auto;
margin-right: 15px;
}
.nav-link {
color: white;
text-decoration: none;
font-size: 16px;
font-weight: 400;
transition: color 0.3s ease;
}
.nav-link:hover {
color: #4a9eff;
}
.nav-actions {
display: flex;
align-items: center;
gap: 15px;
}
2025-10-21 16:50:33 +08:00
.nav-button {
background: rgba(74, 158, 255, 0.8);
border: 1px solid rgba(255, 255, 255, 0.3);
color: white;
padding: 10px 20px;
border-radius: 20px;
font-size: 14px;
font-weight: 500;
cursor: pointer;
transition: all 0.3s ease;
backdrop-filter: blur(10px);
}
.nav-button:hover {
background: rgba(74, 158, 255, 1);
transform: translateY(-2px);
}
/* 主要内容 */
.content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
min-height: 100vh;
text-align: center;
padding-top: 80px;
position: relative;
z-index: 10;
}
.title {
font-size: 6.5rem;
font-weight: 700;
color: white;
line-height: 1.1;
margin-bottom: 60px;
letter-spacing: -0.03em;
text-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
text-align: center;
display: flex;
flex-direction: column;
align-items: center;
}
.subtitle {
font-size: 1.2rem;
color: rgba(255, 255, 255, 0.8);
margin-bottom: 40px;
font-weight: 400;
text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}
2025-10-21 16:50:33 +08:00
.title-line {
display: block;
text-align: center;
width: 100%;
}
.bright-text {
color: white;
opacity: 1;
font-weight: 700;
}
.gradient-text {
color: rgba(255, 255, 255, 0.5);
font-weight: 700;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
2025-10-21 16:50:33 +08:00
}
.fade-text {
color: rgba(255, 255, 255, 0.5);
font-weight: 700;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
2025-10-21 16:50:33 +08:00
}
.main-button {
background: rgba(255, 255, 255, 0.5);
2025-10-21 16:50:33 +08:00
border: none;
padding: 22px 60px;
border-radius: 50px;
font-size: 22px;
font-weight: 600;
cursor: pointer;
transition: all 0.3s ease;
box-shadow: 0 6px 25px rgba(74, 158, 255, 0.3);
position: relative;
backdrop-filter: blur(10px);
color: #2563EB;
}
.main-button::after {
content: none;
2025-10-21 16:50:33 +08:00
}
.main-button:hover {
transform: translateY(-4px);
box-shadow: 0 12px 40px rgba(74, 158, 255, 0.5);
}
.main-button:active {
transform: translateY(-2px);
}
/* 背景光影效果已删除 */
/* 响应式设计 */
@media (max-width: 1024px) {
.title {
font-size: 5.5rem;
margin-bottom: 50px;
}
.main-button {
padding: 20px 50px;
font-size: 20px;
}
}
@media (max-width: 768px) {
.nav-links {
display: none;
}
.title {
font-size: 4rem;
line-height: 1.2;
margin-bottom: 40px;
}
.main-button {
padding: 18px 40px;
font-size: 18px;
}
}
@media (max-width: 480px) {
.title {
font-size: 3rem;
line-height: 1.3;
}
.main-button {
padding: 16px 35px;
font-size: 16px;
}
}
</style>