重构应用程序界面,添加动态光晕、数据流动和扫描线效果
This commit is contained in:
2979
pnpm-lock.yaml
generated
Normal file
2979
pnpm-lock.yaml
generated
Normal file
File diff suppressed because it is too large
Load Diff
52
src/App.tsx
52
src/App.tsx
@@ -3,11 +3,57 @@ import "./App.css";
|
||||
|
||||
function App() {
|
||||
return (
|
||||
<div className="flex items-center justify-center flex-col min-h-screen bg-gray-100">
|
||||
<a href="https://vite.dev" target="_blank">
|
||||
<img src={freestyleLogo} alt="Vite logo" className="opacity-10 w-48" />
|
||||
<div className="relative min-h-screen overflow-hidden grid-pattern">
|
||||
{/* 动态光晕背景 */}
|
||||
<div className="glow-orb glow-orb-1" />
|
||||
<div className="glow-orb glow-orb-2" />
|
||||
<div className="glow-orb glow-orb-3" />
|
||||
|
||||
{/* 数据流动效果 */}
|
||||
<div className="data-stream" />
|
||||
|
||||
{/* 扫描线效果 */}
|
||||
<div className="scanline" />
|
||||
|
||||
{/* 主内容区域 */}
|
||||
<div className="relative z-10 flex items-center justify-center flex-col min-h-screen px-6">
|
||||
{/* Logo 区域 */}
|
||||
<div className="glass-card px-6 py-4 mb-8 transition-all duration-300">
|
||||
<a href="https://turingflow.ai" target="_blank" rel="noopener noreferrer">
|
||||
<img
|
||||
src={freestyleLogo}
|
||||
alt="TuringFlow logo"
|
||||
className="h-12 w-auto object-contain filter drop-shadow-[0_0_20px_rgba(0,212,255,0.3)]
|
||||
hover:drop-shadow-[0_0_30px_rgba(0,212,255,0.5)] transition-all duration-300"
|
||||
/>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
{/* 标题 */}
|
||||
<h1 className="text-4xl md:text-6xl font-bold mb-4 text-gradient">
|
||||
TuringFlow
|
||||
</h1>
|
||||
|
||||
{/* 副标题 */}
|
||||
<p className="text-lg md:text-xl mb-8 text-center max-w-2xl"
|
||||
style={{ color: 'var(--sa-text-secondary)' }}>
|
||||
构建下一代智能应用的强大平台
|
||||
</p>
|
||||
|
||||
{/* 按钮组 */}
|
||||
<div className="flex gap-4 flex-wrap justify-center">
|
||||
<button className="glow-button">
|
||||
开始使用
|
||||
</button>
|
||||
<button className="glass-card px-8 py-3 font-semibold transition-all duration-300
|
||||
hover:border-[var(--sa-border-glow)] cursor-pointer"
|
||||
style={{ color: 'var(--sa-text-primary)' }}>
|
||||
了解更多
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
217
src/index.css
217
src/index.css
@@ -1 +1,218 @@
|
||||
@import "tailwindcss";
|
||||
|
||||
/* CSS 变量定义 */
|
||||
:root {
|
||||
/* 背景色 */
|
||||
--sa-bg-primary: #0a0a0f;
|
||||
--sa-bg-secondary: #12121a;
|
||||
--sa-bg-tertiary: #1a1a25;
|
||||
|
||||
/* 强调色 */
|
||||
--sa-accent-cyan: #00d4ff;
|
||||
--sa-accent-sky: #0ea5e9;
|
||||
--sa-accent-blue: #3b82f6;
|
||||
|
||||
/* 文字色 */
|
||||
--sa-text-primary: #f0f0f5;
|
||||
--sa-text-secondary: #a0a0b0;
|
||||
--sa-text-muted: #606070;
|
||||
|
||||
/* 边框色 */
|
||||
--sa-border-primary: rgba(255, 255, 255, 0.1);
|
||||
--sa-border-glow: rgba(0, 212, 255, 0.3);
|
||||
|
||||
/* 玻璃效果 */
|
||||
--sa-glass-bg: rgba(255, 255, 255, 0.03);
|
||||
--sa-glass-border: rgba(255, 255, 255, 0.08);
|
||||
}
|
||||
|
||||
/* 基础样式 */
|
||||
html, body, #root {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
min-height: 100vh;
|
||||
background: var(--sa-bg-primary);
|
||||
color: var(--sa-text-primary);
|
||||
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
||||
}
|
||||
|
||||
/* 网格背景图案 */
|
||||
.grid-pattern {
|
||||
background-image:
|
||||
linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
|
||||
linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
|
||||
background-size: 50px 50px;
|
||||
}
|
||||
|
||||
/* 动态光晕 */
|
||||
.glow-orb {
|
||||
position: absolute;
|
||||
border-radius: 50%;
|
||||
filter: blur(100px);
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.glow-orb-1 {
|
||||
width: 384px;
|
||||
height: 384px;
|
||||
background: var(--sa-accent-cyan);
|
||||
opacity: 0.15;
|
||||
top: -100px;
|
||||
left: -100px;
|
||||
filter: blur(120px);
|
||||
animation: float-1 8s ease-in-out infinite;
|
||||
}
|
||||
|
||||
.glow-orb-2 {
|
||||
width: 320px;
|
||||
height: 320px;
|
||||
background: var(--sa-accent-sky);
|
||||
opacity: 0.15;
|
||||
bottom: -80px;
|
||||
right: -80px;
|
||||
filter: blur(100px);
|
||||
animation: float-2 10s ease-in-out infinite;
|
||||
}
|
||||
|
||||
.glow-orb-3 {
|
||||
width: 600px;
|
||||
height: 600px;
|
||||
background: var(--sa-accent-blue);
|
||||
opacity: 0.08;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
filter: blur(150px);
|
||||
animation: pulse 6s ease-in-out infinite;
|
||||
}
|
||||
|
||||
/* 光晕动画 */
|
||||
@keyframes float-1 {
|
||||
0%, 100% { transform: translate(0, 0); }
|
||||
50% { transform: translate(30px, 20px); }
|
||||
}
|
||||
|
||||
@keyframes float-2 {
|
||||
0%, 100% { transform: translate(0, 0); }
|
||||
50% { transform: translate(-20px, -30px); }
|
||||
}
|
||||
|
||||
@keyframes pulse {
|
||||
0%, 100% { opacity: 0.08; transform: translate(-50%, -50%) scale(1); }
|
||||
50% { opacity: 0.12; transform: translate(-50%, -50%) scale(1.1); }
|
||||
}
|
||||
|
||||
/* 数据流动效果 */
|
||||
.data-stream {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.data-stream::before,
|
||||
.data-stream::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
width: 2px;
|
||||
height: 100px;
|
||||
background: linear-gradient(180deg, transparent, var(--sa-accent-cyan), transparent);
|
||||
opacity: 0.3;
|
||||
animation: stream 4s linear infinite;
|
||||
}
|
||||
|
||||
.data-stream::before {
|
||||
left: 20%;
|
||||
animation-delay: 0s;
|
||||
}
|
||||
|
||||
.data-stream::after {
|
||||
left: 80%;
|
||||
animation-delay: 2s;
|
||||
}
|
||||
|
||||
@keyframes stream {
|
||||
0% { top: -100px; opacity: 0; }
|
||||
10% { opacity: 0.3; }
|
||||
90% { opacity: 0.3; }
|
||||
100% { top: 100%; opacity: 0; }
|
||||
}
|
||||
|
||||
/* 玻璃拟态卡片 */
|
||||
.glass-card {
|
||||
background: var(--sa-glass-bg);
|
||||
backdrop-filter: blur(20px);
|
||||
-webkit-backdrop-filter: blur(20px);
|
||||
border: 1px solid var(--sa-glass-border);
|
||||
border-radius: 16px;
|
||||
box-shadow:
|
||||
0 4px 30px rgba(0, 0, 0, 0.3),
|
||||
inset 0 1px 0 rgba(255, 255, 255, 0.05);
|
||||
}
|
||||
|
||||
.glass-card:hover {
|
||||
border-color: var(--sa-border-glow);
|
||||
box-shadow:
|
||||
0 4px 30px rgba(0, 0, 0, 0.3),
|
||||
0 0 30px rgba(0, 212, 255, 0.1),
|
||||
inset 0 1px 0 rgba(255, 255, 255, 0.05);
|
||||
}
|
||||
|
||||
/* 发光按钮 */
|
||||
.glow-button {
|
||||
background: linear-gradient(135deg, var(--sa-accent-cyan), var(--sa-accent-blue));
|
||||
color: white;
|
||||
border: none;
|
||||
padding: 12px 32px;
|
||||
border-radius: 8px;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.glow-button::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: -100%;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
|
||||
transition: left 0.5s ease;
|
||||
}
|
||||
|
||||
.glow-button:hover::before {
|
||||
left: 100%;
|
||||
}
|
||||
|
||||
.glow-button:hover {
|
||||
box-shadow: 0 0 30px rgba(0, 212, 255, 0.5);
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
/* 文字渐变 */
|
||||
.text-gradient {
|
||||
background: linear-gradient(135deg, var(--sa-accent-cyan), var(--sa-accent-sky), var(--sa-accent-blue));
|
||||
-webkit-background-clip: text;
|
||||
background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
}
|
||||
|
||||
/* 扫描线效果 */
|
||||
.scanline {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 2px;
|
||||
background: linear-gradient(90deg, transparent, var(--sa-accent-cyan), transparent);
|
||||
opacity: 0.5;
|
||||
animation: scan 3s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes scan {
|
||||
0% { top: 0; opacity: 0; }
|
||||
50% { opacity: 0.5; }
|
||||
100% { top: 100%; opacity: 0; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user