's'
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
"use client";
|
||||
|
||||
import Link from "next/link";
|
||||
import { MapPin, BookOpen, Crown, ArrowRight } from "lucide-react";
|
||||
import { MapPin, BookOpen, Crown, Zap, Users, ArrowRight } from "lucide-react";
|
||||
import { motion } from "framer-motion";
|
||||
import { ENTRY_PATHS } from "~/lib/data";
|
||||
|
||||
@@ -9,25 +9,33 @@ const ICON_MAP = {
|
||||
MapPin,
|
||||
BookOpen,
|
||||
Crown,
|
||||
Zap,
|
||||
Users,
|
||||
} as const;
|
||||
|
||||
const ACCENT_STYLES = {
|
||||
blue: "border-l-blue-500/80 hover:border-l-blue-500",
|
||||
green: "border-l-emerald-500/80 hover:border-l-emerald-500",
|
||||
amber: "border-l-amber-500/80 hover:border-l-amber-500",
|
||||
blue: "border-l-4 border-l-blue-500 bg-gradient-to-r from-blue-50/80 to-white hover:from-blue-100/80",
|
||||
green: "border-l-4 border-l-emerald-500 bg-gradient-to-r from-emerald-50/80 to-white hover:from-emerald-100/80",
|
||||
amber: "border-l-4 border-l-amber-500 bg-gradient-to-r from-amber-50/80 to-white hover:from-amber-100/80",
|
||||
} as const;
|
||||
|
||||
const CARD_EMOJI: Record<string, string> = {
|
||||
nav: "🧭",
|
||||
arbitrage: "⚡",
|
||||
salon: "🎯",
|
||||
};
|
||||
|
||||
export function EntryGrid() {
|
||||
return (
|
||||
<section className="bg-white py-16 md:py-24">
|
||||
<section className="bg-gradient-to-b from-violet-50/30 to-white py-20 md:py-28">
|
||||
<div className="container mx-auto px-4 md:px-6">
|
||||
<motion.h2
|
||||
initial={{ opacity: 0, y: 12 }}
|
||||
whileInView={{ opacity: 1, y: 0 }}
|
||||
viewport={{ once: true, margin: "-80px" }}
|
||||
className="text-center text-2xl font-semibold text-neutral-900 md:text-3xl"
|
||||
className="text-center text-2xl font-bold text-neutral-900 md:text-3xl"
|
||||
>
|
||||
选择你的入口
|
||||
🚀 选择你的入口
|
||||
</motion.h2>
|
||||
<motion.p
|
||||
initial={{ opacity: 0 }}
|
||||
@@ -38,10 +46,11 @@ export function EntryGrid() {
|
||||
三大路径,对应不同的需求和阶段
|
||||
</motion.p>
|
||||
|
||||
<div className="mt-12 grid gap-6 md:grid-cols-3">
|
||||
<div className="mt-14 grid gap-6 md:grid-cols-3">
|
||||
{ENTRY_PATHS.map((path, i) => {
|
||||
const Icon = ICON_MAP[path.icon];
|
||||
const Icon = ICON_MAP[path.icon as keyof typeof ICON_MAP] ?? MapPin;
|
||||
const accent = ACCENT_STYLES[path.accent];
|
||||
const emoji = CARD_EMOJI[path.id] ?? "✨";
|
||||
return (
|
||||
<motion.div
|
||||
key={path.id}
|
||||
@@ -49,23 +58,25 @@ export function EntryGrid() {
|
||||
whileInView={{ opacity: 1, y: 0 }}
|
||||
viewport={{ once: true, margin: "-40px" }}
|
||||
transition={{ delay: i * 0.08 }}
|
||||
whileHover={{ y: -4 }}
|
||||
>
|
||||
<Link
|
||||
href={path.href}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className={`group block rounded-xl border border-neutral-200 bg-white p-6 transition-all hover:-translate-y-1 hover:shadow-lg ${accent} border-l-4`}
|
||||
className={`group block rounded-2xl border border-neutral-200/80 p-6 transition-all hover:shadow-xl ${accent}`}
|
||||
>
|
||||
<Icon className="h-10 w-10 text-neutral-600" />
|
||||
<h3 className="mt-4 text-lg font-semibold text-neutral-900">
|
||||
<span className="text-2xl">{emoji}</span>
|
||||
<Icon className="mt-3 h-10 w-10 text-neutral-600 transition-transform group-hover:scale-110" />
|
||||
<h3 className="mt-4 text-lg font-bold text-neutral-900">
|
||||
{path.title}
|
||||
</h3>
|
||||
<p className="mt-2 text-sm text-neutral-600">
|
||||
{path.description}
|
||||
</p>
|
||||
<span className="mt-4 inline-flex items-center gap-1 text-sm font-medium text-neutral-700 group-hover:text-neutral-900">
|
||||
<span className="mt-4 inline-flex items-center gap-1 text-sm font-semibold text-neutral-700 group-hover:text-neutral-900">
|
||||
{path.cta}
|
||||
<ArrowRight className="h-4 w-4 transition-transform group-hover:translate-x-1" />
|
||||
<ArrowRight className="h-4 w-4 transition-transform group-hover:translate-x-2" />
|
||||
</span>
|
||||
</Link>
|
||||
</motion.div>
|
||||
|
||||
Reference in New Issue
Block a user