feat: add light website intro motion

This commit is contained in:
boos
2026-06-06 18:29:10 +08:00
parent def8d7a204
commit 4b757b8250
4 changed files with 276 additions and 86 deletions
+20 -12
View File
@@ -32,10 +32,11 @@ export function BossAiMotion({ children }: BossAiMotionProps) {
const matchMedia = gsap.matchMedia();
matchMedia.add("(prefers-reduced-motion: reduce)", () => {
gsap.set("[data-motion], [data-motion-dot], [data-motion-orbit], [data-motion-line]", {
gsap.set("[data-motion], [data-motion-dot], [data-motion-orbit], [data-motion-line], .boot-screen", {
autoAlpha: 1,
clearProps: "transform",
});
gsap.set(".boot-screen", { display: "none" });
});
matchMedia.add("(prefers-reduced-motion: no-preference)", () => {
@@ -50,26 +51,33 @@ export function BossAiMotion({ children }: BossAiMotionProps) {
const intro = gsap.timeline({ defaults: { ease: bossEase } });
intro
.from("[data-motion='nav']", { autoAlpha: 0, y: -18, duration: 0.7 })
.from(".section-kicker", { autoAlpha: 0, y: 18, duration: 0.56 }, "-=0.18")
.from(".boot-frame", { y: 20, scale: 0.985, duration: 0.42, ease: "power3.out" })
.from(".boot-mark", { scale: 0.72, rotate: -16, duration: 0.36 }, "-=0.18")
.from(".boot-brand strong", { x: -8, duration: 0.32 }, "-=0.24")
.fromTo(".boot-rule", { scaleX: 0 }, { scaleX: 1, duration: 0.56, transformOrigin: "left center" }, "-=0.12")
.from(".boot-lines p", { y: 8, duration: 0.28, stagger: 0.07 }, "-=0.2")
.fromTo(".boot-progress span", { scaleX: 0 }, { scaleX: 1, duration: 0.72, transformOrigin: "left center" }, "-=0.08")
.to(".boot-screen", { autoAlpha: 0, yPercent: -4, duration: 0.62, ease: "power3.inOut", delay: 0.08 })
.set(".boot-screen", { display: "none" })
.from("[data-motion='nav']", { y: -14, duration: 0.7 })
.from(".section-kicker", { y: 14, duration: 0.56 }, "-=0.18")
.from(
splitTitle?.words ?? ".hero-copy h1",
{
autoAlpha: 0,
yPercent: 92,
rotateX: -18,
yPercent: 18,
rotateX: -6,
transformOrigin: "50% 100%",
duration: 0.82,
stagger: { each: 0.035, from: "start" },
},
"-=0.28",
)
.from(".hero-copy p", { autoAlpha: 0, y: 22, duration: 0.7 }, "-=0.5")
.from(".hero-actions > *", { autoAlpha: 0, y: 14, duration: 0.46, stagger: 0.08 }, "-=0.42")
.from(".hero-proof > div", { autoAlpha: 0, y: 16, duration: 0.5, stagger: 0.07 }, "-=0.28")
.from("[data-motion='hero-console']", { autoAlpha: 0, y: 34, rotateX: 5, duration: 0.9 }, "-=0.78")
.from("[data-motion='route-row']", { autoAlpha: 0, x: 24, duration: 0.55, stagger: 0.08 }, "-=0.48")
.from("[data-motion='node']", { autoAlpha: 0, scale: 0.94, duration: 0.45, stagger: 0.08 }, "-=0.3");
.from(".hero-copy p", { y: 18, duration: 0.7 }, "-=0.5")
.from(".hero-actions > *", { y: 12, duration: 0.46, stagger: 0.08 }, "-=0.42")
.from(".hero-proof > div", { y: 12, duration: 0.5, stagger: 0.07 }, "-=0.28")
.from("[data-motion='hero-console']", { y: 26, rotateX: 4, duration: 0.9 }, "-=0.78")
.from("[data-motion='route-row']", { x: 14, duration: 0.55, stagger: 0.08 }, "-=0.48")
.from("[data-motion='node']", { scale: 0.96, duration: 0.45, stagger: 0.08 }, "-=0.3");
gsap.to("[data-motion-orbit]", {
rotate: 360,
+221 -72
View File
@@ -1,20 +1,21 @@
@import "tailwindcss";
:root {
--ink: #07110f;
--ink-soft: #101d19;
--panel: rgba(13, 25, 22, 0.82);
--panel-strong: rgba(18, 34, 29, 0.9);
--line: rgba(231, 255, 219, 0.16);
--line-strong: rgba(215, 255, 77, 0.38);
--text: #f8fff4;
--muted: rgba(237, 249, 232, 0.68);
--faint: rgba(237, 249, 232, 0.44);
--acid: #d7ff4d;
--acid-2: #a5ff5f;
--ice: #e9f7ff;
--blue: #8bf6ff;
--amber: #ffec99;
--ink: #f7fbf2;
--ink-soft: #eef6e6;
--panel: rgba(255, 255, 255, 0.82);
--panel-strong: rgba(255, 255, 255, 0.94);
--line: rgba(20, 58, 46, 0.12);
--line-strong: rgba(93, 150, 38, 0.28);
--text: #091713;
--muted: rgba(22, 47, 39, 0.68);
--faint: rgba(22, 47, 39, 0.46);
--acid: #b7ed2a;
--acid-2: #79d94d;
--ice: #f7ffef;
--blue: #18b9c7;
--amber: #a97805;
--shadow: rgba(18, 48, 38, 0.12);
--radius: 24px;
}
@@ -56,9 +57,9 @@ a {
min-height: 100dvh;
overflow: hidden;
background:
radial-gradient(circle at 8% 18%, rgba(215, 255, 77, 0.16), transparent 28%),
radial-gradient(circle at 88% 8%, rgba(139, 246, 255, 0.12), transparent 30%),
linear-gradient(145deg, #040807 0%, #08110f 42%, #13221d 100%);
radial-gradient(circle at 8% 18%, rgba(183, 237, 42, 0.26), transparent 28%),
radial-gradient(circle at 88% 8%, rgba(24, 185, 199, 0.15), transparent 30%),
linear-gradient(145deg, #fbfff6 0%, #f3faec 46%, #e9f6ea 100%);
}
.motion-root {
@@ -80,8 +81,8 @@ a {
pointer-events: none;
content: "";
background:
linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
linear-gradient(rgba(32, 82, 66, 0.05) 1px, transparent 1px),
linear-gradient(90deg, rgba(32, 82, 66, 0.045) 1px, transparent 1px);
background-size: 82px 82px;
mask-image: linear-gradient(to bottom, black, transparent 78%);
}
@@ -91,10 +92,136 @@ a {
inset: 0;
z-index: 0;
pointer-events: none;
opacity: 0.24;
opacity: 0.14;
background-image:
repeating-radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.14) 0 1px, transparent 1px 4px);
mix-blend-mode: overlay;
repeating-radial-gradient(circle at 30% 30%, rgba(10, 36, 28, 0.11) 0 1px, transparent 1px 4px);
mix-blend-mode: multiply;
}
.boot-screen {
position: fixed;
inset: 0;
z-index: 40;
display: grid;
place-items: center;
padding: 28px;
pointer-events: none;
background:
radial-gradient(circle at 28% 34%, rgba(183, 237, 42, 0.28), transparent 30%),
radial-gradient(circle at 72% 60%, rgba(24, 185, 199, 0.16), transparent 32%),
rgba(247, 251, 242, 0.84);
backdrop-filter: blur(14px);
animation: boot-screen-fallback 3.2s 0.25s ease forwards;
}
.boot-frame {
position: relative;
width: min(720px, calc(100% - 28px));
min-height: 290px;
display: grid;
align-content: start;
gap: 22px;
border: 1px solid rgba(11, 36, 28, 0.34);
border-radius: 6px;
background:
linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(250, 255, 244, 0.9)),
#ffffff;
padding: clamp(24px, 4vw, 34px);
box-shadow:
0 34px 120px rgba(28, 78, 60, 0.24),
0 0 0 1px rgba(255, 255, 255, 0.72),
inset 0 1px 0 rgba(255, 255, 255, 0.96);
}
.boot-frame::before,
.boot-frame::after {
position: absolute;
inset: -1px;
pointer-events: none;
content: "";
border-radius: inherit;
}
.boot-frame::before {
border: 1px solid rgba(183, 237, 42, 0.28);
clip-path: polygon(0 0, 42% 0, 42% 1px, 1px 1px, 1px 42%, 0 42%);
}
.boot-frame::after {
border: 1px solid rgba(24, 185, 199, 0.2);
clip-path: polygon(58% calc(100% - 1px), calc(100% - 1px) calc(100% - 1px), calc(100% - 1px) 58%, 100% 58%, 100% 100%, 58% 100%);
}
.boot-brand {
display: flex;
align-items: center;
gap: 14px;
color: var(--text);
font-size: 22px;
font-weight: 860;
letter-spacing: -0.03em;
}
.boot-mark {
width: 18px;
height: 18px;
border-radius: 5px;
background:
linear-gradient(135deg, var(--acid), var(--acid-2));
box-shadow:
0 0 0 8px rgba(183, 237, 42, 0.12),
0 18px 42px rgba(92, 169, 37, 0.26);
}
.boot-rule {
width: 100%;
height: 1px;
background: linear-gradient(90deg, rgba(11, 36, 28, 0.22), rgba(24, 185, 199, 0.16), transparent);
transform-origin: left center;
animation: boot-rule-fallback 0.72s ease both;
}
.boot-lines {
display: grid;
gap: 11px;
}
.boot-lines p {
margin: 0;
display: flex;
align-items: center;
gap: 10px;
color: rgba(22, 47, 39, 0.78);
font-family: var(--font-geist-mono), monospace;
font-size: 12px;
}
.boot-lines p span {
width: 7px;
height: 7px;
flex: 0 0 auto;
border-radius: 999px;
background: var(--blue);
box-shadow: 0 0 22px rgba(24, 185, 199, 0.34);
}
.boot-progress {
position: absolute;
left: clamp(24px, 4vw, 34px);
right: clamp(24px, 4vw, 34px);
bottom: clamp(22px, 3vw, 28px);
height: 2px;
overflow: hidden;
background: rgba(11, 36, 28, 0.08);
}
.boot-progress span {
display: block;
width: 100%;
height: 100%;
background: linear-gradient(90deg, var(--acid), var(--blue));
transform-origin: left center;
animation: boot-rule-fallback 1.2s 0.32s ease both;
}
.site-nav,
@@ -138,7 +265,7 @@ a {
.brand-mark img {
border-radius: 12px;
box-shadow: 0 12px 34px rgba(215, 255, 77, 0.14);
box-shadow: 0 12px 34px rgba(91, 166, 36, 0.16);
}
.nav-links {
@@ -217,7 +344,7 @@ a {
.ghost-link,
.secondary-cta {
border-color: var(--line);
background: rgba(255, 255, 255, 0.03);
background: rgba(255, 255, 255, 0.62);
color: var(--muted);
}
@@ -225,7 +352,7 @@ a {
.primary-cta {
background: var(--acid);
color: #07110f;
box-shadow: 0 22px 48px rgba(215, 255, 77, 0.16);
box-shadow: 0 22px 48px rgba(91, 166, 36, 0.18);
}
.ghost-link:hover,
@@ -276,7 +403,7 @@ a {
gap: 9px;
border: 1px solid var(--line);
border-radius: 999px;
background: rgba(255, 255, 255, 0.035);
background: rgba(255, 255, 255, 0.68);
color: var(--muted);
padding: 8px 12px;
font-size: 12px;
@@ -305,6 +432,7 @@ a {
.hero-copy h1 span {
display: block;
color: var(--acid);
text-shadow: 0 16px 44px rgba(91, 166, 36, 0.16);
}
.hero-word {
@@ -335,7 +463,7 @@ a {
gap: 7px;
border: 1px solid var(--line);
border-radius: 18px;
background: rgba(255, 255, 255, 0.03);
background: rgba(255, 255, 255, 0.7);
padding: 14px;
}
@@ -373,16 +501,16 @@ a {
border: 1px solid var(--line);
border-radius: 32px;
background:
radial-gradient(circle at 18% 18%, rgba(215, 255, 77, 0.14), transparent 30%),
radial-gradient(circle at 86% 82%, rgba(139, 246, 255, 0.09), transparent 34%),
linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.035)),
rgba(10, 20, 18, 0.84);
radial-gradient(circle at 18% 18%, rgba(183, 237, 42, 0.26), transparent 30%),
radial-gradient(circle at 86% 82%, rgba(24, 185, 199, 0.15), transparent 34%),
linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(247, 253, 241, 0.72)),
rgba(255, 255, 255, 0.82);
padding: 18px;
overflow: hidden;
transform-style: preserve-3d;
box-shadow:
inset 0 1px 0 rgba(255, 255, 255, 0.16),
0 34px 90px rgba(0, 0, 0, 0.36);
inset 0 1px 0 rgba(255, 255, 255, 0.9),
0 34px 90px rgba(18, 48, 38, 0.16);
}
.hero-console::before,
@@ -399,7 +527,7 @@ a {
height: 124px;
border-radius: 999px;
background:
linear-gradient(180deg, transparent, rgba(215, 255, 77, 0.18), rgba(139, 246, 255, 0.12), transparent);
linear-gradient(180deg, transparent, rgba(183, 237, 42, 0.22), rgba(24, 185, 199, 0.16), transparent);
filter: blur(10px);
opacity: var(--scan-opacity);
transform: translate3d(0, var(--scan-y), 0);
@@ -409,8 +537,8 @@ a {
z-index: 0;
inset-block: 72px 18px;
background:
linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
linear-gradient(rgba(28, 78, 60, 0.06) 1px, transparent 1px),
linear-gradient(90deg, rgba(28, 78, 60, 0.05) 1px, transparent 1px);
background-size: 32px 32px;
mask-image: linear-gradient(to bottom, transparent, black 12%, black 72%, transparent);
opacity: var(--grid-opacity);
@@ -425,7 +553,7 @@ a {
top: -130px;
border: 1px solid rgba(215, 255, 77, 0.12);
border-radius: 999px;
background: radial-gradient(circle, rgba(215, 255, 77, 0.12), transparent 60%);
background: radial-gradient(circle, rgba(183, 237, 42, 0.16), transparent 60%);
}
.console-orbit::after {
@@ -450,8 +578,8 @@ a {
.node-card,
.deploy-stack > div {
border: 1px solid var(--line);
background: rgba(255, 255, 255, 0.035);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
background: rgba(255, 255, 255, 0.68);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}
.route-row::before,
@@ -475,8 +603,8 @@ a {
border-radius: 18px;
border-color: rgba(215, 255, 77, 0.22);
background:
linear-gradient(90deg, rgba(215, 255, 77, 0.11), rgba(255, 255, 255, 0.035) 42%, rgba(139, 246, 255, 0.06)),
rgba(255, 255, 255, 0.035);
linear-gradient(90deg, rgba(183, 237, 42, 0.18), rgba(255, 255, 255, 0.72) 42%, rgba(24, 185, 199, 0.08)),
rgba(255, 255, 255, 0.72);
padding: 0 16px;
}
@@ -523,7 +651,7 @@ a {
inset: 0;
pointer-events: none;
content: "";
background: linear-gradient(110deg, rgba(255, 255, 255, 0.08), transparent 28%, transparent 76%, rgba(215, 255, 77, 0.06));
background: linear-gradient(110deg, rgba(255, 255, 255, 0.5), transparent 28%, transparent 76%, rgba(183, 237, 42, 0.1));
opacity: 0;
transition: opacity 180ms ease;
}
@@ -559,7 +687,7 @@ a {
.route-row em {
border: 1px solid rgba(255, 255, 255, 0.09);
border-radius: 999px;
background: rgba(0, 0, 0, 0.14);
background: rgba(12, 34, 28, 0.06);
padding: 5px 8px;
white-space: nowrap;
}
@@ -568,11 +696,11 @@ a {
min-height: 58px;
border-color: rgba(215, 255, 77, 0.34);
background:
linear-gradient(90deg, rgba(215, 255, 77, 0.13), rgba(255, 255, 255, 0.045) 42%, rgba(139, 246, 255, 0.045)),
rgba(255, 255, 255, 0.045);
linear-gradient(90deg, rgba(183, 237, 42, 0.22), rgba(255, 255, 255, 0.74) 42%, rgba(24, 185, 199, 0.1)),
rgba(255, 255, 255, 0.76);
box-shadow:
inset 0 1px 0 rgba(255, 255, 255, 0.13),
0 18px 44px rgba(0, 0, 0, 0.18);
inset 0 1px 0 rgba(255, 255, 255, 0.88),
0 18px 44px rgba(18, 48, 38, 0.12);
}
.route-row[data-featured="true"]::after {
@@ -587,8 +715,8 @@ a {
.route-row[data-featured="true"] em {
border-color: rgba(215, 255, 77, 0.22);
background: rgba(215, 255, 77, 0.09);
color: rgba(248, 255, 244, 0.88);
background: rgba(183, 237, 42, 0.16);
color: rgba(9, 23, 19, 0.82);
}
.route-row[data-tone="hot"] span {
@@ -698,7 +826,7 @@ a {
opacity: 0.28;
pointer-events: none;
mask-image: linear-gradient(115deg, transparent 0%, black 22%, black 58%, transparent 88%);
mix-blend-mode: screen;
mix-blend-mode: multiply;
}
.flow-line {
@@ -727,7 +855,7 @@ a {
}
.node {
fill: rgba(255, 255, 255, 0.025);
fill: rgba(255, 255, 255, 0.42);
stroke: rgba(215, 255, 77, 0.13);
}
@@ -800,8 +928,8 @@ a {
border: 1px solid var(--line);
border-radius: var(--radius);
background:
linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
rgba(255, 255, 255, 0.025);
linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(250, 255, 245, 0.72)),
rgba(255, 255, 255, 0.76);
padding: 20px;
}
@@ -864,10 +992,10 @@ a {
.module-strip span:hover {
transform: translateY(-3px);
border-color: var(--line-strong);
background-color: rgba(255, 255, 255, 0.045);
background-color: rgba(255, 255, 255, 0.88);
box-shadow:
inset 0 1px 0 rgba(255, 255, 255, 0.1),
0 22px 54px rgba(0, 0, 0, 0.2);
inset 0 1px 0 rgba(255, 255, 255, 0.92),
0 22px 54px rgba(18, 48, 38, 0.13);
}
.api-section {
@@ -888,9 +1016,9 @@ a {
border: 1px solid var(--line);
border-radius: 32px;
background:
linear-gradient(180deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.022)),
rgba(255, 255, 255, 0.025);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(250, 255, 245, 0.7)),
rgba(255, 255, 255, 0.76);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.studio-copy {
@@ -947,8 +1075,8 @@ a {
border-radius: 24px;
padding: 20px;
background:
linear-gradient(135deg, rgba(215, 255, 77, 0.08), transparent 34%),
rgba(255, 255, 255, 0.026);
linear-gradient(135deg, rgba(183, 237, 42, 0.13), transparent 34%),
rgba(255, 255, 255, 0.74);
}
.endpoint-line {
@@ -970,7 +1098,7 @@ a {
.endpoint-line code {
min-width: 0;
overflow: hidden;
color: var(--ice);
color: var(--text);
font-family: var(--font-geist-mono), monospace;
font-size: 13px;
text-overflow: ellipsis;
@@ -999,9 +1127,9 @@ a {
border: 1px solid var(--line);
border-radius: 32px;
background:
linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025)),
rgba(255, 255, 255, 0.025);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(250, 255, 245, 0.72)),
rgba(255, 255, 255, 0.76);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.factory-section,
@@ -1059,8 +1187,8 @@ a {
grid-column: 1 / -1;
min-height: 156px;
background:
radial-gradient(circle at 80% 0%, rgba(215, 255, 77, 0.18), transparent 36%),
rgba(255, 255, 255, 0.04);
radial-gradient(circle at 80% 0%, rgba(183, 237, 42, 0.22), transparent 36%),
rgba(255, 255, 255, 0.78);
}
.ops-section {
@@ -1075,9 +1203,9 @@ a {
border: 1px solid var(--line);
border-radius: 32px;
background:
linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025)),
rgba(255, 255, 255, 0.025);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(250, 255, 245, 0.72)),
rgba(255, 255, 255, 0.76);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.ops-copy {
@@ -1142,7 +1270,7 @@ a {
gap: 16px;
border: 1px solid var(--line);
border-radius: 22px;
background: rgba(255, 255, 255, 0.03);
background: rgba(255, 255, 255, 0.68);
padding: 20px;
}
@@ -1169,7 +1297,7 @@ a {
.module-strip span {
border: 1px solid var(--line);
border-radius: 999px;
background: rgba(255, 255, 255, 0.035);
background: rgba(255, 255, 255, 0.7);
color: var(--muted);
padding: 12px 16px;
font-size: 13px;
@@ -1377,6 +1505,27 @@ a {
}
}
@keyframes boot-screen-fallback {
0%,
72% {
opacity: 1;
visibility: visible;
}
100% {
opacity: 0;
visibility: hidden;
}
}
@keyframes boot-rule-fallback {
from {
transform: scaleX(0);
}
to {
transform: scaleX(1);
}
}
@keyframes pulse-dot {
0% {
box-shadow: 0 0 0 0 rgba(215, 255, 77, 0.55);
+2 -2
View File
@@ -35,8 +35,8 @@ export const metadata: Metadata = {
export const viewport: Viewport = {
width: "device-width",
initialScale: 1,
colorScheme: "dark",
themeColor: "#07110f",
colorScheme: "light",
themeColor: "#f7fbf2",
};
export default function RootLayout({
+33
View File
@@ -139,6 +139,38 @@ const controlSignals = [
"工作空间归档",
];
const bootLines = [
"初始化统一模型网关",
"加载 Claude Messages 与 OpenAI 兼容入口",
"同步 Comfy Cloud / RunningHub 工作流后端",
"准备日志、计费和工作空间归档",
];
function BootScreen() {
return (
<div className="boot-screen" aria-hidden="true">
<div className="boot-frame">
<div className="boot-brand">
<span className="boot-mark" />
<strong>BossAI</strong>
</div>
<div className="boot-rule" />
<div className="boot-lines">
{bootLines.map((line) => (
<p key={line}>
<span />
{line}
</p>
))}
</div>
<div className="boot-progress">
<span />
</div>
</div>
</div>
);
}
function FlowGlyph() {
return (
<svg className="flow-glyph" viewBox="0 0 520 360" aria-hidden="true">
@@ -233,6 +265,7 @@ export default function Home() {
return (
<BossAiMotion>
<main className="site-shell">
<BootScreen />
<div className="site-noise" aria-hidden="true" />
<header className="site-nav" data-motion="nav">
<Link className="brand-mark" href="/" aria-label="BossAI 首页">