WIP: pending changes — docs, webhook, nav/footer (committed per Sami request, not yet reviewed)
This commit is contained in:
+268
-280
@@ -1,280 +1,268 @@
|
||||
'use client';
|
||||
|
||||
import { useState } from 'react';
|
||||
import Link from 'next/link';
|
||||
import Navbar from '@/components/Navbar';
|
||||
import Footer from '@/components/Footer';
|
||||
|
||||
export default function PricingPage() {
|
||||
const [isAnnual, setIsAnnual] = useState(false);
|
||||
|
||||
const plans = [
|
||||
{
|
||||
name: 'Free',
|
||||
price: '0',
|
||||
period: 'forever',
|
||||
description: 'Perfect for getting started with self-hosting',
|
||||
features: [
|
||||
'Dashboard & monitoring',
|
||||
'Up to 10 services',
|
||||
'50+ app templates',
|
||||
'Automatic SSL & DNS',
|
||||
'TOTP 2FA',
|
||||
'Community support',
|
||||
],
|
||||
cta: {
|
||||
text: 'Get Started Free',
|
||||
href: '/docs',
|
||||
},
|
||||
highlighted: false,
|
||||
},
|
||||
{
|
||||
name: 'Premium',
|
||||
price: isAnnual ? '99' : '20',
|
||||
period: isAnnual ? 'per year' : 'per month',
|
||||
savings: isAnnual ? 'Save 58%' : null,
|
||||
description: 'For power users and production deployments',
|
||||
features: [
|
||||
'Everything in Free, plus:',
|
||||
'Unlimited services',
|
||||
'Auto-Login SSO for deployed apps',
|
||||
'Recipes (multi-container stack deployment)',
|
||||
'Docker Swarm (multi-node cluster orchestration)',
|
||||
'Priority email support',
|
||||
'Early access to new features',
|
||||
],
|
||||
cta: {
|
||||
text: 'Start 14-Day Free Trial',
|
||||
href: '/api/checkout?plan=premium',
|
||||
},
|
||||
highlighted: true,
|
||||
},
|
||||
];
|
||||
|
||||
const faqs = [
|
||||
{
|
||||
question: 'Can I try Premium for free?',
|
||||
answer: 'Yes! Premium includes a 14-day free trial. No credit card required. You can cancel anytime.',
|
||||
},
|
||||
{
|
||||
question: 'What happens when my subscription ends?',
|
||||
answer: 'Your subscription gracefully downgrades to the Free tier. All your data remains intact—no data loss. You can resubscribe at any time.',
|
||||
},
|
||||
{
|
||||
question: 'Can I self-host the license server?',
|
||||
answer: 'Coming soon! We\'re working on a self-hosted license server option for enterprise deployments.',
|
||||
},
|
||||
{
|
||||
question: 'Do you offer refunds?',
|
||||
answer: 'Yes, we offer a 30-day money-back guarantee. If you\'re not satisfied with Premium, contact support for a full refund.',
|
||||
},
|
||||
{
|
||||
question: 'Is my data safe?',
|
||||
answer: '100% self-hosted means your data never leaves your server. DashCaddy runs entirely on your infrastructure. We have no access to your applications, configurations, or data.',
|
||||
},
|
||||
];
|
||||
|
||||
const [expandedFaq, setExpandedFaq] = useState<number | null>(0);
|
||||
|
||||
return (
|
||||
<div className="flex flex-col min-h-screen bg-surface-950 text-surface-50">
|
||||
<Navbar />
|
||||
|
||||
{/* Hero Section */}
|
||||
<section className="relative py-16 sm:py-20 lg:py-24">
|
||||
<div className="absolute inset-0 -z-10">
|
||||
<div className="absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-96 h-96 bg-brand-500/20 rounded-full blur-3xl opacity-30 animate-pulse" />
|
||||
</div>
|
||||
|
||||
<div className="mx-auto max-w-4xl px-4 sm:px-6 lg:px-8 text-center">
|
||||
<h1 className="text-4xl sm:text-5xl lg:text-6xl font-bold mb-6">
|
||||
Simple, Transparent <span className="text-brand-400">Pricing</span>
|
||||
</h1>
|
||||
<p className="text-xl text-surface-300 mb-8 max-w-2xl mx-auto">
|
||||
Start free. Upgrade when you need advanced features. No surprises, no lock-in.
|
||||
</p>
|
||||
|
||||
{/* Toggle for Monthly/Yearly */}
|
||||
<div className="flex items-center justify-center gap-4 mb-12">
|
||||
<span className={`text-sm font-medium ${!isAnnual ? 'text-surface-50' : 'text-surface-400'}`}>
|
||||
Monthly
|
||||
</span>
|
||||
<button
|
||||
onClick={() => setIsAnnual(!isAnnual)}
|
||||
className={`relative inline-flex h-8 w-14 items-center rounded-full transition-colors ${
|
||||
isAnnual ? 'bg-brand-500' : 'bg-surface-700'
|
||||
}`}
|
||||
aria-label="Toggle annual pricing"
|
||||
>
|
||||
<span
|
||||
className={`inline-block h-6 w-6 transform rounded-full bg-white transition-transform ${
|
||||
isAnnual ? 'translate-x-7' : 'translate-x-1'
|
||||
}`}
|
||||
/>
|
||||
</button>
|
||||
<span className={`text-sm font-medium ${isAnnual ? 'text-surface-50' : 'text-surface-400'}`}>
|
||||
Annual
|
||||
</span>
|
||||
{isAnnual && (
|
||||
<span className="ml-2 inline-block rounded-full bg-brand-500/20 px-3 py-1 text-sm font-semibold text-brand-300">
|
||||
Best Value
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{/* Pricing Cards */}
|
||||
<section className="relative py-12 sm:py-16 lg:py-20">
|
||||
<div className="mx-auto max-w-7xl px-4 sm:px-6 lg:px-8">
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-8 max-w-5xl mx-auto">
|
||||
{plans.map((plan, idx) => (
|
||||
<div
|
||||
key={idx}
|
||||
className={`relative rounded-2xl border transition-all duration-300 ${
|
||||
plan.highlighted
|
||||
? 'border-brand-500/50 bg-gradient-to-br from-surface-800 to-surface-900 shadow-2xl shadow-brand-500/20 scale-105 md:scale-105'
|
||||
: 'border-surface-700/50 bg-surface-800/50 hover:border-surface-700 hover:bg-surface-800/80'
|
||||
}`}
|
||||
>
|
||||
{/* Popular Badge */}
|
||||
{plan.highlighted && (
|
||||
<div className="absolute -top-4 left-1/2 -translate-x-1/2">
|
||||
<span className="inline-block rounded-full bg-brand-500 px-4 py-1 text-xs font-bold uppercase tracking-wide text-white">
|
||||
Most Popular
|
||||
</span>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div className="p-8 sm:p-10">
|
||||
{/* Header */}
|
||||
<div className="mb-8">
|
||||
<h3 className="text-2xl font-bold text-surface-50 mb-2">{plan.name}</h3>
|
||||
<p className="text-surface-400 text-sm mb-6">{plan.description}</p>
|
||||
|
||||
{/* Price */}
|
||||
<div className="flex items-baseline gap-2 mb-2">
|
||||
<span className="text-5xl font-bold text-surface-50">${plan.price}</span>
|
||||
<span className="text-surface-400">/{plan.period}</span>
|
||||
</div>
|
||||
{plan.savings && (
|
||||
<p className="text-sm text-brand-400 font-semibold">{plan.savings}</p>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* CTA Button */}
|
||||
<Link
|
||||
href={plan.cta.href}
|
||||
className={`block w-full rounded-lg px-6 py-3 text-center font-semibold transition-all duration-200 mb-8 ${
|
||||
plan.highlighted
|
||||
? 'bg-brand-500 text-white hover:bg-brand-600 hover:shadow-lg hover:shadow-brand-500/30'
|
||||
: 'border border-surface-700 bg-surface-700/50 text-surface-50 hover:border-brand-400 hover:bg-surface-700 hover:text-brand-400'
|
||||
}`}
|
||||
>
|
||||
{plan.cta.text}
|
||||
</Link>
|
||||
|
||||
{/* Features List */}
|
||||
<div className="border-t border-surface-700/50 pt-8">
|
||||
<ul className="space-y-4">
|
||||
{plan.features.map((feature, featureIdx) => (
|
||||
<li key={featureIdx} className="flex items-start gap-3">
|
||||
{feature.startsWith('Everything in') ? (
|
||||
<span className="text-sm font-semibold text-surface-300">{feature}</span>
|
||||
) : (
|
||||
<>
|
||||
<svg className="h-5 w-5 flex-shrink-0 text-green-400 mt-0.5" fill="currentColor" viewBox="0 0 20 20">
|
||||
<path fillRule="evenodd" d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z" clipRule="evenodd" />
|
||||
</svg>
|
||||
<span className="text-surface-300 text-sm">{feature}</span>
|
||||
</>
|
||||
)}
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{/* FAQ Section */}
|
||||
<section className="relative py-16 sm:py-20 lg:py-24 bg-gradient-to-b from-surface-950 to-surface-900">
|
||||
<div className="mx-auto max-w-3xl px-4 sm:px-6 lg:px-8">
|
||||
<div className="mb-12 text-center">
|
||||
<h2 className="text-3xl sm:text-4xl lg:text-5xl font-bold mb-4">
|
||||
Frequently Asked <span className="text-brand-400">Questions</span>
|
||||
</h2>
|
||||
<p className="text-lg text-surface-400">
|
||||
Have a question? We've got answers.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
{/* FAQ Accordion */}
|
||||
<div className="space-y-4">
|
||||
{faqs.map((faq, idx) => (
|
||||
<div
|
||||
key={idx}
|
||||
className="rounded-lg border border-surface-700/50 bg-surface-800/50 overflow-hidden transition-all duration-200 hover:border-surface-700"
|
||||
>
|
||||
<button
|
||||
onClick={() => setExpandedFaq(expandedFaq === idx ? null : idx)}
|
||||
className="w-full px-6 py-4 flex items-center justify-between hover:bg-surface-800/70 transition-colors"
|
||||
>
|
||||
<h3 className="text-lg font-semibold text-surface-50 text-left">{faq.question}</h3>
|
||||
<svg
|
||||
className={`h-6 w-6 flex-shrink-0 text-brand-400 transition-transform duration-200 ${
|
||||
expandedFaq === idx ? 'rotate-180' : ''
|
||||
}`}
|
||||
fill="none"
|
||||
viewBox="0 0 24 24"
|
||||
strokeWidth={2}
|
||||
stroke="currentColor"
|
||||
>
|
||||
<path strokeLinecap="round" strokeLinejoin="round" d="M19.5 8.25l-7.5 7.5-7.5-7.5" />
|
||||
</svg>
|
||||
</button>
|
||||
|
||||
{expandedFaq === idx && (
|
||||
<div className="border-t border-surface-700/50 bg-surface-900/50 px-6 py-4">
|
||||
<p className="text-surface-300 leading-relaxed">{faq.answer}</p>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{/* Final CTA */}
|
||||
<section className="relative py-16 sm:py-20 lg:py-24 bg-surface-950">
|
||||
<div className="mx-auto max-w-4xl px-4 sm:px-6 lg:px-8 text-center">
|
||||
<h2 className="text-3xl sm:text-4xl font-bold mb-6">
|
||||
Ready to Get Started?
|
||||
</h2>
|
||||
<p className="text-xl text-surface-300 mb-8 max-w-2xl mx-auto">
|
||||
Try DashCaddy free forever or upgrade to Premium for advanced features.
|
||||
</p>
|
||||
<div className="flex flex-col sm:flex-row gap-4 justify-center">
|
||||
<Link
|
||||
href="/docs"
|
||||
className="inline-flex items-center justify-center gap-2 rounded-lg bg-brand-500 px-8 py-3 text-base font-semibold text-white hover:bg-brand-600 transition-all duration-200 hover:shadow-lg hover:shadow-brand-500/30"
|
||||
>
|
||||
View Documentation
|
||||
</Link>
|
||||
<Link
|
||||
href="/"
|
||||
className="inline-flex items-center justify-center gap-2 rounded-lg border border-surface-700 bg-surface-800/50 px-8 py-3 text-base font-semibold text-surface-50 hover:border-brand-400 hover:bg-surface-800 transition-colors"
|
||||
>
|
||||
Back to Home
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<Footer />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
'use client';
|
||||
|
||||
import { useState } from 'react';
|
||||
import Link from 'next/link';
|
||||
import Navbar from '@/components/Navbar';
|
||||
import Footer from '@/components/Footer';
|
||||
|
||||
export default function PricingPage() {
|
||||
const [selectedPlan, setSelectedPlan] = useState<'monthly' | 'quarterly' | 'semiannual' | 'annual'>('annual');
|
||||
|
||||
const planOptions = [
|
||||
{ key: 'monthly', label: '1 Month', price: 25, period: '/mo', perMonth: undefined },
|
||||
{ key: 'quarterly', label: '3 Months', price: 50, period: '/3mo', perMonth: '$16.67/mo' },
|
||||
{ key: 'semiannual', label: '6 Months', price: 65, period: '/6mo', perMonth: '$10.83/mo' },
|
||||
{ key: 'annual', label: '12 Months', price: 99, period: '/yr', perMonth: '$8.25/mo' },
|
||||
] as const;
|
||||
|
||||
const selected = planOptions.find(p => p.key === selectedPlan)!;
|
||||
|
||||
const coreFeatures = [
|
||||
'Dashboard & service monitoring',
|
||||
'50+ pre-configured app templates',
|
||||
'Automatic SSL via Caddy internal CA',
|
||||
'DNS automation via Technitium DNS',
|
||||
'Reverse proxy management',
|
||||
'DashCA internal HTTPS trust distribution',
|
||||
'Container lifecycle management',
|
||||
'TOTP 2FA authentication',
|
||||
'Audit logging',
|
||||
];
|
||||
|
||||
const premiumFeatures = [
|
||||
'Everything in Core, plus:',
|
||||
'Auto-Login SSO for deployed apps',
|
||||
'Recipes — multi-container stack deployment',
|
||||
'Swarm — Docker Swarm multi-node orchestration',
|
||||
'One active machine per license',
|
||||
'7-day grace period on expiry',
|
||||
'Cancel at period end, no lock-in',
|
||||
];
|
||||
|
||||
const faqs = [
|
||||
{
|
||||
question: 'What happens when my subscription ends?',
|
||||
answer: 'Premium features gracefully deactivate after a 7-day grace period. Your services keep running — only the premium-gated features (SSO, Recipes, Swarm) become unavailable. Resubscribe at any time to re-enable them.',
|
||||
},
|
||||
{
|
||||
question: 'Can I use DashCaddy without Premium?',
|
||||
answer: 'Yes. The core platform is fully functional without a license. Premium unlocks SSO, Recipes, and Swarm — advanced orchestration features that most individual self-hosters may not need initially.',
|
||||
},
|
||||
{
|
||||
question: 'How many machines can I activate?',
|
||||
answer: 'One active machine at a time per license. You can deactivate and move to a new machine when needed.',
|
||||
},
|
||||
{
|
||||
question: 'Is there a free trial?',
|
||||
answer: 'Not currently. The core platform is available without a license, so you can evaluate DashCaddy before purchasing Premium.',
|
||||
},
|
||||
{
|
||||
question: 'Is my data safe?',
|
||||
answer: 'DashCaddy runs entirely on your infrastructure. Your data never leaves your server. We have no access to your applications, configurations, or data.',
|
||||
},
|
||||
{
|
||||
question: 'How does license validation work?',
|
||||
answer: 'DashCaddy validates licenses through an external license server. The app checks your subscription status and activates or deactivates premium features accordingly.',
|
||||
},
|
||||
];
|
||||
|
||||
const [expandedFaq, setExpandedFaq] = useState<number | null>(0);
|
||||
|
||||
return (
|
||||
<div className="flex flex-col min-h-screen bg-surface-950 text-surface-50">
|
||||
<Navbar />
|
||||
|
||||
{/* Hero */}
|
||||
<section className="relative py-16 sm:py-20 lg:py-24">
|
||||
<div className="absolute inset-0 -z-10">
|
||||
<div className="absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-96 h-96 bg-brand-500/20 rounded-full blur-3xl opacity-30 animate-pulse" />
|
||||
</div>
|
||||
<div className="mx-auto max-w-4xl px-4 sm:px-6 lg:px-8 text-center">
|
||||
<h1 className="text-4xl sm:text-5xl lg:text-6xl font-bold mb-6">
|
||||
Simple, Transparent <span className="text-brand-400">Pricing</span>
|
||||
</h1>
|
||||
<p className="text-xl text-surface-300 mb-8 max-w-2xl mx-auto">
|
||||
The core platform works without a license. Premium unlocks advanced orchestration when you need it.
|
||||
</p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{/* Two-column: Core vs Premium */}
|
||||
<section className="relative py-12 sm:py-16 lg:py-20">
|
||||
<div className="mx-auto max-w-6xl px-4 sm:px-6 lg:px-8">
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-8">
|
||||
|
||||
{/* Core Plan */}
|
||||
<div className="relative rounded-2xl border border-surface-700/50 bg-surface-800/50 hover:border-surface-700 hover:bg-surface-800/80 transition-all">
|
||||
<div className="p-8 sm:p-10">
|
||||
<div className="mb-8">
|
||||
<h3 className="text-2xl font-bold text-surface-50 mb-2">Core</h3>
|
||||
<p className="text-surface-400 text-sm mb-6">Everything you need to deploy and manage self-hosted services.</p>
|
||||
<div className="flex items-baseline gap-2">
|
||||
<span className="text-5xl font-bold text-surface-50">Free</span>
|
||||
</div>
|
||||
<p className="text-surface-500 text-sm mt-2">No license required</p>
|
||||
</div>
|
||||
|
||||
<Link
|
||||
href="/docs/installation"
|
||||
className="block w-full rounded-lg border border-surface-700 bg-surface-700/50 px-6 py-3 text-center font-semibold text-surface-50 hover:border-brand-400 hover:bg-surface-700 hover:text-brand-400 transition-all"
|
||||
>
|
||||
Read Install Guide
|
||||
</Link>
|
||||
|
||||
<div className="border-t border-surface-700/50 pt-8 mt-8">
|
||||
<p className="text-xs font-semibold uppercase tracking-wide text-surface-500 mb-4">Includes</p>
|
||||
<ul className="space-y-4">
|
||||
{coreFeatures.map((feature, i) => (
|
||||
<li key={i} className="flex items-start gap-3">
|
||||
<svg className="h-5 w-5 flex-shrink-0 text-green-400 mt-0.5" fill="currentColor" viewBox="0 0 20 20">
|
||||
<path fillRule="evenodd" d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z" clipRule="evenodd" />
|
||||
</svg>
|
||||
<span className="text-surface-300 text-sm">{feature}</span>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Premium Plan */}
|
||||
<div className="relative rounded-2xl border border-brand-500/50 bg-gradient-to-br from-surface-800 to-surface-900 shadow-2xl shadow-brand-500/20">
|
||||
<div className="absolute -top-4 left-1/2 -translate-x-1/2">
|
||||
<span className="inline-block rounded-full bg-brand-500 px-4 py-1 text-xs font-bold uppercase tracking-wide text-white">
|
||||
Premium
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div className="p-8 sm:p-10">
|
||||
<div className="mb-8">
|
||||
<h3 className="text-2xl font-bold text-surface-50 mb-2">Premium</h3>
|
||||
<p className="text-surface-400 text-sm mb-6">Advanced orchestration for power users and production setups.</p>
|
||||
|
||||
{/* Plan selector */}
|
||||
<div className="mb-4">
|
||||
<div className="grid grid-cols-2 gap-2">
|
||||
{planOptions.map((opt) => (
|
||||
<button
|
||||
key={opt.key}
|
||||
onClick={() => setSelectedPlan(opt.key)}
|
||||
className={`rounded-lg px-3 py-2 text-sm font-medium transition-all ${
|
||||
selectedPlan === opt.key
|
||||
? 'bg-brand-500 text-white'
|
||||
: 'bg-surface-700/50 text-surface-400 hover:bg-surface-700 hover:text-surface-300'
|
||||
}`}
|
||||
>
|
||||
{opt.label}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="flex items-baseline gap-2">
|
||||
<span className="text-5xl font-bold text-surface-50">${selected.price}</span>
|
||||
<span className="text-surface-400">{selected.period}</span>
|
||||
</div>
|
||||
{selected.perMonth && (
|
||||
<p className="text-brand-400 text-sm font-semibold mt-1">{selected.perMonth}</p>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<Link
|
||||
href={`/api/checkout?plan=premium&duration=${selectedPlan}`}
|
||||
className="block w-full rounded-lg bg-brand-500 px-6 py-3 text-center font-semibold text-white hover:bg-brand-600 hover:shadow-lg hover:shadow-brand-500/30 transition-all"
|
||||
>
|
||||
Subscribe to Premium
|
||||
</Link>
|
||||
|
||||
<div className="border-t border-surface-700/50 pt-8 mt-8">
|
||||
<p className="text-xs font-semibold uppercase tracking-wide text-surface-500 mb-4">Everything in Core, plus</p>
|
||||
<ul className="space-y-4">
|
||||
{premiumFeatures.map((feature, i) => (
|
||||
<li key={i} className="flex items-start gap-3">
|
||||
{feature.startsWith('Everything') ? (
|
||||
<span className="text-sm font-semibold text-surface-300">{feature}</span>
|
||||
) : (
|
||||
<>
|
||||
<svg className="h-5 w-5 flex-shrink-0 text-brand-400 mt-0.5" fill="currentColor" viewBox="0 0 20 20">
|
||||
<path fillRule="evenodd" d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z" clipRule="evenodd" />
|
||||
</svg>
|
||||
<span className="text-surface-300 text-sm">{feature}</span>
|
||||
</>
|
||||
)}
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{/* FAQ */}
|
||||
<section className="relative py-16 sm:py-20 lg:py-24 bg-gradient-to-b from-surface-950 to-surface-900">
|
||||
<div className="mx-auto max-w-3xl px-4 sm:px-6 lg:px-8">
|
||||
<div className="mb-12 text-center">
|
||||
<h2 className="text-3xl sm:text-4xl lg:text-5xl font-bold mb-4">
|
||||
Frequently Asked <span className="text-brand-400">Questions</span>
|
||||
</h2>
|
||||
</div>
|
||||
<div className="space-y-4">
|
||||
{faqs.map((faq, idx) => (
|
||||
<div
|
||||
key={idx}
|
||||
className="rounded-lg border border-surface-700/50 bg-surface-800/50 overflow-hidden transition-all hover:border-surface-700"
|
||||
>
|
||||
<button
|
||||
onClick={() => setExpandedFaq(expandedFaq === idx ? null : idx)}
|
||||
className="w-full px-6 py-4 flex items-center justify-between hover:bg-surface-800/70 transition-colors"
|
||||
>
|
||||
<h3 className="text-lg font-semibold text-surface-50 text-left">{faq.question}</h3>
|
||||
<svg
|
||||
className={`h-6 w-6 flex-shrink-0 text-brand-400 transition-transform ${expandedFaq === idx ? 'rotate-180' : ''}`}
|
||||
fill="none" viewBox="0 0 24 24" strokeWidth={2} stroke="currentColor"
|
||||
>
|
||||
<path strokeLinecap="round" strokeLinejoin="round" d="M19.5 8.25l-7.5 7.5-7.5-7.5" />
|
||||
</svg>
|
||||
</button>
|
||||
{expandedFaq === idx && (
|
||||
<div className="border-t border-surface-700/50 bg-surface-900/50 px-6 py-4">
|
||||
<p className="text-surface-300 leading-relaxed">{faq.answer}</p>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{/* CTA */}
|
||||
<section className="relative py-16 sm:py-20 lg:py-24 bg-surface-950">
|
||||
<div className="mx-auto max-w-4xl px-4 sm:px-6 lg:px-8 text-center">
|
||||
<h2 className="text-3xl sm:text-4xl font-bold mb-6">Ready to Get Started?</h2>
|
||||
<p className="text-xl text-surface-300 mb-8 max-w-2xl mx-auto">
|
||||
Install DashCaddy and start deploying services in minutes.
|
||||
</p>
|
||||
<div className="flex flex-col sm:flex-row gap-4 justify-center">
|
||||
<Link
|
||||
href="/docs/installation"
|
||||
className="inline-flex items-center justify-center gap-2 rounded-lg bg-brand-500 px-8 py-3 text-base font-semibold text-white hover:bg-brand-600 transition-all hover:shadow-lg hover:shadow-brand-500/30"
|
||||
>
|
||||
Installation Guide
|
||||
</Link>
|
||||
<Link
|
||||
href="/"
|
||||
className="inline-flex items-center justify-center gap-2 rounded-lg border border-surface-700 bg-surface-800/50 px-8 py-3 text-base font-semibold text-surface-50 hover:border-brand-400 hover:bg-surface-800 transition-colors"
|
||||
>
|
||||
Back to Home
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<Footer />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user