mirror of
https://github.com/imputnet/cobalt.git
synced 2026-10-24 02:52:18 +00:00
Redesign hero with multi-platform download visualization
This commit is contained in:
parent
dcb212a224
commit
a45e119f8c
2 changed files with 111 additions and 97 deletions
|
|
@ -6,22 +6,25 @@ import {
|
|||
CircleAlert,
|
||||
Clock3,
|
||||
Download,
|
||||
Facebook,
|
||||
FileText,
|
||||
FolderCheck,
|
||||
FolderOpen,
|
||||
History,
|
||||
Image as ImageIcon,
|
||||
Instagram,
|
||||
Link2,
|
||||
LoaderCircle,
|
||||
Music2,
|
||||
Pause,
|
||||
Play,
|
||||
RotateCcw,
|
||||
ShieldCheck,
|
||||
Sparkles,
|
||||
Trash2,
|
||||
Twitch,
|
||||
Upload,
|
||||
Video,
|
||||
X,
|
||||
Youtube,
|
||||
} from 'lucide-react';
|
||||
import { cancelJob, clearHistory, createJobs, getDownloadFolder, listJobs, openMedia, retryJob, selectDownloadFolder, subscribeJobs } from './api';
|
||||
import type { DownloadJob, JobStatus, MediaItem } from './types';
|
||||
|
|
@ -272,10 +275,6 @@ export default function App() {
|
|||
return (
|
||||
<div className="app-shell">
|
||||
<header className="topbar">
|
||||
<a className="brand" href="#top" aria-label="返回首页">
|
||||
<span className="brand-mark"><Play size={17} fill="currentColor" /></span>
|
||||
<span>Veo<small>媒体下载器</small></span>
|
||||
</a>
|
||||
<div className="topbar-actions">
|
||||
<button
|
||||
className={`folder-button ${folderReady ? 'is-ready' : ''}`}
|
||||
|
|
@ -292,20 +291,17 @@ export default function App() {
|
|||
</header>
|
||||
|
||||
<main id="top">
|
||||
<section className="hero">
|
||||
<div className="hero-copy">
|
||||
<div className="eyebrow"><Sparkles size={14} /> 快速 · 清晰 · 本地保存</div>
|
||||
<h1>收藏好内容,<br /><em>只需一个链接。</em></h1>
|
||||
<p>粘贴公开 X 帖子链接,一次保存视频、图片和 GIF。任务在本机处理,进度一目了然。</p>
|
||||
</div>
|
||||
<div className="hero-art" aria-hidden="true">
|
||||
<div className="orb orb-one" />
|
||||
<div className="orb orb-two" />
|
||||
<div className="hero-device">
|
||||
<span><Video size={20} /></span>
|
||||
<div><i /><i /><i /></div>
|
||||
<b><ArrowDownToLine size={18} /></b>
|
||||
</div>
|
||||
<section className="hero" aria-label="多平台媒体下载">
|
||||
<div className="platform-scene" aria-hidden="true">
|
||||
<div className="platform-orbit orbit-one" />
|
||||
<div className="platform-orbit orbit-two" />
|
||||
<div className="platform-core"><ArrowDownToLine size={34} /></div>
|
||||
<div className="platform-chip platform-instagram"><Instagram size={22} /><span>Instagram</span></div>
|
||||
<div className="platform-chip platform-youtube"><Youtube size={23} /><span>YouTube</span></div>
|
||||
<div className="platform-chip platform-x"><b>𝕏</b></div>
|
||||
<div className="platform-chip platform-tiktok"><Music2 size={21} /><span>TikTok</span></div>
|
||||
<div className="platform-chip platform-facebook"><Facebook size={21} /><span>Facebook</span></div>
|
||||
<div className="platform-chip platform-twitch"><Twitch size={21} /><span>Twitch</span></div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
|
|
|||
|
|
@ -43,26 +43,12 @@ button:focus-visible, a:focus-visible, textarea:focus-visible, [role="button"]:f
|
|||
padding: 0 max(32px, calc((100vw - 1120px) / 2));
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
justify-content: flex-end;
|
||||
border-bottom: 1px solid rgba(225, 221, 231, .75);
|
||||
background: rgba(247, 247, 255, .86);
|
||||
backdrop-filter: blur(20px) saturate(150%);
|
||||
}
|
||||
|
||||
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); }
|
||||
.brand-mark {
|
||||
width: 42px;
|
||||
height: 42px;
|
||||
border-radius: 15px;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
color: white;
|
||||
background: linear-gradient(145deg, #7762b5, #4f378b);
|
||||
box-shadow: 0 8px 20px rgba(79, 55, 139, .24);
|
||||
}
|
||||
.brand-mark svg { transform: translateX(1px); }
|
||||
.brand > span:last-child { display: grid; font-size: 17px; font-weight: 800; line-height: 1.1; letter-spacing: -.03em; }
|
||||
.brand small { margin-top: 4px; color: var(--muted); font-size: 9px; font-weight: 600; letter-spacing: .08em; }
|
||||
.topbar-actions { display: flex; align-items: center; gap: 18px; }
|
||||
.folder-button {
|
||||
min-height: 42px;
|
||||
|
|
@ -91,64 +77,95 @@ main { width: min(1120px, calc(100% - 56px)); margin: 0 auto; }
|
|||
position: relative;
|
||||
min-height: 390px;
|
||||
margin-top: 28px;
|
||||
padding: 64px 66px;
|
||||
border-radius: 40px;
|
||||
display: grid;
|
||||
grid-template-columns: 1.2fr .8fr;
|
||||
align-items: center;
|
||||
overflow: hidden;
|
||||
color: white;
|
||||
background: linear-gradient(135deg, #262052 0%, #504291 56%, #7562bb 100%);
|
||||
box-shadow: 0 24px 60px rgba(47, 37, 97, .20);
|
||||
}
|
||||
.hero::before { content: ""; position: absolute; inset: 0; opacity: .18; background-image: linear-gradient(rgba(255,255,255,.22) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.22) 1px, transparent 1px); background-size: 36px 36px; mask-image: linear-gradient(90deg, transparent, black); }
|
||||
.hero-copy { position: relative; z-index: 2; }
|
||||
.eyebrow {
|
||||
width: fit-content;
|
||||
margin-bottom: 24px;
|
||||
padding: 8px 12px;
|
||||
.hero::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
opacity: .16;
|
||||
background-image: linear-gradient(rgba(255,255,255,.22) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.22) 1px, transparent 1px);
|
||||
background-size: 36px 36px;
|
||||
mask-image: radial-gradient(circle at center, black, transparent 82%);
|
||||
}
|
||||
.platform-scene { position: absolute; inset: 0; }
|
||||
.platform-scene::before, .platform-scene::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
border-radius: 50%;
|
||||
filter: blur(1px);
|
||||
}
|
||||
.platform-scene::before { width: 330px; height: 330px; left: -76px; bottom: -180px; background: rgba(255,184,158,.20); }
|
||||
.platform-scene::after { width: 270px; height: 270px; right: -65px; top: -120px; background: rgba(255,255,255,.10); }
|
||||
.platform-orbit {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
border: 1px solid rgba(255,255,255,.16);
|
||||
border-radius: 999px;
|
||||
border-radius: 50%;
|
||||
transform: translate(-50%, -50%) rotate(-8deg);
|
||||
}
|
||||
.orbit-one { width: 64%; height: 210px; }
|
||||
.orbit-two { width: 38%; height: 330px; transform: translate(-50%, -50%) rotate(68deg); }
|
||||
.platform-core {
|
||||
position: absolute;
|
||||
z-index: 2;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
width: 112px;
|
||||
height: 112px;
|
||||
border: 1px solid rgba(255,255,255,.38);
|
||||
border-radius: 36px;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
color: #564294;
|
||||
background: rgba(255,255,255,.92);
|
||||
box-shadow: 0 24px 48px rgba(22,16,56,.30), 0 0 0 15px rgba(255,255,255,.08);
|
||||
transform: translate(-50%, -50%) rotate(-6deg);
|
||||
}
|
||||
.platform-chip {
|
||||
position: absolute;
|
||||
z-index: 2;
|
||||
min-height: 58px;
|
||||
padding: 0 17px;
|
||||
border: 1px solid rgba(255,255,255,.26);
|
||||
border-radius: 20px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 7px;
|
||||
color: #eee9ff;
|
||||
background: rgba(255,255,255,.08);
|
||||
font-size: 11px;
|
||||
font-weight: 700;
|
||||
letter-spacing: .04em;
|
||||
gap: 10px;
|
||||
color: white;
|
||||
background: rgba(255,255,255,.13);
|
||||
box-shadow: 0 18px 34px rgba(23,16,59,.18);
|
||||
backdrop-filter: blur(16px);
|
||||
font-size: 13px;
|
||||
font-weight: 800;
|
||||
letter-spacing: -.02em;
|
||||
}
|
||||
.hero h1 { margin: 0; font-size: clamp(50px, 5.6vw, 72px); line-height: 1.04; letter-spacing: -.065em; }
|
||||
.hero h1 em { color: #ded6ff; font-style: normal; }
|
||||
.hero p { max-width: 570px; margin: 24px 0 0; color: rgba(255,255,255,.76); font-size: 15px; line-height: 1.8; }
|
||||
.hero-art { position: relative; z-index: 1; height: 250px; }
|
||||
.orb { position: absolute; border-radius: 50%; filter: blur(1px); }
|
||||
.orb-one { width: 230px; height: 230px; right: -10px; top: 0; background: linear-gradient(145deg, rgba(255,255,255,.25), rgba(255,255,255,.04)); }
|
||||
.orb-two { width: 110px; height: 110px; right: 170px; bottom: -5px; background: rgba(255,184,158,.32); }
|
||||
.hero-device {
|
||||
.platform-chip svg, .platform-chip b { flex: none; }
|
||||
.platform-chip b { font-size: 24px; line-height: 1; }
|
||||
.platform-instagram { left: 9%; top: 17%; transform: rotate(-6deg); }
|
||||
.platform-youtube { right: 9%; top: 18%; transform: rotate(5deg); }
|
||||
.platform-x { left: 18%; top: 56%; transform: rotate(4deg); }
|
||||
.platform-tiktok { right: 17%; top: 58%; transform: rotate(-5deg); }
|
||||
.platform-facebook { left: 36%; top: 10%; transform: rotate(3deg); }
|
||||
.platform-twitch { right: 37%; bottom: 8%; transform: rotate(-3deg); }
|
||||
.platform-instagram svg { color: #ffd0ec; }
|
||||
.platform-youtube svg { color: #ffaca7; }
|
||||
.platform-tiktok svg { color: #bff8f4; }
|
||||
.platform-facebook svg { color: #c7dcff; }
|
||||
.platform-twitch svg { color: #dccbff; }
|
||||
.platform-chip::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 34px;
|
||||
right: 30px;
|
||||
width: 250px;
|
||||
height: 150px;
|
||||
padding: 24px;
|
||||
border: 1px solid rgba(255,255,255,.3);
|
||||
border-radius: 28px;
|
||||
display: grid;
|
||||
grid-template-columns: 54px 1fr 42px;
|
||||
align-items: center;
|
||||
gap: 16px;
|
||||
background: rgba(255,255,255,.15);
|
||||
box-shadow: 0 25px 45px rgba(27, 20, 68, .25);
|
||||
backdrop-filter: blur(18px);
|
||||
transform: rotate(-4deg);
|
||||
inset: 5px;
|
||||
border: 1px solid rgba(255,255,255,.07);
|
||||
border-radius: 15px;
|
||||
pointer-events: none;
|
||||
}
|
||||
.hero-device > span { width: 54px; height: 54px; border-radius: 18px; display: grid; place-items: center; color: #544294; background: #fff; }
|
||||
.hero-device > div { display: grid; gap: 8px; }
|
||||
.hero-device i { height: 7px; border-radius: 9px; background: rgba(255,255,255,.45); }
|
||||
.hero-device i:nth-child(2) { width: 74%; }
|
||||
.hero-device i:nth-child(3) { width: 47%; }
|
||||
.hero-device b { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: white; background: #ff8a65; }
|
||||
|
||||
.ingest-panel {
|
||||
position: relative;
|
||||
|
|
@ -259,9 +276,6 @@ main { width: min(1120px, calc(100% - 56px)); margin: 0 auto; }
|
|||
@keyframes spin { to { transform: rotate(360deg); } }
|
||||
|
||||
@media (max-width: 900px) {
|
||||
.hero { padding: 52px 44px; }
|
||||
.hero-art { transform: scale(.84); transform-origin: right center; }
|
||||
.hero-device { right: -20px; }
|
||||
.ingest-panel, .quick-stats, .workspace, .privacy-note { margin-left: 22px; margin-right: 22px; }
|
||||
}
|
||||
|
||||
|
|
@ -275,25 +289,29 @@ main { width: min(1120px, calc(100% - 56px)); margin: 0 auto; }
|
|||
border-bottom-color: rgba(225,221,231,.55);
|
||||
background: rgba(247,247,255,.91);
|
||||
}
|
||||
.brand { gap: 9px; }
|
||||
.brand-mark { width: 38px; height: 38px; border-radius: 13px; }
|
||||
.brand > span:last-child { font-size: 15px; }
|
||||
.brand small { margin-top: 2px; font-size: 8px; }
|
||||
.topbar-actions { gap: 0; }
|
||||
.service-state { display: none; }
|
||||
.folder-button { width: 42px; height: 42px; min-height: 42px; padding: 0; border: 0; border-radius: 14px; justify-content: center; background: var(--primary-soft); }
|
||||
.folder-button > span { display: none; }
|
||||
main { width: 100%; }
|
||||
.hero { min-height: 330px; margin: 10px 12px 0; padding: 34px 22px 100px; border-radius: 32px; display: block; box-shadow: 0 18px 40px rgba(47,37,97,.18); }
|
||||
.hero { min-height: 330px; margin: 10px 12px 0; border-radius: 32px; box-shadow: 0 18px 40px rgba(47,37,97,.18); }
|
||||
.hero::before { background-size: 30px 30px; opacity: .12; }
|
||||
.hero-copy { position: relative; z-index: 3; }
|
||||
.eyebrow { margin-bottom: 18px; padding: 7px 10px; font-size: 9px; }
|
||||
.hero h1 { max-width: 360px; font-size: clamp(34px, 9.8vw, 43px); line-height: 1.08; letter-spacing: -.06em; }
|
||||
.hero p { max-width: 315px; margin-top: 17px; font-size: 12px; line-height: 1.7; }
|
||||
.hero-art { position: absolute; right: -28px; bottom: -58px; width: 220px; height: 190px; opacity: .72; transform: scale(.78) rotate(7deg); }
|
||||
.orb-one { width: 190px; height: 190px; }
|
||||
.orb-two { right: 130px; }
|
||||
.hero-device { top: 20px; right: 0; }
|
||||
.platform-scene::before { width: 230px; height: 230px; left: -90px; bottom: -92px; }
|
||||
.platform-scene::after { width: 210px; height: 210px; right: -92px; top: -80px; }
|
||||
.orbit-one { width: 83%; height: 156px; }
|
||||
.orbit-two { width: 48%; height: 270px; }
|
||||
.platform-core { top: 47%; width: 78px; height: 78px; border-radius: 25px; box-shadow: 0 18px 36px rgba(22,16,56,.28), 0 0 0 10px rgba(255,255,255,.08); }
|
||||
.platform-core svg { width: 27px; height: 27px; }
|
||||
.platform-chip { min-height: 45px; padding: 0 12px; border-radius: 15px; gap: 7px; font-size: 10px; }
|
||||
.platform-chip svg { width: 18px; height: 18px; }
|
||||
.platform-chip b { font-size: 19px; }
|
||||
.platform-chip::after { inset: 4px; border-radius: 11px; }
|
||||
.platform-instagram { left: 5%; top: 10%; }
|
||||
.platform-youtube { right: 5%; top: 11%; }
|
||||
.platform-x { left: 6%; top: 40%; }
|
||||
.platform-tiktok { right: 5%; top: 42%; }
|
||||
.platform-facebook { left: 11%; top: 66%; }
|
||||
.platform-twitch { right: 10%; bottom: 16%; }
|
||||
.ingest-panel { margin: -67px 22px 0; padding: 18px; border-radius: 27px; box-shadow: 0 16px 36px rgba(42,34,72,.14); }
|
||||
.panel-heading { margin-bottom: 15px; }
|
||||
.panel-heading > div:first-child { gap: 10px; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue