diff --git a/app/globals.css b/app/globals.css index 5b03fa1..e7fe19a 100644 --- a/app/globals.css +++ b/app/globals.css @@ -1,8 +1,8 @@ @import "tailwindcss"; :root { - --background: #f8f7fc; - --foreground: #171717; + --background: #0a0e17; + --foreground: #f1f5f9; --safe-top: env(safe-area-inset-top, 0px); --safe-bottom: env(safe-area-inset-bottom, 0px); } @@ -10,13 +10,14 @@ @theme inline { --color-background: var(--background); --color-foreground: var(--foreground); - --font-sans: var(--font-geist-sans), ui-sans-serif, system-ui, "PingFang SC", - "Microsoft YaHei", sans-serif; - --font-mono: var(--font-geist-mono), ui-monospace, monospace; + --font-sans: var(--font-outfit), var(--font-noto-sc), ui-sans-serif, + system-ui, "PingFang SC", "Microsoft YaHei", sans-serif; + --font-mono: ui-monospace, monospace; } html { height: 100%; + scroll-behavior: smooth; } body { diff --git a/app/hub.css b/app/hub.css new file mode 100644 index 0000000..bc63d5a --- /dev/null +++ b/app/hub.css @@ -0,0 +1,613 @@ +/* nomadHub homepage — PC + H5 */ +.hub-root { + --hub-bg: #0a0e17; + --hub-bg-card: rgba(17, 24, 39, 0.7); + --hub-bg-glass: rgba(255, 255, 255, 0.05); + --hub-text: #f1f5f9; + --hub-accent-1: #ff6b6b; + --hub-accent-2: #ffe66d; + --hub-accent-3: #4ecdc4; + --hub-gradient-text: linear-gradient(135deg, #ff6b6b 0%, #ffe66d 50%, #4ecdc4 100%); + --hub-shadow-glow: 0 0 40px rgba(78, 205, 196, 0.15); + --hub-shadow-card: 0 8px 32px rgba(0, 0, 0, 0.3); + --hub-border: 1px solid rgba(255, 255, 255, 0.08); + --hub-radius-md: 16px; + --hub-font-display: var(--font-outfit), var(--font-noto-sc), sans-serif; + --hub-font-body: var(--font-noto-sc), var(--font-outfit), sans-serif; + --hub-nav-height: 72px; + --hub-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1); + + position: relative; + min-height: 100dvh; + font-family: var(--hub-font-body); + background: var(--hub-bg); + color: var(--hub-text); + line-height: 1.6; + overflow-x: hidden; +} + +.hub-root a { + color: inherit; + text-decoration: none; +} + +.hub-particle-canvas { + position: fixed; + inset: 0; + z-index: 0; + pointer-events: none; +} + +/* Loader */ +.hub-loader { + position: fixed; + inset: 0; + z-index: 9999; + display: grid; + place-items: center; + background: #0a0e17; + transition: opacity 0.6s ease, visibility 0.6s; +} + +.hub-loader.hidden { + opacity: 0; + visibility: hidden; + pointer-events: none; +} + +.hub-loader-inner { + text-align: center; +} + +.hub-loader-globe { + width: 64px; + height: 64px; + margin: 0 auto 12px; +} + +.hub-loader-ring { + transform-origin: center; + animation: hub-spin 1.1s linear infinite; +} + +@keyframes hub-spin { + to { + transform: rotate(360deg); + } +} + +.hub-loader-text { + font-family: var(--hub-font-display); + font-weight: 700; + background: var(--hub-gradient-text); + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; + background-clip: text; +} + +/* Nav */ +.hub-navbar { + position: fixed; + top: 0; + left: 0; + right: 0; + height: var(--hub-nav-height); + z-index: 100; + transition: background var(--hub-transition), border-color var(--hub-transition); +} + +.hub-navbar.scrolled { + background: rgba(10, 14, 23, 0.85); + backdrop-filter: blur(20px); + border-bottom: var(--hub-border); +} + +.hub-nav-container { + width: min(1200px, calc(100% - clamp(2rem, 6vw, 5rem))); + margin: 0 auto; + height: 100%; + display: flex; + align-items: center; + justify-content: space-between; +} + +.hub-logo { + display: flex; + align-items: center; + gap: 10px; + font-family: var(--hub-font-display); + font-weight: 700; + font-size: 1.2rem; +} + +.hub-logo-icon { + width: 34px; + height: 34px; + animation: hub-spin 20s linear infinite; +} + +/* Hero */ +.hub-hero { + position: relative; + z-index: 1; + width: 100%; + min-height: 100svh; + overflow: hidden; +} + +.hub-hero-bg-shapes { + position: absolute; + inset: 0; + pointer-events: none; + z-index: 0; +} + +.hub-hero-bg-shapes .hub-shape { + position: absolute; + border-radius: 50%; + filter: blur(90px); + opacity: 0.45; + animation: hub-float-shape 8s ease-in-out infinite; +} + +.hub-shape-1 { + width: min(52vw, 620px); + height: min(52vw, 620px); + background: var(--hub-accent-1); + top: -8%; + left: -8%; +} + +.hub-shape-2 { + width: min(46vw, 560px); + height: min(46vw, 560px); + background: var(--hub-accent-3); + top: 28%; + right: -10%; + animation-delay: -3s; +} + +.hub-shape-3 { + width: min(38vw, 480px); + height: min(38vw, 480px); + background: var(--hub-accent-2); + bottom: -12%; + left: 32%; + animation-delay: -5s; +} + +@keyframes hub-float-shape { + 0%, + 100% { + transform: translate(0, 0) scale(1); + } + 33% { + transform: translate(24px, -24px) scale(1.05); + } + 66% { + transform: translate(-16px, 16px) scale(0.96); + } +} + +.hub-hero-inner { + position: relative; + z-index: 1; + width: min(1200px, calc(100% - clamp(2rem, 6vw, 5rem))); + margin: 0 auto; + min-height: 100svh; + display: grid; + grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); + grid-template-areas: + "title visual" + "portals visual"; + align-content: center; + align-items: center; + column-gap: clamp(1.5rem, 4vw, 3.5rem); + row-gap: 1.75rem; + padding: calc(var(--hub-nav-height) + clamp(1.5rem, 4vh, 2.5rem)) 0 + clamp(2rem, 5vh, 3.5rem); +} + +.hub-hero-title { + grid-area: title; + align-self: end; + font-family: var(--hub-font-display); + font-size: clamp(2.4rem, 5vw, 3.8rem); + font-weight: 800; + line-height: 1.15; + letter-spacing: -0.02em; +} + +.hub-hero-visual { + grid-area: visual; + position: relative; + z-index: 1; + display: flex; + justify-content: center; + align-items: center; + min-width: 0; + padding: clamp(0.75rem, 2vw, 1.5rem); + align-self: center; +} + +.hub-portal-grid { + grid-area: portals; + align-self: start; + display: grid; + grid-template-columns: repeat(3, 1fr); + gap: 12px; + max-width: 520px; + margin-top: 0; +} + +.hub-gradient-text { + background: var(--hub-gradient-text); + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; + background-clip: text; + background-size: 200% auto; + animation: hub-gradient-shift 4s ease-in-out infinite; +} + +@keyframes hub-gradient-shift { + 0%, + 100% { + background-position: 0% center; + } + 50% { + background-position: 100% center; + } +} + +.hub-portal-card { + display: flex; + flex-direction: column; + align-items: flex-start; + gap: 14px; + padding: 20px 16px; + background: var(--hub-bg-card); + border: var(--hub-border); + border-radius: var(--hub-radius-md); + backdrop-filter: blur(18px); + box-shadow: var(--hub-shadow-card); + transition: transform var(--hub-transition), box-shadow var(--hub-transition), + border-color var(--hub-transition); +} + +.hub-portal-card:hover { + transform: translateY(-4px); + box-shadow: var(--hub-shadow-glow), var(--hub-shadow-card); + border-color: rgba(78, 205, 196, 0.35); +} + +.hub-portal-card--main { + background: linear-gradient( + 160deg, + rgba(255, 107, 107, 0.12), + rgba(78, 205, 196, 0.08) + ), + var(--hub-bg-card); + border-color: rgba(255, 107, 107, 0.22); +} + +.hub-portal-ico { + width: 40px; + height: 40px; + display: grid; + place-items: center; + border-radius: 12px; + background: var(--hub-bg-glass); + border: var(--hub-border); + font-size: 1.15rem; +} + +.hub-portal-name { + font-family: var(--hub-font-display); + font-size: clamp(0.92rem, 1.4vw, 1.05rem); + font-weight: 800; + letter-spacing: -0.02em; + line-height: 1.25; + white-space: nowrap; +} + +.hub-portal-card--main .hub-portal-name { + background: var(--hub-gradient-text); + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; + background-clip: text; +} + +.hub-globe-container { + position: relative; + width: min(100%, 440px); + aspect-ratio: 1; + margin-inline: auto; +} + +.hub-globe-svg { + display: block; + width: 100%; + height: 100%; + overflow: visible; + animation: hub-globe-float 6s ease-in-out infinite; +} + +@keyframes hub-globe-float { + 0%, + 100% { + transform: translateY(0); + } + 50% { + transform: translateY(-12px); + } +} + +.hub-orbit-ring, +.hub-orbit-ring-2 { + transform-box: fill-box; + transform-origin: center; + animation: hub-orbit-spin 20s linear infinite; +} + +.hub-orbit-ring-2 { + animation-direction: reverse; + animation-duration: 15s; +} + +@keyframes hub-orbit-spin { + to { + transform: rotate(360deg); + } +} + +.hub-continent { + animation: hub-continent-pulse 4s ease-in-out infinite; +} + +@keyframes hub-continent-pulse { + 0%, + 100% { + opacity: 0.7; + } + 50% { + opacity: 1; + } +} + +.hub-pulse-dot { + animation: hub-dot-pulse 2s ease-in-out infinite; +} + +.hub-pulse-dot:nth-of-type(2) { + animation-delay: 0.5s; +} + +.hub-pulse-dot:nth-of-type(3) { + animation-delay: 1s; +} + +@keyframes hub-dot-pulse { + 0%, + 100% { + r: 5; + opacity: 1; + } + 50% { + r: 8; + opacity: 0.6; + } +} + +.hub-flight-path { + animation: hub-dash-move 3s linear infinite; +} + +@keyframes hub-dash-move { + to { + stroke-dashoffset: -20; + } +} + +.hub-float-card { + position: absolute; + z-index: 2; + padding: 10px 14px; + background: var(--hub-bg-card); + border: var(--hub-border); + border-radius: var(--hub-radius-md); + font-size: 0.8rem; + font-weight: 600; + backdrop-filter: blur(20px); + box-shadow: var(--hub-shadow-card); + animation: hub-card-float 4s ease-in-out infinite; + white-space: nowrap; + pointer-events: none; +} + +.hub-fc-1 { + top: 6%; + right: 0; +} + +.hub-fc-2 { + top: 58%; + left: 0; + animation-delay: -1.5s; +} + +.hub-fc-3 { + bottom: 4%; + right: 6%; + animation-delay: -3s; +} + +@keyframes hub-card-float { + 0%, + 100% { + transform: translateY(0); + } + 50% { + transform: translateY(-8px); + } +} + +.hub-reveal { + opacity: 0; + transform: translateY(24px); + transition: opacity 0.8s ease, transform 0.8s ease; +} + +.hub-reveal.visible { + opacity: 1; + transform: none; +} + +/* Tablet / H5 */ +@media (max-width: 960px) { + .hub-hero-inner { + grid-template-columns: 1fr; + grid-template-areas: + "visual" + "title" + "portals"; + align-content: start; + justify-items: stretch; + min-height: 100svh; + gap: 0.85rem; + padding-top: calc(var(--hub-nav-height) + 0.85rem); + padding-bottom: max(1.5rem, env(safe-area-inset-bottom)); + } + + .hub-hero-title { + align-self: start; + text-align: center; + font-size: clamp(2.35rem, 11vw, 3.2rem); + letter-spacing: -0.04em; + } + + .hub-hero-visual { + width: 100%; + padding: 0.25rem 0.5rem 0.5rem; + } + + .hub-globe-container { + width: min(62vw, 300px); + } + + .hub-portal-grid { + max-width: none; + width: 100%; + margin-top: 0.35rem; + } + + .hub-fc-1 { + right: -2%; + font-size: 0.72rem; + padding: 8px 10px; + } + + .hub-fc-2 { + left: -2%; + font-size: 0.72rem; + padding: 8px 10px; + } + + .hub-fc-3 { + font-size: 0.72rem; + padding: 8px 10px; + } +} + +@media (max-width: 640px) { + .hub-hero-inner { + min-height: 100svh; + gap: 0.65rem; + padding-top: calc(var(--hub-nav-height) + 0.65rem); + } + + .hub-hero-title { + font-size: clamp(2.2rem, 10.5vw, 2.85rem); + } + + .hub-globe-container { + width: min(64vw, 250px); + } + + .hub-globe-svg { + animation-duration: 7s; + } + + .hub-portal-grid { + gap: 8px; + } + + .hub-portal-card { + padding: 14px 10px; + gap: 10px; + align-items: center; + text-align: center; + } + + .hub-portal-ico { + width: 32px; + height: 32px; + font-size: 0.95rem; + } + + .hub-portal-name { + font-size: 0.78rem; + letter-spacing: -0.03em; + } + + .hub-fc-1 { + top: 4%; + right: 0; + } + + .hub-fc-2 { + top: 54%; + left: 0; + } + + .hub-fc-3 { + bottom: 2%; + right: 2%; + } +} + +@media (max-width: 380px) { + .hub-portal-grid { + gap: 6px; + } + + .hub-portal-card { + padding: 12px 6px; + } + + .hub-portal-name { + font-size: 0.7rem; + } +} + +@media (prefers-reduced-motion: reduce) { + .hub-reveal { + opacity: 1; + transform: none; + transition: none; + } + + .hub-loader { + display: none; + } + + .hub-globe-svg, + .hub-orbit-ring, + .hub-orbit-ring-2, + .hub-float-card, + .hub-continent, + .hub-pulse-dot, + .hub-flight-path, + .hub-logo-icon { + animation: none !important; + } +} diff --git a/app/layout.tsx b/app/layout.tsx index 98d8ee0..6e73330 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -1,7 +1,8 @@ import "./globals.css"; +import "./hub.css"; import { type Metadata, type Viewport } from "next"; -import { Geist, Geist_Mono } from "next/font/google"; +import { Noto_Sans_SC, Outfit } from "next/font/google"; import { LocaleProvider } from "~/components/locale-provider"; import { UmamiAnalytics } from "~/components/umami-analytics"; @@ -10,50 +11,53 @@ export const viewport: Viewport = { initialScale: 1, maximumScale: 5, viewportFit: "cover", - themeColor: "#f8f7fc", + themeColor: "#0a0e17", }; export const metadata: Metadata = { metadataBase: new URL("https://nomadro.com"), - title: "Nomadro | 中文数字游民操作系统", - description: - "从城市探索到远程收入,从 AI 自动化到直播变现。游民导航、地理套利、直播工具箱,一站开启你的自由生活。", + title: "nomadro", + description: "数字游民入口 · 出海导航 · 数字游民小册 · 旅居社群", keywords: [ "数字游民", "远程工作", "旅居", "自由职业", - "直播工具箱", - "地理套利", - "学习路径", - "会员社区", + "出海导航", + "旅居社群", ], openGraph: { - title: "Nomadro | 中文数字游民操作系统", - description: - "从城市探索到远程收入,从 AI 自动化到直播变现,一站开启你的自由生活。", + title: "nomadro", + description: "随处工作,自由生活。出海导航 · 数字游民小册 · 旅居社群", type: "website", - url: "https://nomadro.live", + url: "https://nomadro.com", }, icons: [{ rel: "icon", url: "/favicon.ico" }], }; -const geist = Geist({ +const outfit = Outfit({ subsets: ["latin"], - variable: "--font-geist-sans", + weight: ["400", "500", "600", "700", "800"], + variable: "--font-outfit", + display: "swap", }); -const geistMono = Geist_Mono({ +const notoSansSC = Noto_Sans_SC({ subsets: ["latin"], - variable: "--font-geist-mono", + weight: ["300", "400", "500", "700"], + variable: "--font-noto-sc", + display: "swap", }); export default function RootLayout({ children, }: Readonly<{ children: React.ReactNode }>) { return ( - - + + {children} diff --git a/app/page.tsx b/app/page.tsx index ab7fb05..553c617 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -2,27 +2,12 @@ import { Hero } from "~/components/sections/hero"; import { LanguageSwitcher } from "~/components/language-switcher"; -import { useLocale } from "~/components/locale-provider"; export default function HomePage() { - const { t } = useLocale(); - const year = new Date().getFullYear(); - return ( -
- -
- -
-
- {t.copyright.replace("{year}", String(year))} -
-
+ <> + + + ); } diff --git a/components/language-switcher.tsx b/components/language-switcher.tsx index 9e7d6a3..0ecb085 100644 --- a/components/language-switcher.tsx +++ b/components/language-switcher.tsx @@ -67,13 +67,13 @@ export function LanguageSwitcher({ className = "" }: { className?: string }) { /> {visible ? ( -