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

371 lines
8.2 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>
<a href="#" class="nav-link" @click="scrollToSection('features')">{{ $t('welcome.pricing') }}</a>
2025-10-21 16:50:33 +08:00
</nav>
2025-11-13 17:01:39 +08:00
<button class="nav-button" @click="goToLogin">{{ $t('welcome.startExperience') }}</button>
2025-10-21 16:50:33 +08:00
</div>
</header>
<!-- 主要内容 -->
<main class="content">
<h1 class="title">
<span class="title-line">
2025-11-13 17:01:39 +08:00
<span class="bright-text">{{ $t('welcome.title1') }}</span><span class="fade-text">{{ $t('welcome.title2') }}</span>
2025-10-21 16:50:33 +08:00
</span>
<span class="title-line">
2025-11-13 17:01:39 +08:00
<span class="bright-text">{{ $t('welcome.title3') }}</span><span class="fade-text">{{ $t('welcome.title4') }}</span>
2025-10-21 16:50:33 +08:00
</span>
</h1>
2025-11-13 17:01:39 +08:00
<p class="subtitle">{{ $t('welcome.subtitle') }}</p>
<button class="main-button" @click="goToLogin">{{ $t('welcome.tryNow') }}</button>
2025-10-21 16:50:33 +08:00
</main>
<!-- 功能说明 -->
<section id="features" class="features-section">
<div class="features-container">
2025-11-13 17:01:39 +08:00
<h2 class="features-title">{{ $t('welcome.coreFeatures') }}</h2>
<div class="features-grid">
2025-11-13 17:01:39 +08:00
<div class="feature-card" @click="goToTextToVideo" style="cursor: pointer;">
<h3>{{ $t('welcome.textToVideo') }}</h3>
<p>{{ $t('welcome.textToVideoDesc') }}</p>
</div>
2025-11-13 17:01:39 +08:00
<div class="feature-card" @click="goToImageToVideo" style="cursor: pointer;">
<h3>{{ $t('welcome.imageToVideo') }}</h3>
<p>{{ $t('welcome.imageToVideoDesc') }}</p>
</div>
2025-11-13 17:01:39 +08:00
<div class="feature-card" @click="goToStoryboardVideo" style="cursor: pointer;">
<h3>{{ $t('welcome.storyboardVideo') }}</h3>
<p>{{ $t('welcome.storyboardVideoDesc') }}</p>
</div>
<div class="feature-card">
2025-11-13 17:01:39 +08:00
<h3>{{ $t('welcome.pricing') }}</h3>
<p>{{ $t('welcome.pricingDesc') }}</p>
</div>
</div>
2025-11-13 17:01:39 +08:00
<button class="features-button" @click="goToLogin">{{ $t('welcome.startCreating') }}</button>
</div>
</section>
2025-10-21 16:50:33 +08:00
</div>
</template>
<script setup>
import { useRouter } from 'vue-router'
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')
}
// 滚动到功能说明部分
const scrollToSection = (sectionId) => {
const element = document.getElementById(sectionId)
if (element) {
element.scrollIntoView({ behavior: 'smooth' })
}
}
2025-10-21 16:50:33 +08:00
</script>
<style scoped>
.welcome-page {
min-height: 100vh;
background: url('/images/backgrounds/welcome.jpg') center/cover no-repeat;
position: relative;
overflow: hidden;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
/* 导航栏 */
.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-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;
}
.fade-text {
color: white;
opacity: 0.6;
}
.main-button {
background: linear-gradient(90deg, rgba(74, 158, 255, 0.8) 0%, rgba(255, 255, 255, 0.9) 100%);
border: none;
color: white;
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;
overflow: hidden;
backdrop-filter: blur(10px);
}
.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;
}
}
/* 功能说明部分 */
.features-section {
background: rgba(0, 0, 0, 0.8);
padding: 80px 20px;
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
}
.features-container {
max-width: 1200px;
width: 100%;
text-align: center;
}
.features-title {
font-size: 3rem;
color: white;
margin-bottom: 60px;
font-weight: 700;
text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}
.features-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: 30px;
margin-bottom: 60px;
}
.feature-card {
background: rgba(255, 255, 255, 0.1);
backdrop-filter: blur(10px);
border: 1px solid rgba(255, 255, 255, 0.2);
border-radius: 20px;
padding: 40px 30px;
transition: all 0.3s ease;
}
.feature-card:hover {
transform: translateY(-10px);
background: rgba(255, 255, 255, 0.15);
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}
.feature-card h3 {
font-size: 1.5rem;
color: white;
margin-bottom: 15px;
font-weight: 600;
}
.feature-card p {
color: rgba(255, 255, 255, 0.8);
line-height: 1.6;
font-size: 1rem;
}
.features-button {
background: linear-gradient(135deg, #4A9EFF 0%, #6B73FF 100%);
color: white;
border: none;
padding: 18px 40px;
font-size: 1.1rem;
font-weight: 600;
border-radius: 50px;
cursor: pointer;
transition: all 0.3s ease;
box-shadow: 0 10px 30px rgba(74, 158, 255, 0.3);
}
.features-button:hover {
background: linear-gradient(135deg, #6B73FF 0%, #4A9EFF 100%);
transform: translateY(-3px);
box-shadow: 0 15px 40px rgba(74, 158, 255, 0.4);
}
2025-10-21 16:50:33 +08:00
</style>