Files
dpl/theme/EZ/source/public/landingpage.html
T

1416 lines
44 KiB
HTML

<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="icon" href="./images/logo.png">
<title>EZ</title>
<!-- 动态设置网站标题 -->
<script>
document.write('<script src="config.js?t=' + Math.random() + '"><\/script>');
document.addEventListener('DOMContentLoaded', function() {
if (window.EZ_CONFIG && window.EZ_CONFIG.SITE_CONFIG && window.EZ_CONFIG.SITE_CONFIG.siteName) {
document.title = window.EZ_CONFIG.SITE_CONFIG.siteName;
}
});
// 页面加载时先检查父窗口的主题状态
function checkParentTheme() {
// 检查是否在iframe中
if (window.parent !== window) {
// 向父窗口发送消息,请求当前主题
window.parent.postMessage({
type: 'getTheme'
}, '*');
}
}
// 在页面加载时检查父窗口的主题
window.addEventListener('load', checkParentTheme);
// 监听父窗口的主题消息
window.addEventListener('message', function(event) {
if (event.data && event.data.type === 'setTheme') {
const newTheme = event.data.theme;
// 同步主题状态,但不再次向父窗口发送消息
setTheme(newTheme, false);
// 存储主题到 localStorage
localStorage.setItem(THEME_STORAGE_KEY, newTheme);
}
});
</script>
<!-- 字体 -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
<style>
/* 主题切换过渡效果 */
* {
transition-property: background-color, color, border-color, box-shadow, fill, stroke;
transition-duration: 0.3s;
transition-timing-function: ease;
}
/* 控制主题过渡期间的样式 */
.theme-transition * {
transition: background-color 0.5s ease,
color 0.5s ease,
border-color 0.5s ease,
box-shadow 0.5s ease,
transform 0.5s ease,
opacity 0.5s ease !important;
}
/* 添加基础动画 */
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
@keyframes slideUp {
from {
opacity: 0;
transform: translateY(30px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes slideInLeft {
from {
opacity: 0;
transform: translateX(-30px);
}
to {
opacity: 1;
transform: translateX(0);
}
}
@keyframes slideInRight {
from {
opacity: 0;
transform: translateX(30px);
}
to {
opacity: 1;
transform: translateX(0);
}
}
@keyframes scaleIn {
from {
opacity: 0;
transform: scale(0.95);
}
to {
opacity: 1;
transform: scale(1);
}
}
/* 应用动画到具体元素 */
.logo {
animation: fadeIn 0.8s ease;
}
.nav-links, .nav-buttons {
animation: fadeIn 0.8s ease 0.2s both;
}
.hero h2 {
animation: slideUp 0.8s ease 0.3s both;
}
.hero p {
animation: slideUp 0.8s ease 0.5s both;
}
.hero-buttons {
animation: slideUp 0.8s ease 0.7s both;
}
.hero-image {
animation: scaleIn 1.2s ease 0.8s both;
}
.feature-card {
animation: slideUp 0.8s ease both;
animation-play-state: paused; /* 暂停动画,直到元素进入视口 */
}
.client-card {
animation: slideUp 0.8s ease both;
animation-play-state: paused; /* 暂停动画,直到元素进入视口 */
}
.cta-container {
animation: scaleIn 0.8s ease both;
animation-play-state: paused; /* 暂停动画,直到元素进入视口 */
}
:root {
--primary-color: #355cc2;
--primary-color-light: #5c93ff;
--primary-rgb: 53, 92, 194; /* RGB值用于透明度计算 */
--text-color: #333;
--text-light: #666;
--background-color: #fff;
--section-bg: #f5f5f7;
--button-hover: #2d4eaa;
--primary-shadow: rgba(53, 92, 194, 0.3);
}
:root.dark-theme {
--text-color: #f5f5f7;
--text-light: #a1a1a6;
--background-color: #1a1a1a;
--section-bg: #0f0f0f;
}
:root.dark-theme header {
background-color: rgba(29, 29, 31, 0.8);
border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
:root.dark-theme .secondary-button {
border: 1px solid rgba(255, 255, 255, 0.1);
}
:root.dark-theme .secondary-button:hover {
background-color: rgba(255, 255, 255, 0.05);
}
:root.dark-theme .feature-card {
background-color: #1a1a1a;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
color: var(--text-color);
background-color: var(--background-color);
line-height: 1.5;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
overflow-x: hidden;
}
/* 隐藏滚动条 */
@media (min-width: 769px) {
html, body, div, main, section, article, aside, nav {
scrollbar-width: none !important;
-ms-overflow-style: none !important;
}
::-webkit-scrollbar, ::-webkit-scrollbar-button, ::-webkit-scrollbar-track,
::-webkit-scrollbar-track-piece, ::-webkit-scrollbar-thumb,
::-webkit-scrollbar-corner, ::-webkit-resizer {
display: none !important;
width: 0 !important;
height: 0 !important;
background: transparent !important;
}
}
header {
background-color: rgba(255, 255, 255, 0.8);
backdrop-filter: blur(20px);
-webkit-backdrop-filter: blur(20px);
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 1000;
display: flex;
justify-content: space-between;
align-items: center;
padding: 16px 5%;
border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.logo {
display: flex;
align-items: center;
}
.logo img {
height: 32px;
margin-right: 10px;
border-radius: 8px;
}
.logo h1 {
font-size: 22px;
font-weight: 600;
}
.nav-links {
display: flex;
gap: 30px;
align-self: center;
position: absolute;
left: 50%;
transform: translateX(-50%);
}
.nav-links a {
color: var(--text-color);
text-decoration: none;
font-size: 16px;
font-weight: 500;
transition: color 0.3s;
display: inline-flex;
align-items: center;
}
.nav-links a:hover {
color: var(--primary-color);
}
.nav-buttons {
display: flex;
gap: 15px;
align-items: center;
}
.theme-toggle {
display: flex;
align-items: center;
justify-content: center;
margin-right: 15px;
cursor: pointer;
width: 40px;
height: 40px;
border-radius: 50%;
transition: background-color 0.3s;
}
.theme-toggle:hover {
background-color: rgba(0, 0, 0, 0.05);
}
:root.dark-theme .theme-toggle:hover {
background-color: rgba(255, 255, 255, 0.05);
}
.theme-toggle svg {
width: 20px;
height: 20px;
stroke: var(--text-color);
}
.button {
display: inline-block;
padding: 10px 20px;
border-radius: 24px;
font-weight: 500;
text-decoration: none;
transition: all 0.3s ease;
text-align: center;
}
.primary-button {
background-color: var(--primary-color);
color: white;
}
.primary-button:hover {
background-color: var(--button-hover);
transform: translateY(-2px);
}
.secondary-button {
background-color: transparent;
color: var(--text-color);
border: 1px solid rgba(0, 0, 0, 0.1);
}
.secondary-button:hover {
background-color: rgba(0, 0, 0, 0.05);
transform: translateY(-2px);
}
.hero {
padding: 180px 5% 120px;
text-align: center;
background-color: var(--background-color);
}
.hero h2 {
font-size: 56px;
font-weight: 700;
margin-bottom: 20px;
background: linear-gradient(to right, var(--primary-color), var(--primary-color-light));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
line-height: 1.2;
}
.hero p {
font-size: 24px;
color: var(--text-light);
margin-bottom: 40px;
max-width: 800px;
margin-left: auto;
margin-right: auto;
}
.hero-buttons {
display: flex;
justify-content: center;
gap: 20px;
margin-bottom: 60px;
}
.hero-image {
max-width: 85%;
border-radius: 12px;
box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
margin: 0 auto;
}
.features {
padding: 100px 5%;
background-color: var(--section-bg);
}
.section-title {
text-align: center;
margin-bottom: 60px;
}
.section-title h3 {
font-size: 40px;
font-weight: 700;
margin-bottom: 15px;
}
.section-title p {
font-size: 20px;
color: var(--text-light);
max-width: 700px;
margin: 0 auto;
}
.feature-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 40px;
max-width: 1200px;
margin: 0 auto;
}
.feature-card {
background-color: white;
border-radius: 16px;
padding: 40px 30px;
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
transition: transform 0.3s ease, box-shadow 0.3s ease;
text-align: center;
}
.feature-card:hover {
transform: translateY(-8px);
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}
.feature-icon {
width: 64px;
height: 64px;
margin: 0 auto 20px;
display: flex;
align-items: center;
justify-content: center;
background-color: rgba(53, 92, 194, 0.1);
border-radius: 50%;
transition: transform 0.3s ease;
}
.feature-card:hover .feature-icon {
transform: scale(1.1);
}
.feature-icon svg {
width: 32px;
height: 32px;
stroke: var(--primary-color);
stroke-width: 2;
}
.feature-card h4 {
font-size: 22px;
margin-bottom: 15px;
}
.feature-card p {
color: var(--text-light);
font-size: 16px;
}
.download {
padding: 100px 5%;
text-align: center;
}
.client-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 30px;
max-width: 1200px;
margin: 0 auto;
}
.client-card {
background-color: var(--section-bg);
border-radius: 16px;
padding: 30px;
transition: transform 0.3s ease;
cursor: pointer;
}
.client-card:hover {
transform: translateY(-8px);
}
.client-card img {
width: 80px;
height: 80px;
margin-bottom: 20px;
}
.client-card svg {
width: 60px;
height: 60px;
margin-bottom: 20px;
stroke: var(--primary-color);
stroke-width: 1.5;
}
.client-card h4 {
font-size: 20px;
margin-bottom: 10px;
}
.client-card p {
font-size: 14px;
color: var(--text-light);
margin-bottom: 20px;
}
.cta {
padding: 100px 5%;
background-color: var(--section-bg);
text-align: center;
}
.cta-container {
max-width: 800px;
margin: 0 auto;
background: linear-gradient(135deg, var(--primary-color), var(--primary-color-light));
border-radius: 24px;
padding: 60px;
color: white;
box-shadow: 0 20px 40px var(--primary-shadow);
}
.cta h3 {
font-size: 36px;
margin-bottom: 20px;
}
.cta p {
font-size: 18px;
margin-bottom: 30px;
opacity: 0.9;
}
.cta-button {
background-color: white;
color: var(--primary-color);
padding: 14px 30px;
font-size: 16px;
font-weight: 600;
}
.cta-button:hover {
background-color: rgba(255, 255, 255, 0.9);
transform: translateY(-2px);
}
footer {
padding: 60px 5% 40px;
background-color: var(--background-color);
text-align: center;
}
.footer-links {
display: flex;
justify-content: center;
gap: 40px;
margin-bottom: 30px;
}
.footer-links a {
color: var(--text-light);
text-decoration: none;
font-size: 16px;
transition: color 0.3s;
}
.footer-links a:hover {
color: var(--primary-color);
}
.footer-logo {
margin-bottom: 20px;
}
.footer-logo img {
height: 40px;
border-radius: 8px;
}
.footer-logo svg {
height: 40px;
width: auto;
stroke: var(--primary-color);
stroke-width: 1.5;
}
.copyright {
color: var(--text-light);
font-size: 14px;
}
/* 响应式设计 */
@media (max-width: 1024px) {
.hero h2 {
font-size: 48px;
}
.hero p {
font-size: 20px;
}
}
@media (max-width: 768px) {
/* 强制隐藏移动端水平滚动条 */
body {
overflow-x: hidden;
}
.nav-links {
display: none; /* 在移动端隐藏导航链接 */
}
.nav-buttons {
display: none; /* 在移动端隐藏导航按钮 */
}
.mobile-menu-button {
display: block; /* 在移动端显示菜单按钮 */
}
.mobile-nav {
display: flex; /* 在移动端才显示 */
}
.mobile-nav-overlay {
display: block; /* 只在移动设备宽度下显示 */
}
.hero {
padding: 150px 5% 80px;
}
.hero h2 {
font-size: 36px;
}
.hero p {
font-size: 18px;
}
.section-title h3 {
font-size: 32px;
}
.feature-grid, .client-grid {
grid-template-columns: 1fr;
}
.cta-container {
padding: 40px 20px;
}
.cta h3 {
font-size: 28px;
}
.footer-links {
flex-direction: column;
gap: 20px;
}
}
.mobile-menu-button {
display: none;
font-size: 24px;
background: none;
border: none;
color: var(--text-color);
cursor: pointer;
}
.mobile-nav {
display: none; /* 默认隐藏,只在移动端显示 */
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: var(--background-color);
flex-direction: column;
padding: 80px 30px;
z-index: 999;
transform: translateX(100%);
transition: transform 0.3s ease;
}
.mobile-nav-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
z-index: 998;
opacity: 0;
visibility: hidden;
transition: opacity 0.3s ease, visibility 0.3s ease;
display: none; /* 默认隐藏 */
}
.mobile-nav-overlay.active {
opacity: 1;
visibility: visible;
}
@media (max-width: 768px) {
/* 强制隐藏移动端水平滚动条 */
body {
overflow-x: hidden;
}
.mobile-menu-button {
display: block;
}
.nav-buttons {
display: none;
}
.mobile-nav {
display: flex; /* 在移动端才显示 */
}
.mobile-nav-overlay {
display: block; /* 只在移动设备宽度下显示 */
}
.mobile-nav.active {
transform: translateX(0);
}
.mobile-nav-links {
display: flex;
flex-direction: column;
gap: 20px;
margin-bottom: 40px;
}
.mobile-nav-links a {
color: var(--text-color);
text-decoration: none;
font-size: 20px;
font-weight: 500;
}
.mobile-theme-toggle {
display: flex;
align-items: center;
gap: 10px;
font-size: 16px;
color: var(--text-color);
margin-bottom: 20px;
cursor: pointer;
}
.mobile-theme-toggle svg {
width: 20px;
height: 20px;
stroke: var(--text-color);
}
.mobile-nav-buttons {
display: flex;
flex-direction: column;
gap: 15px;
}
.close-menu {
position: absolute;
top: 20px;
right: 20px;
font-size: 24px;
background: none;
border: none;
color: var(--text-color);
cursor: pointer;
}
}
/* 添加加载动画样式 */
.preloader {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: var(--background-color);
display: flex;
justify-content: center;
align-items: center;
z-index: 9999;
transition: opacity 0.8s ease, visibility 0.8s ease;
}
.preloader.fade-out {
opacity: 0;
visibility: hidden;
}
.loader {
width: 50px;
height: 50px;
border: 3px solid rgba(var(--primary-rgb, 53, 92, 194), 0.1);
border-radius: 50%;
border-top-color: var(--primary-color);
animation: spin 1s ease-in-out infinite;
position: relative;
}
.loader::before {
content: '';
position: absolute;
top: -3px;
left: -3px;
right: -3px;
bottom: -3px;
border: 3px solid transparent;
border-bottom-color: var(--primary-color-light);
border-radius: 50%;
animation: spin 1.5s linear infinite;
}
@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
@keyframes pulse {
0%, 100% {
transform: scale(0.95);
opacity: 0.8;
}
50% {
transform: scale(1);
opacity: 1;
}
}
</style>
</head>
<body>
<!-- 加载动画 -->
<!-- <div class="preloader" id="preloader">
<div class="loader"></div>
</div> -->
<!-- 放置在body开始处,初始应用正确主题以避免闪烁 -->
<script>
// 在DOM加载前预先应用主题,避免白屏闪烁
(function() {
const THEME_STORAGE_KEY = 'ez-theme-preference';
const savedTheme = localStorage.getItem(THEME_STORAGE_KEY);
const prefersDark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;
const initialTheme = savedTheme || (prefersDark ? 'dark' : 'light');
if (initialTheme === 'dark') {
document.documentElement.classList.add('dark-theme');
}
})();
</script>
<header>
<div class="logo">
<img src="./images/logo.png" alt="Logo">
<h1 id="siteName">EZ</h1>
</div>
<nav class="nav-links">
<a href="#features">特性</a>
<a href="#download">客户端</a>
<a href="javascript:void(0)" onclick="navigateTo('shop')">价格</a>
<a href="javascript:void(0)" onclick="navigateTo('tickets')">支持</a>
</nav>
<div class="nav-buttons">
<div class="theme-toggle" id="themeToggle">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="theme-icon-light">
<path d="M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0"></path>
<path d="M12 2l0 2"></path>
<path d="M12 20l0 2"></path>
<path d="M20 12l2 0"></path>
<path d="M2 12l2 0"></path>
<path d="M18.5 5.5l-1.5 1.5"></path>
<path d="M18.5 18.5l-1.5 -1.5"></path>
<path d="M5.5 5.5l1.5 1.5"></path>
<path d="M5.5 18.5l1.5 -1.5"></path>
</svg>
</div>
<a href="javascript:void(0)" onclick="navigateTo('login')" class="button secondary-button">登录</a>
<a href="javascript:void(0)" onclick="navigateTo('register')" class="button primary-button">注册</a>
</div>
<button class="mobile-menu-button" id="mobileMenuButton">☰</button>
</header>
<div class="mobile-nav-overlay" id="mobileNavOverlay"></div>
<div class="mobile-nav" id="mobileNav">
<button class="close-menu" id="closeMenu">✕</button>
<div class="mobile-theme-toggle" id="mobileThemeToggle">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="theme-icon-light">
<path d="M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0"></path>
<path d="M12 2l0 2"></path>
<path d="M12 20l0 2"></path>
<path d="M20 12l2 0"></path>
<path d="M2 12l2 0"></path>
<path d="M18.5 5.5l-1.5 1.5"></path>
<path d="M18.5 18.5l-1.5 -1.5"></path>
<path d="M5.5 5.5l1.5 1.5"></path>
<path d="M5.5 18.5l1.5 -1.5"></path>
</svg>
<span>切换主题</span>
</div>
<div class="mobile-nav-links">
<a href="#features">特性</a>
<a href="#download">客户端</a>
<a href="javascript:void(0)" onclick="navigateTo('shop'); closeMobileMenu();">价格</a>
<a href="javascript:void(0)" onclick="navigateTo('tickets'); closeMobileMenu();">支持</a>
</div>
</div>
<section class="hero">
<h2 id="heroTitle">探索全球网络的无限可能</h2>
<p id="heroSubtitle">高速稳定、安全私密,随时随地畅享网络世界</p>
<div class="hero-buttons">
<a href="javascript:void(0)" onclick="navigateTo('register')" class="button primary-button">立即开始</a>
<a href="#download" class="button secondary-button">下载客户端</a>
</div>
<img src="https://placehold.co/1200x675" alt="Dashboard Preview" class="hero-image">
</section>
<section class="features" id="features">
<div class="section-title">
<h3>专为极致体验设计</h3>
<p>我们为您提供最优质的服务和极致的用户体验</p>
</div>
<div class="feature-grid">
<div class="feature-card">
<div class="feature-icon">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-rocket">
<path d="M4 13a8 8 0 0 1 7 7a6 6 0 0 0 3 -5a9 9 0 0 0 6 -8a3 3 0 0 0 -3 -3a9 9 0 0 0 -8 6a6 6 0 0 0 -5 3"></path>
<path d="M7 14a6 6 0 0 0 -3 6a6 6 0 0 0 6 -3"></path>
<path d="M15 9m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"></path>
</svg>
</div>
<h4>高速稳定</h4>
<p>高速节点全球覆盖,智能路由技术,保障您的网络连接稳定流畅</p>
</div>
<div class="feature-card">
<div class="feature-icon">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-lock">
<path d="M5 13a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-6z"></path>
<path d="M11 16a1 1 0 1 0 2 0a1 1 0 0 0 -2 0"></path>
<path d="M8 11v-4a4 4 0 1 1 8 0v4"></path>
</svg>
</div>
<h4>安全私密</h4>
<p>采用军事级加密技术,保护您的网络隐私和数据安全</p>
</div>
<div class="feature-card">
<div class="feature-icon">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-world">
<path d="M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0"></path>
<path d="M3.6 9h16.8"></path>
<path d="M3.6 15h16.8"></path>
<path d="M11.5 3a17 17 0 0 0 0 18"></path>
<path d="M12.5 3a17 17 0 0 1 0 18"></path>
</svg>
</div>
<h4>全球连接</h4>
<p>多区域节点覆盖,助您畅享全球网络资源</p>
</div>
<div class="feature-card">
<div class="feature-icon">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-devices">
<path d="M13 9a1 1 0 0 1 1 -1h6a1 1 0 0 1 1 1v10a1 1 0 0 1 -1 1h-6a1 1 0 0 1 -1 -1v-10z"></path>
<path d="M18 8v-3a1 1 0 0 0 -1 -1h-13a1 1 0 0 0 -1 1v12a1 1 0 0 0 1 1h9"></path>
<path d="M16 9h2"></path>
</svg>
</div>
<h4>多平台支持</h4>
<p>支持 iOS、Android、Windows、macOS 等各大主流平台</p>
</div>
<div class="feature-card">
<div class="feature-icon">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-bolt">
<path d="M13 3l0 7l6 0l-8 11l0 -7l-6 0l8 -11"></path>
</svg>
</div>
<h4>简单易用</h4>
<p>一键连接,简洁直观的界面设计,无需复杂设置</p>
</div>
<div class="feature-card">
<div class="feature-icon">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-message-circle">
<path d="M3 20l1.3 -3.9c-2.324 -3.437 -1.426 -7.872 2.1 -10.374c3.526 -2.501 8.59 -2.296 11.845 .48c3.255 2.777 3.695 7.266 1.029 10.501c-2.666 3.235 -7.615 4.215 -11.574 2.293l-4.7 1"></path>
</svg>
</div>
<h4>专业客服</h4>
<p>24/7专业客服团队,随时为您解决问题</p>
</div>
</div>
</section>
<section class="download" id="download">
<div class="section-title">
<h3>跨平台客户端</h3>
<p>支持各大主流平台,随时随地畅享极速体验</p>
</div>
<div class="client-grid">
<div class="client-card" id="iosClient">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-brand-apple"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M8.286 7.008c-3.216 0 -4.286 3.23 -4.286 5.92c0 3.229 2.143 8.072 4.286 8.072c1.165 -.05 1.799 -.538 3.214 -.538c1.406 0 1.607 .538 3.214 .538s4.286 -3.229 4.286 -5.381c-.03 -.011 -2.649 -.434 -2.679 -3.23c-.02 -2.335 2.589 -3.179 2.679 -3.228c-1.096 -1.606 -3.162 -2.113 -3.75 -2.153c-1.535 -.12 -3.032 1.077 -3.75 1.077c-.729 0 -2.036 -1.077 -3.214 -1.077z" /><path d="M12 4a2 2 0 0 0 2 -2a2 2 0 0 0 -2 2" /></svg>
<h4>iOS</h4>
<p>适用于 iPhone 和 iPad 的客户端</p>
<a href="https://apps.apple.com/app/id1" class="button primary-button" target="_blank" rel="noopener noreferrer">下载</a>
</div>
<div class="client-card" id="androidClient">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-brand-android">
<path d="M4 10l0 6"></path>
<path d="M20 10l0 6"></path>
<path d="M7 9h10v8a1 1 0 0 1 -1 1h-8a1 1 0 0 1 -1 -1v-8a5 5 0 0 1 10 0"></path>
<path d="M8 3l1 2"></path>
<path d="M16 3l-1 2"></path>
<path d="M9 18l0 3"></path>
<path d="M15 18l0 3"></path>
</svg>
<h4>Android</h4>
<p>适用于安卓手机和平板的客户端</p>
<a href="https://play.google.com/store/apps" class="button primary-button" target="_blank" rel="noopener noreferrer">下载</a>
</div>
<div class="client-card" id="windowsClient">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-brand-windows">
<path d="M17.8 20l-12 -1.5c-1 -.1 -1.8 -.9 -1.8 -1.9v-9.2c0 -1 .8 -1.8 1.8 -1.9l12 -1.5c1.2 -.1 2.2 .8 2.2 1.9v12.1c0 1.2 -1.1 2.1 -2.2 1.9z"></path>
<path d="M12 5l0 14"></path>
<path d="M4 12l16 0"></path>
</svg>
<h4>Windows</h4>
<p>适用于 Windows 系统的客户端</p>
<a href="https://github.com/releases/latest" class="button primary-button" target="_blank" rel="noopener noreferrer">下载</a>
</div>
<div class="client-card" id="macosClient">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-device-laptop">
<path d="M3 19l18 0"></path>
<path d="M5 6m0 1a1 1 0 0 1 1 -1h12a1 1 0 0 1 1 1v8a1 1 0 0 1 -1 1h-12a1 1 0 0 1 -1 -1z"></path>
</svg>
<h4>MacOS</h4>
<p>适用于 Mac 电脑的客户端</p>
<a href="https://github.com/releases/latest" class="button primary-button" target="_blank" rel="noopener noreferrer">下载</a>
</div>
</div>
</section>
<section class="cta">
<div class="cta-container">
<h3>准备好开始您的探索了吗?</h3>
<p>加入我们,即刻体验无限可能</p>
<a href="javascript:void(0)" onclick="navigateTo('register')" class="button cta-button">立即注册</a>
</div>
</section>
<footer>
<div class="footer-logo">
<img src="./images/logo.png" alt="Logo">
</div>
<div class="footer-links">
<a href="#">关于我们</a>
<a href="#">隐私政策</a>
<a href="#">服务条款</a>
<a href="#">常见问题</a>
<a href="#">联系我们</a>
</div>
<p class="copyright" id="copyrightText">© 2025 EZ THEME. All Rights Reserved.</p>
</footer>
<script>
// 页面加载完成后淡出加载动画
window.addEventListener('load', function() {
setTimeout(function() {
document.getElementById('preloader').classList.add('fade-out');
// 完全移除,避免遮挡页面交互
setTimeout(function() {
document.getElementById('preloader').style.display = 'none';
}, 800);
}, 500);
// 设置滚动触发动画
setupScrollAnimations();
});
// 设置滚动动画
function setupScrollAnimations() {
// 使用 Intersection Observer API 监测元素是否进入视口
const observerOptions = {
root: null, // 使用视口作为参考
rootMargin: '0px',
threshold: 0.1 // 元素有10%进入视口时触发
};
const observer = new IntersectionObserver((entries) => {
entries.forEach(entry => {
if (entry.isIntersecting) {
// 元素进入视口,播放动画
if (entry.target.classList.contains('feature-card') ||
entry.target.classList.contains('client-card') ||
entry.target.classList.contains('cta-container')) {
entry.target.style.animationPlayState = 'running';
}
// 一旦动画触发,不再观察此元素
observer.unobserve(entry.target);
}
});
}, observerOptions);
// 观察所有需要滚动动画的元素
document.querySelectorAll('.feature-card, .client-card, .cta-container').forEach(elem => {
observer.observe(elem);
});
// 设置交错动画延迟
document.querySelectorAll('.feature-card').forEach((card, index) => {
card.style.animationDelay = `${0.1 * index}s`;
});
document.querySelectorAll('.client-card').forEach((card, index) => {
card.style.animationDelay = `${0.1 * index}s`;
});
}
// 导航函数 - 通过postMessage与父窗口通信
function navigateTo(route) {
// 检查是否在iframe中
if (window.parent !== window) {
// 向父窗口发送消息
window.parent.postMessage({
type: 'navigation',
route: route
}, '*');
} else {
// 如果不在iframe中,直接跳转
window.location.href = '/#/' + route;
}
}
// 主题设置
const themeToggle = document.getElementById('themeToggle');
const mobileThemeToggle = document.getElementById('mobileThemeToggle');
const root = document.documentElement;
const THEME_STORAGE_KEY = 'ez-theme-preference';
// 检查本地存储中的主题偏好
function getThemePreference() {
const savedTheme = localStorage.getItem(THEME_STORAGE_KEY);
if (savedTheme) {
return savedTheme;
}
// 如果没有保存的偏好,则检测系统偏好
return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
}
// 设置主题
function setTheme(theme, notifyParent = true) {
// 添加过渡类
document.body.classList.add('theme-transition');
// 延迟设置主题,让过渡有时间生效
setTimeout(() => {
if (theme === 'dark') {
root.classList.add('dark-theme');
updateThemeIcon('dark');
} else {
root.classList.remove('dark-theme');
updateThemeIcon('light');
}
localStorage.setItem(THEME_STORAGE_KEY, theme);
// 通知父窗口主题变化
if (notifyParent && window.parent !== window) {
window.parent.postMessage({
type: 'themeChanged',
theme: theme
}, '*');
}
// 延迟移除过渡类,防止页面滚动时触发过渡
setTimeout(() => {
document.body.classList.remove('theme-transition');
}, 300);
}, 10);
}
// 更新主题图标
function updateThemeIcon(theme) {
if (theme === 'dark') {
themeToggle.innerHTML = `
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="theme-icon-dark">
<path d="M12 3a6 6 0 0 0 9 9a9 9 0 1 1 -9 -9z"></path>
</svg>
`;
mobileThemeToggle.innerHTML = `
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="theme-icon-dark">
<path d="M12 3a6 6 0 0 0 9 9a9 9 0 1 1 -9 -9z"></path>
</svg>
<span>切换到亮色模式</span>
`;
} else {
themeToggle.innerHTML = `
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="theme-icon-light">
<path d="M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0"></path>
<path d="M12 2l0 2"></path>
<path d="M12 20l0 2"></path>
<path d="M20 12l2 0"></path>
<path d="M2 12l2 0"></path>
<path d="M18.5 5.5l-1.5 1.5"></path>
<path d="M18.5 18.5l-1.5 -1.5"></path>
<path d="M5.5 5.5l1.5 1.5"></path>
<path d="M5.5 18.5l1.5 -1.5"></path>
</svg>
`;
mobileThemeToggle.innerHTML = `
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="theme-icon-light">
<path d="M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0"></path>
<path d="M12 2l0 2"></path>
<path d="M12 20l0 2"></path>
<path d="M20 12l2 0"></path>
<path d="M2 12l2 0"></path>
<path d="M18.5 5.5l-1.5 1.5"></path>
<path d="M18.5 18.5l-1.5 -1.5"></path>
<path d="M5.5 5.5l1.5 1.5"></path>
<path d="M5.5 18.5l1.5 -1.5"></path>
</svg>
<span>切换到暗色模式</span>
`;
}
}
// 切换主题
function toggleTheme() {
const currentTheme = root.classList.contains('dark-theme') ? 'dark' : 'light';
const newTheme = currentTheme === 'dark' ? 'light' : 'dark';
setTheme(newTheme, true);
}
// 监听系统主题变化
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', (e) => {
if (!localStorage.getItem(THEME_STORAGE_KEY)) {
setTheme(e.matches ? 'dark' : 'light', true);
}
});
// 初始化主题
setTheme(getThemePreference(), false);
// 添加主题切换事件
themeToggle.addEventListener('click', toggleTheme);
mobileThemeToggle.addEventListener('click', toggleTheme);
// 动态设置网站名称和版权信息
document.addEventListener('DOMContentLoaded', function() {
if (window.EZ_CONFIG && window.EZ_CONFIG.SITE_CONFIG) {
const config = window.EZ_CONFIG;
// 设置网站名称
if (config.SITE_CONFIG.siteName) {
document.getElementById('siteName').textContent = config.SITE_CONFIG.siteName;
document.title = config.SITE_CONFIG.siteName;
}
// 设置版权信息
if (config.SITE_CONFIG.copyright) {
document.getElementById('copyrightText').textContent = config.SITE_CONFIG.copyright;
}
// 设置 Hero 标题(多语言支持)
if (config.SITE_CONFIG.landingText) {
// 获取浏览器语言
const browserLang = navigator.language || navigator.userLanguage;
// 获取与浏览器语言匹配的文本,或默认使用中文
const heroText = config.SITE_CONFIG.landingText[browserLang] ||
config.SITE_CONFIG.landingText['zh-CN'];
document.getElementById('heroTitle').textContent = heroText;
}
// 设置客户端下载链接
if (config.CLIENT_CONFIG && config.CLIENT_CONFIG.clientLinks) {
try {
const clientLinks = config.CLIENT_CONFIG.clientLinks;
// 显示/隐藏客户端下载卡片
if (!config.CLIENT_CONFIG.showIOS) document.getElementById('iosClient').style.display = 'none';
if (!config.CLIENT_CONFIG.showAndroid) document.getElementById('androidClient').style.display = 'none';
if (!config.CLIENT_CONFIG.showWindows) document.getElementById('windowsClient').style.display = 'none';
if (!config.CLIENT_CONFIG.showMacOS) document.getElementById('macosClient').style.display = 'none';
// 设置下载链接
const setDownloadLink = (elementId, linkUrl) => {
if (!linkUrl) return;
document.querySelectorAll(`#${elementId} .button`).forEach(btn => {
if (linkUrl && linkUrl !== '#' && linkUrl !== '') {
btn.href = linkUrl;
btn.target = '_blank';
btn.rel = 'noopener noreferrer';
// 添加点击事件监听器,确保链接正常打开
btn.onclick = function(e) {
e.preventDefault();
window.open(linkUrl, '_blank', 'noopener,noreferrer');
};
}
});
};
setDownloadLink('iosClient', clientLinks.ios);
setDownloadLink('androidClient', clientLinks.android);
setDownloadLink('windowsClient', clientLinks.windows);
setDownloadLink('macosClient', clientLinks.macos);
// console.log('客户端下载链接已设置:', clientLinks);
} catch (error) {
// console.error('设置下载链接时出错:', error);
}
} else {
// console.warn('未找到客户端配置信息 (window.EZ_CONFIG.CLIENT_CONFIG)');
}
// 设置主题色
if (config.DEFAULT_CONFIG && config.DEFAULT_CONFIG.primaryColor) {
const primaryColor = config.DEFAULT_CONFIG.primaryColor;
document.documentElement.style.setProperty('--primary-color', primaryColor);
// 生成RGB值
const r = parseInt(primaryColor.substring(1, 3), 16);
const g = parseInt(primaryColor.substring(3, 5), 16);
const b = parseInt(primaryColor.substring(5, 7), 16);
document.documentElement.style.setProperty('--primary-rgb', `${r}, ${g}, ${b}`);
// 生成浅色变体
const primaryColorLight = adjustColorBrightness(primaryColor, 30);
document.documentElement.style.setProperty('--primary-color-light', primaryColorLight);
// 生成暗色变体作为悬停颜色
document.documentElement.style.setProperty('--button-hover', adjustColorBrightness(primaryColor, -15));
// 更新CTA卡片阴影颜色
const rgbColor = hexToRGBA(primaryColor, 0.3);
document.documentElement.style.setProperty('--primary-shadow', rgbColor);
}
}
});
// 移动端菜单
document.getElementById('mobileMenuButton').addEventListener('click', function() {
const mobileNav = document.getElementById('mobileNav');
const mobileNavOverlay = document.getElementById('mobileNavOverlay');
// 检查当前状态并切换
if (mobileNav.classList.contains('active')) {
closeMobileMenu();
} else {
mobileNav.classList.add('active');
mobileNavOverlay.classList.add('active');
document.body.style.overflow = 'hidden'; // 防止背景滚动
}
});
document.getElementById('closeMenu').addEventListener('click', function() {
closeMobileMenu();
});
// 点击遮罩层关闭菜单
document.getElementById('mobileNavOverlay').addEventListener('click', function() {
closeMobileMenu();
});
// 关闭移动端菜单的函数
function closeMobileMenu() {
document.getElementById('mobileNav').classList.remove('active');
document.getElementById('mobileNavOverlay').classList.remove('active');
document.body.style.overflow = ''; // 恢复背景滚动
}
// 辅助函数:调整颜色亮度
function adjustColorBrightness(hex, percent) {
// 将hex转为rgb
let r = parseInt(hex.substring(1, 3), 16);
let g = parseInt(hex.substring(3, 5), 16);
let b = parseInt(hex.substring(5, 7), 16);
// 调整亮度
r = Math.max(0, Math.min(255, r + percent));
g = Math.max(0, Math.min(255, g + percent));
b = Math.max(0, Math.min(255, b + percent));
// 转回hex
return `#${r.toString(16).padStart(2, '0')}${g.toString(16).padStart(2, '0')}${b.toString(16).padStart(2, '0')}`;
}
// 辅助函数:将十六进制颜色转换为RGBA格式
function hexToRGBA(hex, alpha) {
const r = parseInt(hex.substring(1, 3), 16);
const g = parseInt(hex.substring(3, 5), 16);
const b = parseInt(hex.substring(5, 7), 16);
return `rgba(${r}, ${g}, ${b}, ${alpha})`;
}
// 平滑滚动
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener('click', function (e) {
e.preventDefault();
const targetId = this.getAttribute('href').substring(1);
if (!targetId) return;
const targetElement = document.getElementById(targetId);
if (targetElement) {
window.scrollTo({
top: targetElement.offsetTop - 80,
behavior: 'smooth'
});
// 关闭移动端菜单
closeMobileMenu();
}
});
});
</script>
</body>
</html>