refact: update ui
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { useState } from 'react';
|
||||
import { Mail, Users, Send } from 'lucide-react';
|
||||
import { Mail, Users, Send, ArrowUpRight } from 'lucide-react';
|
||||
import { useLanguage } from '../../contexts/LanguageContext';
|
||||
|
||||
export default function ContactSection() {
|
||||
@@ -10,7 +10,6 @@ export default function ContactSection() {
|
||||
const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {
|
||||
e.preventDefault();
|
||||
setStatus('sending');
|
||||
// Simulate send — replace with actual API call later
|
||||
setTimeout(() => {
|
||||
setStatus('sent');
|
||||
setTimeout(() => setStatus('idle'), 3000);
|
||||
@@ -19,75 +18,77 @@ export default function ContactSection() {
|
||||
};
|
||||
|
||||
return (
|
||||
<section id="contact" className="py-20 bg-gray-50">
|
||||
<div className="max-w-6xl mx-auto px-6">
|
||||
<section id="contact" className="section-padding relative" style={{ backgroundColor: 'var(--color-bg)' }}>
|
||||
<div className="max-w-6xl mx-auto">
|
||||
<div className="text-center mb-16">
|
||||
<h2 className="text-3xl font-bold text-gray-900 mb-4">{c.title}</h2>
|
||||
<p className="text-gray-600 text-lg">{c.subtitle}</p>
|
||||
<h2 className="font-display text-3xl lg:text-4xl font-bold text-ink mb-4 tracking-tight">{c.title}</h2>
|
||||
<p className="text-ink-secondary text-lg">{c.subtitle}</p>
|
||||
</div>
|
||||
|
||||
<div className="grid md:grid-cols-2 gap-12 max-w-4xl mx-auto">
|
||||
{/* Contact info */}
|
||||
<div className="space-y-6">
|
||||
<div className="flex items-start gap-4">
|
||||
<div className="w-10 h-10 bg-blue-100 rounded-lg flex items-center justify-center flex-shrink-0">
|
||||
<Mail size={20} className="text-blue-600" />
|
||||
<div className="grid md:grid-cols-5 gap-10 max-w-4xl mx-auto">
|
||||
{/* Contact info — 2 cols */}
|
||||
<div className="md:col-span-2 space-y-5">
|
||||
<a
|
||||
href="mailto:yogecoder@gmail.com"
|
||||
className="card p-5 flex items-start gap-4 group hover:border-coral-200 block"
|
||||
>
|
||||
<div className="w-10 h-10 bg-coral-50 rounded-xl flex items-center justify-center flex-shrink-0 group-hover:scale-110 transition-transform">
|
||||
<Mail size={18} className="text-coral-500" />
|
||||
</div>
|
||||
<div>
|
||||
<div className="text-sm text-gray-500 mb-1">{t.common.email}</div>
|
||||
<a href="mailto:yogecoder@gmail.com" className="text-gray-900 font-medium hover:text-blue-600 transition-colors">
|
||||
yogecoder@gmail.com
|
||||
</a>
|
||||
<div className="flex-1 min-w-0">
|
||||
<div className="text-xs text-ink-muted mb-1 font-medium">{t.common.email}</div>
|
||||
<div className="text-sm font-medium text-ink truncate">yogecoder@gmail.com</div>
|
||||
</div>
|
||||
</div>
|
||||
<ArrowUpRight size={14} className="text-ink-muted group-hover:text-coral-500 transition-colors mt-1" />
|
||||
</a>
|
||||
|
||||
<div className="flex items-start gap-4">
|
||||
<div className="w-10 h-10 bg-green-100 rounded-lg flex items-center justify-center flex-shrink-0">
|
||||
<Users size={20} className="text-green-600" />
|
||||
<div className="card p-5 flex items-start gap-4">
|
||||
<div className="w-10 h-10 bg-sage-50 rounded-xl flex items-center justify-center flex-shrink-0">
|
||||
<Users size={18} className="text-sage-600" />
|
||||
</div>
|
||||
<div>
|
||||
<div className="text-sm text-gray-500 mb-1">{c.qqGroup}</div>
|
||||
<span className="text-gray-900 font-medium">1018282100</span>
|
||||
<div className="text-xs text-ink-muted mb-1 font-medium">{c.qqGroup}</div>
|
||||
<span className="text-sm font-medium text-ink font-mono">1018282100</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Contact form */}
|
||||
<form onSubmit={handleSubmit} className="space-y-4">
|
||||
{/* Contact form — 3 cols */}
|
||||
<form onSubmit={handleSubmit} className="md:col-span-3 space-y-4">
|
||||
<div>
|
||||
<label className="block text-sm font-medium text-gray-700 mb-1">{c.nameLabel}</label>
|
||||
<label className="block text-sm font-medium text-ink mb-1.5">{c.nameLabel}</label>
|
||||
<input
|
||||
type="text"
|
||||
required
|
||||
className="w-full px-4 py-2.5 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent outline-none transition-shadow text-sm"
|
||||
className="w-full px-4 py-2.5 bg-white border border-cream-300 rounded-xl focus:ring-2 focus:ring-coral-200 focus:border-coral-400 outline-none transition-all text-sm"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<label className="block text-sm font-medium text-gray-700 mb-1">{c.emailLabel}</label>
|
||||
<label className="block text-sm font-medium text-ink mb-1.5">{c.emailLabel}</label>
|
||||
<input
|
||||
type="email"
|
||||
required
|
||||
className="w-full px-4 py-2.5 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent outline-none transition-shadow text-sm"
|
||||
className="w-full px-4 py-2.5 bg-white border border-cream-300 rounded-xl focus:ring-2 focus:ring-coral-200 focus:border-coral-400 outline-none transition-all text-sm"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<label className="block text-sm font-medium text-gray-700 mb-1">{c.messageLabel}</label>
|
||||
<label className="block text-sm font-medium text-ink mb-1.5">{c.messageLabel}</label>
|
||||
<textarea
|
||||
required
|
||||
rows={4}
|
||||
className="w-full px-4 py-2.5 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent outline-none transition-shadow text-sm resize-none"
|
||||
className="w-full px-4 py-2.5 bg-white border border-cream-300 rounded-xl focus:ring-2 focus:ring-coral-200 focus:border-coral-400 outline-none transition-all text-sm resize-none"
|
||||
/>
|
||||
</div>
|
||||
<button
|
||||
type="submit"
|
||||
disabled={status === 'sending'}
|
||||
className={`w-full py-3 rounded-lg text-sm font-semibold flex items-center justify-center gap-2 transition-colors ${
|
||||
className={`w-full py-3 rounded-xl text-sm font-semibold flex items-center justify-center gap-2 transition-all duration-200 ${
|
||||
status === 'sent'
|
||||
? 'bg-green-600 text-white'
|
||||
: 'bg-blue-600 hover:bg-blue-700 text-white'
|
||||
? 'bg-sage-500 text-white'
|
||||
: 'btn-primary justify-center'
|
||||
} disabled:opacity-60`}
|
||||
>
|
||||
<Send size={16} />
|
||||
<Send size={15} />
|
||||
{status === 'sending' ? c.sending : status === 'sent' ? c.sent : c.send}
|
||||
</button>
|
||||
</form>
|
||||
|
||||
@@ -2,6 +2,14 @@ import { PenTool, FileOutput, FileText, Layers, Zap, Gift } from 'lucide-react';
|
||||
import { useLanguage } from '../../contexts/LanguageContext';
|
||||
|
||||
const iconMap = [PenTool, FileOutput, FileText, Layers, Zap, Gift];
|
||||
const accentColors = [
|
||||
{ bg: 'bg-coral-50', icon: 'text-coral-500', border: 'hover:border-coral-200' },
|
||||
{ bg: 'bg-sage-50', icon: 'text-sage-600', border: 'hover:border-sage-200' },
|
||||
{ bg: 'bg-amber-50', icon: 'text-amber-600', border: 'hover:border-amber-200' },
|
||||
{ bg: 'bg-violet-50', icon: 'text-violet-500', border: 'hover:border-violet-200' },
|
||||
{ bg: 'bg-coral-50', icon: 'text-coral-500', border: 'hover:border-coral-200' },
|
||||
{ bg: 'bg-sage-50', icon: 'text-sage-600', border: 'hover:border-sage-200' },
|
||||
];
|
||||
|
||||
export default function FeaturesSection() {
|
||||
const { t } = useLanguage();
|
||||
@@ -17,23 +25,31 @@ export default function FeaturesSection() {
|
||||
];
|
||||
|
||||
return (
|
||||
<section id="features" className="py-20 bg-white">
|
||||
<div className="max-w-6xl mx-auto px-6">
|
||||
<div className="text-center mb-16">
|
||||
<h2 className="text-3xl font-bold text-gray-900 mb-4">{f.title}</h2>
|
||||
<p className="text-gray-600 text-lg">{f.subtitle}</p>
|
||||
<section id="features" className="section-padding bg-white relative">
|
||||
{/* Subtle top border accent */}
|
||||
<div className="absolute top-0 left-1/2 -translate-x-1/2 w-24 h-0.5 bg-gradient-to-r from-transparent via-coral-300 to-transparent" />
|
||||
|
||||
<div className="max-w-6xl mx-auto">
|
||||
<div className="max-w-2xl mb-16">
|
||||
<h2 className="font-display text-3xl lg:text-4xl font-bold text-ink mb-4 tracking-tight">{f.title}</h2>
|
||||
<p className="text-ink-secondary text-lg leading-relaxed">{f.subtitle}</p>
|
||||
</div>
|
||||
|
||||
<div className="grid md:grid-cols-2 lg:grid-cols-3 gap-8">
|
||||
<div className="grid md:grid-cols-2 lg:grid-cols-3 gap-5">
|
||||
{items.map((item, i) => {
|
||||
const Icon = iconMap[i];
|
||||
const color = accentColors[i];
|
||||
return (
|
||||
<div key={i} className="p-6 rounded-xl border border-gray-100 hover:border-blue-100 hover:shadow-lg transition-all group">
|
||||
<div className="w-12 h-12 bg-blue-50 group-hover:bg-blue-100 rounded-lg flex items-center justify-center mb-4 transition-colors">
|
||||
<Icon size={24} className="text-blue-600" />
|
||||
<div
|
||||
key={i}
|
||||
className={`card p-6 ${color.border} group`}
|
||||
style={{ opacity: 0, animationDelay: `${i * 80}ms` }}
|
||||
>
|
||||
<div className={`w-11 h-11 ${color.bg} rounded-xl flex items-center justify-center mb-4 transition-transform duration-200 group-hover:scale-110`}>
|
||||
<Icon size={20} className={color.icon} />
|
||||
</div>
|
||||
<h3 className="text-lg font-semibold text-gray-900 mb-2">{item.title}</h3>
|
||||
<p className="text-gray-600 text-sm leading-relaxed">{item.description}</p>
|
||||
<h3 className="font-display text-base font-semibold text-ink mb-2">{item.title}</h3>
|
||||
<p className="text-ink-secondary text-sm leading-relaxed">{item.description}</p>
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
|
||||
@@ -1,71 +1,121 @@
|
||||
import { Link } from 'react-router-dom';
|
||||
import { ArrowRight, Upload } from 'lucide-react';
|
||||
import { ArrowRight } from 'lucide-react';
|
||||
import { useLanguage } from '../../contexts/LanguageContext';
|
||||
|
||||
export default function HeroSection() {
|
||||
const { t } = useLanguage();
|
||||
const { t, language } = useLanguage();
|
||||
|
||||
return (
|
||||
<section className="relative overflow-hidden bg-gradient-to-br from-blue-50 via-white to-indigo-50 py-20 lg:py-32">
|
||||
<div className="max-w-6xl mx-auto px-6">
|
||||
<div className="grid lg:grid-cols-2 gap-12 items-center">
|
||||
{/* Left: Text */}
|
||||
<div>
|
||||
<h1 className="text-4xl lg:text-5xl font-bold text-gray-900 leading-tight mb-6">
|
||||
<section className="relative overflow-hidden min-h-[90vh] flex items-center">
|
||||
{/* Warm gradient background */}
|
||||
<div className="absolute inset-0 bg-gradient-to-br from-cream-100 via-cream-50 to-coral-50/30" />
|
||||
|
||||
{/* Decorative elements */}
|
||||
<div className="absolute top-20 right-[15%] w-72 h-72 bg-coral-200/20 rounded-full blur-3xl" />
|
||||
<div className="absolute bottom-20 left-[10%] w-56 h-56 bg-sage-200/20 rounded-full blur-3xl" />
|
||||
<div className="absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[600px] h-[600px] bg-gradient-radial from-coral-100/10 to-transparent rounded-full" />
|
||||
|
||||
{/* Grid pattern */}
|
||||
<div
|
||||
className="absolute inset-0 opacity-[0.03]"
|
||||
style={{
|
||||
backgroundImage: `linear-gradient(var(--color-ink) 1px, transparent 1px), linear-gradient(90deg, var(--color-ink) 1px, transparent 1px)`,
|
||||
backgroundSize: '60px 60px',
|
||||
}}
|
||||
/>
|
||||
|
||||
<div className="relative max-w-6xl mx-auto px-6 py-20 lg:py-28">
|
||||
<div className="grid lg:grid-cols-12 gap-12 lg:gap-8 items-center">
|
||||
{/* Left: Text — takes 7 cols for asymmetry */}
|
||||
<div className="lg:col-span-7 animate-fade-up">
|
||||
{/* Badge */}
|
||||
<div className="inline-flex items-center gap-2 px-3 py-1.5 bg-white/80 backdrop-blur-sm border border-cream-300 rounded-full text-xs font-medium text-ink-secondary mb-8">
|
||||
<span className="w-1.5 h-1.5 rounded-full bg-sage-500 animate-pulse" />
|
||||
{language === 'zh' ? '免费使用 · 无需注册' : 'Free to use · No sign-up required'}
|
||||
</div>
|
||||
|
||||
<h1 className="font-display text-4xl sm:text-5xl lg:text-[3.5rem] font-extrabold text-ink leading-[1.1] mb-6 tracking-tight">
|
||||
{t.marketing.hero.title}
|
||||
</h1>
|
||||
<p className="text-lg text-gray-600 mb-8 leading-relaxed">
|
||||
|
||||
<p className="text-lg text-ink-secondary leading-relaxed mb-10 max-w-xl">
|
||||
{t.marketing.hero.subtitle}
|
||||
</p>
|
||||
|
||||
<div className="flex flex-wrap gap-4">
|
||||
<Link
|
||||
to="/app"
|
||||
className="inline-flex items-center gap-2 px-6 py-3 bg-blue-600 hover:bg-blue-700 text-white font-semibold rounded-lg transition-colors shadow-lg shadow-blue-600/25"
|
||||
className="btn-primary px-7 py-3.5 text-base"
|
||||
>
|
||||
{t.marketing.hero.cta}
|
||||
<ArrowRight size={18} />
|
||||
</Link>
|
||||
<a
|
||||
href="#features"
|
||||
className="inline-flex items-center gap-2 px-6 py-3 bg-white hover:bg-gray-50 text-gray-700 font-semibold rounded-lg transition-colors border border-gray-200"
|
||||
className="btn-secondary px-7 py-3.5 text-base"
|
||||
>
|
||||
{t.marketing.hero.ctaSecondary}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
{/* Social proof hint */}
|
||||
<div className="mt-10 flex items-center gap-3 text-sm text-ink-muted">
|
||||
<div className="flex -space-x-2">
|
||||
{['bg-coral-300', 'bg-sage-300', 'bg-amber-300', 'bg-violet-300'].map((bg, i) => (
|
||||
<div key={i} className={`w-7 h-7 rounded-full ${bg} border-2 border-cream-50`} />
|
||||
))}
|
||||
</div>
|
||||
<span>{language === 'zh' ? '已有 1,000+ 学生在使用' : 'Used by 1,000+ students'}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Right: Demo card */}
|
||||
<div className="relative">
|
||||
{/* Right: Interactive demo card — 5 cols */}
|
||||
<div className="lg:col-span-5 animate-fade-up delay-200" style={{ opacity: 0 }}>
|
||||
<Link
|
||||
to="/app"
|
||||
className="block bg-white rounded-2xl shadow-2xl border border-gray-200 p-8 hover:shadow-3xl transition-shadow group"
|
||||
className="block group"
|
||||
>
|
||||
<div className="border-2 border-dashed border-gray-300 group-hover:border-blue-400 rounded-xl p-10 flex flex-col items-center justify-center transition-colors">
|
||||
<div className="w-16 h-16 bg-blue-100 rounded-full flex items-center justify-center mb-4 group-hover:bg-blue-200 transition-colors">
|
||||
<Upload size={28} className="text-blue-600" />
|
||||
<div className="card p-1 hover:border-coral-200">
|
||||
{/* Mock window chrome */}
|
||||
<div className="flex items-center gap-1.5 px-4 py-3 border-b border-cream-300/50">
|
||||
<div className="w-2.5 h-2.5 rounded-full bg-coral-300" />
|
||||
<div className="w-2.5 h-2.5 rounded-full bg-amber-300" />
|
||||
<div className="w-2.5 h-2.5 rounded-full bg-sage-300" />
|
||||
<span className="ml-3 text-[10px] font-mono text-ink-muted">texpixel.com/app</span>
|
||||
</div>
|
||||
<p className="text-gray-500 text-sm text-center">
|
||||
{t.sidebar.uploadInstruction}
|
||||
</p>
|
||||
</div>
|
||||
{/* Mock result preview */}
|
||||
<div className="mt-6 bg-gray-50 rounded-lg p-4">
|
||||
<div className="flex items-center gap-2 mb-3">
|
||||
<div className="w-2 h-2 rounded-full bg-green-500" />
|
||||
<span className="text-xs text-gray-500 font-mono">LaTeX Output</span>
|
||||
|
||||
<div className="p-6">
|
||||
{/* Upload zone */}
|
||||
<div className="border-2 border-dashed border-cream-300 group-hover:border-coral-300 rounded-xl p-8 flex flex-col items-center justify-center transition-colors duration-300 bg-cream-50/50">
|
||||
<div className="w-14 h-14 bg-coral-50 group-hover:bg-coral-100 rounded-2xl flex items-center justify-center mb-3 transition-all duration-300 group-hover:scale-110">
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" className="text-coral-500">
|
||||
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" />
|
||||
<polyline points="17 8 12 3 7 8" />
|
||||
<line x1="12" y1="3" x2="12" y2="15" />
|
||||
</svg>
|
||||
</div>
|
||||
<p className="text-ink-muted text-xs text-center">
|
||||
{t.sidebar.uploadInstruction}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
{/* Mock result */}
|
||||
<div className="mt-4 rounded-lg p-4 bg-ink/[0.03]">
|
||||
<div className="flex items-center gap-2 mb-3">
|
||||
<div className="w-1.5 h-1.5 rounded-full bg-sage-500" />
|
||||
<span className="text-[10px] text-ink-muted font-mono tracking-wider uppercase">LaTeX Output</span>
|
||||
</div>
|
||||
<code className="text-sm text-ink font-mono block leading-relaxed">
|
||||
{'\\frac{-b \\pm \\sqrt{b^2 - 4ac}}{2a}'}
|
||||
</code>
|
||||
</div>
|
||||
</div>
|
||||
<code className="text-sm text-gray-700 font-mono block">
|
||||
{'\\frac{-b \\pm \\sqrt{b^2 - 4ac}}{2a}'}
|
||||
</code>
|
||||
</div>
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Background decoration */}
|
||||
<div className="absolute top-0 right-0 w-96 h-96 bg-blue-200/20 rounded-full blur-3xl -translate-y-1/2 translate-x-1/2" />
|
||||
<div className="absolute bottom-0 left-0 w-72 h-72 bg-indigo-200/20 rounded-full blur-3xl translate-y-1/2 -translate-x-1/2" />
|
||||
</section>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,11 @@ import { Upload, Cpu, Download } from 'lucide-react';
|
||||
import { useLanguage } from '../../contexts/LanguageContext';
|
||||
|
||||
const icons = [Upload, Cpu, Download];
|
||||
const stepColors = [
|
||||
{ num: 'text-coral-500', ring: 'ring-coral-100', bg: 'bg-coral-50' },
|
||||
{ num: 'text-sage-600', ring: 'ring-sage-100', bg: 'bg-sage-50' },
|
||||
{ num: 'text-amber-600', ring: 'ring-amber-100', bg: 'bg-amber-50' },
|
||||
];
|
||||
|
||||
export default function HowItWorksSection() {
|
||||
const { t } = useLanguage();
|
||||
@@ -14,23 +19,33 @@ export default function HowItWorksSection() {
|
||||
];
|
||||
|
||||
return (
|
||||
<section className="py-20 bg-gray-50">
|
||||
<div className="max-w-6xl mx-auto px-6">
|
||||
<section className="section-padding relative" style={{ backgroundColor: 'var(--color-bg)' }}>
|
||||
<div className="max-w-6xl mx-auto">
|
||||
<div className="text-center mb-16">
|
||||
<h2 className="text-3xl font-bold text-gray-900 mb-4">{h.title}</h2>
|
||||
<h2 className="font-display text-3xl lg:text-4xl font-bold text-ink mb-4 tracking-tight">{h.title}</h2>
|
||||
</div>
|
||||
|
||||
<div className="grid md:grid-cols-3 gap-8">
|
||||
<div className="grid md:grid-cols-3 gap-8 lg:gap-12 relative">
|
||||
{/* Connecting line (desktop only) */}
|
||||
<div className="hidden md:block absolute top-12 left-[20%] right-[20%] h-px border-t-2 border-dashed border-cream-300" />
|
||||
|
||||
{steps.map((step, i) => {
|
||||
const Icon = icons[i];
|
||||
const color = stepColors[i];
|
||||
return (
|
||||
<div key={i} className="text-center">
|
||||
<div className="w-16 h-16 bg-blue-600 text-white rounded-full flex items-center justify-center mx-auto mb-6 shadow-lg shadow-blue-600/25">
|
||||
<Icon size={28} />
|
||||
<div key={i} className="relative text-center group">
|
||||
{/* Step number badge */}
|
||||
<div className="relative inline-flex flex-col items-center mb-6">
|
||||
<div className={`w-24 h-24 ${color.bg} rounded-3xl flex items-center justify-center ring-4 ${color.ring} ring-offset-4 ring-offset-[var(--color-bg)] transition-transform duration-300 group-hover:scale-105 relative z-10`}>
|
||||
<Icon size={32} className={color.num} strokeWidth={1.5} />
|
||||
</div>
|
||||
<span className={`absolute -top-3 -right-3 w-8 h-8 rounded-full bg-white shadow-md flex items-center justify-center font-display font-bold text-sm ${color.num} z-20`}>
|
||||
{String(i + 1).padStart(2, '0')}
|
||||
</span>
|
||||
</div>
|
||||
<div className="text-sm font-bold text-blue-600 mb-2">0{i + 1}</div>
|
||||
<h3 className="text-xl font-semibold text-gray-900 mb-3">{step.title}</h3>
|
||||
<p className="text-gray-600 text-sm leading-relaxed">{step.description}</p>
|
||||
|
||||
<h3 className="font-display text-xl font-semibold text-ink mb-3">{step.title}</h3>
|
||||
<p className="text-ink-secondary text-sm leading-relaxed max-w-xs mx-auto">{step.description}</p>
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
|
||||
@@ -16,6 +16,7 @@ export default function PricingSection() {
|
||||
href: '/app',
|
||||
disabled: false,
|
||||
popular: false,
|
||||
accent: 'sage',
|
||||
},
|
||||
{
|
||||
name: p.pro,
|
||||
@@ -26,6 +27,7 @@ export default function PricingSection() {
|
||||
href: '#',
|
||||
disabled: true,
|
||||
popular: true,
|
||||
accent: 'coral',
|
||||
},
|
||||
{
|
||||
name: p.enterprise,
|
||||
@@ -36,43 +38,44 @@ export default function PricingSection() {
|
||||
href: '#contact',
|
||||
disabled: false,
|
||||
popular: false,
|
||||
accent: 'ink',
|
||||
},
|
||||
];
|
||||
|
||||
return (
|
||||
<section id="pricing" className="py-20 bg-white">
|
||||
<div className="max-w-6xl mx-auto px-6">
|
||||
<section id="pricing" className="section-padding bg-white">
|
||||
<div className="max-w-6xl mx-auto">
|
||||
<div className="text-center mb-16">
|
||||
<h2 className="text-3xl font-bold text-gray-900 mb-4">{p.title}</h2>
|
||||
<p className="text-gray-600 text-lg">{p.subtitle}</p>
|
||||
<h2 className="font-display text-3xl lg:text-4xl font-bold text-ink mb-4 tracking-tight">{p.title}</h2>
|
||||
<p className="text-ink-secondary text-lg">{p.subtitle}</p>
|
||||
</div>
|
||||
|
||||
<div className="grid md:grid-cols-3 gap-8 max-w-5xl mx-auto">
|
||||
<div className="grid md:grid-cols-3 gap-6 max-w-5xl mx-auto">
|
||||
{plans.map((plan, i) => (
|
||||
<div
|
||||
key={i}
|
||||
className={`rounded-2xl p-8 flex flex-col ${
|
||||
className={`relative rounded-2xl p-7 flex flex-col transition-all duration-200 ${
|
||||
plan.popular
|
||||
? 'border-2 border-blue-600 shadow-xl relative'
|
||||
: 'border border-gray-200'
|
||||
? 'border-2 border-coral-400 shadow-xl shadow-coral-500/10 scale-[1.02]'
|
||||
: 'card'
|
||||
}`}
|
||||
>
|
||||
{plan.popular && (
|
||||
<div className="absolute -top-3 left-1/2 -translate-x-1/2 bg-blue-600 text-white text-xs font-semibold px-3 py-1 rounded-full">
|
||||
<div className="absolute -top-3.5 left-1/2 -translate-x-1/2 bg-gradient-to-r from-coral-500 to-coral-400 text-white text-xs font-display font-semibold px-4 py-1 rounded-full shadow-md">
|
||||
{p.popular}
|
||||
</div>
|
||||
)}
|
||||
|
||||
<h3 className="text-xl font-bold text-gray-900 mb-2">{plan.name}</h3>
|
||||
<h3 className="font-display text-lg font-bold text-ink mb-1">{plan.name}</h3>
|
||||
<div className="mb-6">
|
||||
<span className="text-4xl font-bold text-gray-900">{plan.price}</span>
|
||||
{plan.period && <span className="text-gray-500 text-sm">{plan.period}</span>}
|
||||
<span className="font-display text-4xl font-extrabold text-ink">{plan.price}</span>
|
||||
{plan.period && <span className="text-ink-muted text-sm ml-1">{plan.period}</span>}
|
||||
</div>
|
||||
|
||||
<ul className="space-y-3 mb-8 flex-1">
|
||||
{plan.features.map((feature, j) => (
|
||||
<li key={j} className="flex items-start gap-2 text-sm text-gray-600">
|
||||
<Check size={16} className="text-green-500 mt-0.5 flex-shrink-0" />
|
||||
<li key={j} className="flex items-start gap-2.5 text-sm text-ink-secondary">
|
||||
<Check size={15} className="text-sage-500 mt-0.5 flex-shrink-0" />
|
||||
{feature}
|
||||
</li>
|
||||
))}
|
||||
@@ -81,17 +84,17 @@ export default function PricingSection() {
|
||||
{plan.disabled ? (
|
||||
<button
|
||||
disabled
|
||||
className="w-full py-3 rounded-lg text-sm font-semibold bg-gray-100 text-gray-400 cursor-not-allowed"
|
||||
className="w-full py-3 rounded-xl text-sm font-semibold bg-cream-200 text-ink-muted cursor-not-allowed"
|
||||
>
|
||||
{plan.cta}
|
||||
</button>
|
||||
) : plan.href.startsWith('/') ? (
|
||||
<Link
|
||||
to={plan.href}
|
||||
className={`w-full py-3 rounded-lg text-sm font-semibold text-center block transition-colors ${
|
||||
className={`w-full py-3 rounded-xl text-sm font-semibold text-center block transition-all duration-200 ${
|
||||
plan.popular
|
||||
? 'bg-blue-600 hover:bg-blue-700 text-white'
|
||||
: 'bg-gray-900 hover:bg-gray-800 text-white'
|
||||
? 'btn-primary justify-center'
|
||||
: 'bg-ink hover:bg-ink/90 text-white shadow-sm'
|
||||
}`}
|
||||
>
|
||||
{plan.cta}
|
||||
@@ -99,7 +102,7 @@ export default function PricingSection() {
|
||||
) : (
|
||||
<a
|
||||
href={plan.href}
|
||||
className="w-full py-3 rounded-lg text-sm font-semibold text-center block bg-gray-900 hover:bg-gray-800 text-white transition-colors"
|
||||
className="w-full py-3 rounded-xl text-sm font-semibold text-center block bg-ink hover:bg-ink/90 text-white transition-colors shadow-sm"
|
||||
>
|
||||
{plan.cta}
|
||||
</a>
|
||||
|
||||
Reference in New Issue
Block a user