Redesign landing page and add Caddy deployment for nomadro.com
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,109 +1,97 @@
|
||||
"use client";
|
||||
|
||||
import Link from "next/link";
|
||||
import { MapPin, Zap, Users, ArrowRight } from "lucide-react";
|
||||
import { motion } from "framer-motion";
|
||||
import { ChevronRight } from "lucide-react";
|
||||
import { ENTRY_CARDS } from "~/lib/data";
|
||||
import { Particles } from "~/components/ui/particles";
|
||||
|
||||
const ICON_MAP = {
|
||||
MapPin,
|
||||
Zap,
|
||||
Users,
|
||||
} as const;
|
||||
|
||||
const ACCENT_STYLES = {
|
||||
blue: "from-blue-500/20 to-cyan-500/10 border-blue-300/80 hover:border-blue-400 hover:shadow-2xl",
|
||||
emerald: "from-emerald-500/20 to-teal-500/10 border-emerald-300/80 hover:border-emerald-400 hover:shadow-2xl",
|
||||
amber: "from-amber-500/20 to-orange-500/10 border-amber-300/80 hover:border-amber-400 hover:shadow-2xl",
|
||||
} as const;
|
||||
|
||||
const CARD_EMOJI = {
|
||||
nav: "🧭",
|
||||
arbitrage: "⚡",
|
||||
salon: "🎯",
|
||||
} as const;
|
||||
|
||||
const ICON_COLORS = {
|
||||
blue: "text-blue-600",
|
||||
emerald: "text-emerald-600",
|
||||
amber: "text-amber-600",
|
||||
const CARD_STYLE = {
|
||||
blue: {
|
||||
border: "border-blue-200/80",
|
||||
bar: "bg-blue-500",
|
||||
emoji: "bg-blue-50",
|
||||
},
|
||||
emerald: {
|
||||
border: "border-emerald-200/80",
|
||||
bar: "bg-emerald-500",
|
||||
emoji: "bg-emerald-50",
|
||||
},
|
||||
rose: {
|
||||
border: "border-rose-200/80",
|
||||
bar: "bg-rose-500",
|
||||
emoji: "bg-rose-50",
|
||||
},
|
||||
} as const;
|
||||
|
||||
export function Hero() {
|
||||
return (
|
||||
<section className="relative min-h-[100dvh] overflow-hidden bg-gradient-to-br from-violet-50 via-white to-cyan-50">
|
||||
<Particles />
|
||||
<div
|
||||
className="pointer-events-none absolute inset-0 opacity-30"
|
||||
style={{
|
||||
backgroundImage: `radial-gradient(circle at 20% 80%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
|
||||
radial-gradient(circle at 80% 20%, rgba(6, 182, 212, 0.15) 0%, transparent 50%)`,
|
||||
}}
|
||||
/>
|
||||
<div className="container relative mx-auto flex min-h-[100dvh] flex-col justify-center px-3 py-6 sm:px-4 sm:py-8 md:px-6 md:py-16 lg:py-24">
|
||||
<div className="mx-auto max-w-4xl text-center">
|
||||
<motion.div
|
||||
initial={{ opacity: 0, y: 16 }}
|
||||
animate={{ opacity: 1, y: 0 }}
|
||||
transition={{ delay: 0.1, duration: 0.5 }}
|
||||
>
|
||||
<h1 className="text-2xl font-bold tracking-tight sm:text-4xl md:text-5xl lg:text-6xl">
|
||||
<span className="bg-gradient-to-r from-violet-600 via-fuchsia-500 to-cyan-600 bg-clip-text text-transparent">
|
||||
数字游民
|
||||
</span>{" "}
|
||||
<span className="text-neutral-800">nomadro</span>
|
||||
</h1>
|
||||
</motion.div>
|
||||
<section
|
||||
className="flex flex-1 flex-col justify-center px-5 pb-8"
|
||||
style={{
|
||||
paddingTop: "max(2rem, calc(1.5rem + var(--safe-top)))",
|
||||
paddingBottom: "max(2rem, calc(1.5rem + var(--safe-bottom)))",
|
||||
}}
|
||||
>
|
||||
<div className="mx-auto w-full max-w-md sm:max-w-lg">
|
||||
{/* 标题 */}
|
||||
<div className="text-center">
|
||||
<h1 className="text-[2rem] font-bold leading-tight sm:text-5xl">
|
||||
<span className="text-gradient">数字游民</span>
|
||||
</h1>
|
||||
<p className="mt-2 text-lg font-medium tracking-[0.2em] text-neutral-400 sm:text-xl">
|
||||
nomadro
|
||||
</p>
|
||||
<p className="mx-auto mt-4 max-w-xs text-[13px] leading-relaxed text-neutral-500 sm:max-w-sm sm:text-sm">
|
||||
游民导航 · 地理套利 · 直播工具箱
|
||||
<br />
|
||||
一站开启自由生活
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<motion.div
|
||||
initial={{ opacity: 0, y: 24 }}
|
||||
animate={{ opacity: 1, y: 0 }}
|
||||
transition={{ delay: 0.3, duration: 0.5 }}
|
||||
className="mt-6 flex flex-col gap-3 sm:mt-8 sm:gap-4 lg:mt-12 lg:grid lg:grid-cols-3 lg:gap-6"
|
||||
>
|
||||
{ENTRY_CARDS.map((card, i) => {
|
||||
const Icon = ICON_MAP[card.icon];
|
||||
const accent = ACCENT_STYLES[card.accent];
|
||||
const emoji = CARD_EMOJI[card.id];
|
||||
const iconColor = ICON_COLORS[card.accent];
|
||||
return (
|
||||
<motion.div
|
||||
key={card.id}
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
animate={{ opacity: 1, y: 0 }}
|
||||
transition={{ delay: 0.4 + i * 0.1, duration: 0.4 }}
|
||||
whileHover={{ scale: 1.01, y: -2 }}
|
||||
{/* 入口卡片 */}
|
||||
<div className="mt-10 flex flex-col gap-3">
|
||||
{ENTRY_CARDS.map((card) => {
|
||||
const style = CARD_STYLE[card.accent];
|
||||
return (
|
||||
<Link
|
||||
key={card.id}
|
||||
href={card.href}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className={`group relative flex items-center gap-3.5 overflow-hidden rounded-2xl border bg-white p-4 shadow-sm transition-all active:scale-[0.98] active:shadow-none sm:gap-4 sm:p-5 ${style.border}`}
|
||||
>
|
||||
<span
|
||||
className={`absolute left-0 top-0 h-full w-1 ${style.bar}`}
|
||||
/>
|
||||
|
||||
<span
|
||||
className={`flex h-12 w-12 shrink-0 items-center justify-center rounded-xl text-2xl ${style.emoji}`}
|
||||
>
|
||||
<Link
|
||||
href={card.href}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className={`group relative flex items-center gap-4 overflow-hidden rounded-2xl border-2 bg-gradient-to-br p-4 transition-all duration-300 active:scale-[0.99] lg:flex-col lg:items-stretch lg:gap-0 lg:p-6 ${accent}`}
|
||||
>
|
||||
<div className="absolute -right-6 -top-6 text-5xl opacity-20 transition-transform group-hover:scale-110 group-hover:opacity-30 sm:-right-8 sm:-top-8 sm:text-6xl">
|
||||
{emoji}
|
||||
</div>
|
||||
<div className={`relative flex h-11 w-11 shrink-0 items-center justify-center self-start rounded-xl bg-white/80 shadow-sm lg:h-12 lg:w-12 ${iconColor}`}>
|
||||
<Icon className="h-5 w-5 group-hover:scale-110 transition-transform lg:h-6 lg:w-6" />
|
||||
</div>
|
||||
<div className="relative min-w-0 flex-1 lg:mt-4">
|
||||
<h2 className="text-base font-bold text-neutral-900 lg:text-xl">
|
||||
{card.label}
|
||||
</h2>
|
||||
<p className="mt-0.5 text-sm text-neutral-600">
|
||||
{card.title}
|
||||
</p>
|
||||
<p className="mt-1 hidden text-xs text-neutral-500 lg:block">
|
||||
{card.description}
|
||||
</p>
|
||||
</div>
|
||||
<ArrowRight className="relative h-5 w-5 shrink-0 text-neutral-400 transition-all group-hover:translate-x-1 group-hover:text-violet-500 lg:absolute lg:right-4 lg:top-4" />
|
||||
</Link>
|
||||
</motion.div>
|
||||
);
|
||||
})}
|
||||
</motion.div>
|
||||
{card.emoji}
|
||||
</span>
|
||||
|
||||
<div className="min-w-0 flex-1 pr-1">
|
||||
<div className="flex flex-wrap items-center gap-x-2 gap-y-0.5">
|
||||
<h2 className="text-[15px] font-semibold text-neutral-900 sm:text-base">
|
||||
{card.label}
|
||||
</h2>
|
||||
{card.id === "live" && (
|
||||
<span className="rounded bg-rose-500 px-1.5 py-px text-[10px] font-semibold leading-4 text-white">
|
||||
LIVE
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
<p className="mt-0.5 text-sm font-medium text-neutral-700">
|
||||
{card.title}
|
||||
</p>
|
||||
<p className="mt-1 line-clamp-2 text-xs leading-relaxed text-neutral-400">
|
||||
{card.description}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<ChevronRight className="h-5 w-5 shrink-0 text-neutral-300" />
|
||||
</Link>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user