前端添加中英文切换
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import React from 'react';
|
||||
import { useLanguage } from '../i18n/LanguageContext';
|
||||
|
||||
interface LandingPageProps {
|
||||
onGetStarted: () => void;
|
||||
@@ -19,63 +20,64 @@ const FeatureCard: React.FC<{ icon: React.ReactElement; title: string; children:
|
||||
);
|
||||
|
||||
const LandingPage: React.FC<LandingPageProps> = ({ onGetStarted }) => {
|
||||
const { t } = useLanguage();
|
||||
return (
|
||||
<div className="text-center">
|
||||
{/* Hero Section */}
|
||||
<section className="py-16 md:py-24">
|
||||
<h1 className="text-4xl md:text-6xl font-extrabold text-slate-900 dark:text-slate-100 mb-4 tracking-tight">
|
||||
Turn Ambition into Action
|
||||
{t('heroTitle')}
|
||||
</h1>
|
||||
<p className="max-w-2xl mx-auto text-lg md:text-xl text-slate-600 dark:text-slate-400 mb-8">
|
||||
Goal Planner uses AI to break down your biggest goals into a manageable, step-by-step plan. Stop wondering, start doing.
|
||||
{t('heroSubtitle')}
|
||||
</p>
|
||||
<button
|
||||
onClick={onGetStarted}
|
||||
className="bg-green-600 text-white font-semibold px-8 py-3 rounded-lg hover:bg-green-700 transition-colors shadow-lg transform hover:scale-105"
|
||||
>
|
||||
Create Your First Plan
|
||||
{t('createFirstPlan')}
|
||||
</button>
|
||||
</section>
|
||||
|
||||
{/* Features Section */}
|
||||
<section id="how-it-works" className="py-16 md:py-24 bg-slate-100 dark:bg-slate-800/50 -mx-4 px-4 sm:rounded-2xl">
|
||||
<h2 className="text-3xl font-bold text-slate-900 dark:text-slate-100 mb-2">How It Works</h2>
|
||||
<p className="max-w-xl mx-auto text-slate-600 dark:text-slate-400 mb-12">Achieve clarity in three simple steps.</p>
|
||||
<h2 className="text-3xl font-bold text-slate-900 dark:text-slate-100 mb-2">{t('howItWorks')}</h2>
|
||||
<p className="max-w-xl mx-auto text-slate-600 dark:text-slate-400 mb-12">{t('howItWorksSub')}</p>
|
||||
<div className="grid md:grid-cols-3 gap-8 max-w-5xl mx-auto">
|
||||
<FeatureCard
|
||||
icon={<GoalIcon />}
|
||||
title="1. Define Your Goal"
|
||||
title={t('step1Title')}
|
||||
>
|
||||
Start by telling our AI what you want to achieve. Be as broad or specific as you like.
|
||||
{t('step1Body')}
|
||||
</FeatureCard>
|
||||
<FeatureCard
|
||||
icon={<GenerateIcon />}
|
||||
title="2. Generate Your Plan"
|
||||
title={t('step2Title')}
|
||||
>
|
||||
Our intelligent system analyzes your goal and creates a detailed roadmap with tasks and dependencies.
|
||||
{t('step2Body')}
|
||||
</FeatureCard>
|
||||
<FeatureCard
|
||||
icon={<ExecuteIcon />}
|
||||
title="3. Execute & Track"
|
||||
title={t('step3Title')}
|
||||
>
|
||||
Follow the plan, mark tasks as complete, and watch your project come to life.
|
||||
{t('step3Body')}
|
||||
</FeatureCard>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{/* Testimonials */}
|
||||
<section id="testimonials" className="py-16 md:py-24">
|
||||
<h2 className="text-3xl font-bold text-slate-900 dark:text-slate-100 mb-12">Trusted by High-Achievers</h2>
|
||||
<h2 className="text-3xl font-bold text-slate-900 dark:text-slate-100 mb-12">{t('testimonialsTitle')}</h2>
|
||||
<div className="max-w-4xl mx-auto grid md:grid-cols-2 gap-8">
|
||||
<div className="bg-white dark:bg-slate-800 p-6 rounded-lg shadow-md border border-slate-200 dark:border-slate-700 text-left">
|
||||
<p className="text-slate-600 dark:text-slate-400 mb-4">"This tool is a game-changer. I went from a vague idea for my startup to a full-fledged project plan in minutes. Unbelievable!"</p>
|
||||
<p className="text-slate-600 dark:text-slate-400 mb-4">{t('testimonial1')}</p>
|
||||
<p className="font-semibold text-slate-900 dark:text-slate-100">Goal Planner</p>
|
||||
<p className="text-sm text-slate-500 dark:text-slate-500">Entrepreneur</p>
|
||||
<p className="text-sm text-slate-500 dark:text-slate-500">{t('testimonial1Role')}</p>
|
||||
</div>
|
||||
<div className="bg-white dark:bg-slate-800 p-6 rounded-lg shadow-md border border-slate-200 dark:border-slate-700 text-left">
|
||||
<p className="text-slate-600 dark:text-slate-400 mb-4">"As a student juggling multiple projects, the Goal Planner brought much-needed clarity. The dependency mapping is pure genius."</p>
|
||||
<p className="text-slate-600 dark:text-slate-400 mb-4">{t('testimonial2')}</p>
|
||||
<p className="font-semibold text-slate-900 dark:text-slate-100">Balaji</p>
|
||||
<p className="text-sm text-slate-500 dark:text-slate-500">University Student</p>
|
||||
<p className="text-sm text-slate-500 dark:text-slate-500">{t('testimonial2Role')}</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@@ -83,9 +85,9 @@ const LandingPage: React.FC<LandingPageProps> = ({ onGetStarted }) => {
|
||||
{/* About Section */}
|
||||
<section id="about" className="py-16 md:py-24 bg-slate-100 dark:bg-slate-800/50 -mx-4 px-4 sm:rounded-2xl">
|
||||
<div className="max-w-4xl mx-auto text-center">
|
||||
<h2 className="text-3xl font-bold text-slate-900 dark:text-slate-100 mb-4">Our Mission</h2>
|
||||
<h2 className="text-3xl font-bold text-slate-900 dark:text-slate-100 mb-4">{t('missionTitle')}</h2>
|
||||
<p className="text-lg text-slate-600 dark:text-slate-400 mb-8">
|
||||
We believe that great ideas shouldn't get lost in the complexity of execution. Goal Planner was born from a simple desire: to bridge the gap between vision and reality. Our mission is to empower creators, builders, and dreamers with intelligent tools that bring clarity, structure, and momentum to any project.
|
||||
{t('missionBody')}
|
||||
</p>
|
||||
</div>
|
||||
</section>
|
||||
@@ -93,15 +95,15 @@ const LandingPage: React.FC<LandingPageProps> = ({ onGetStarted }) => {
|
||||
{/* Final CTA */}
|
||||
<section className="py-16 md:py-24">
|
||||
<div className="max-w-4xl mx-auto text-center bg-green-600 dark:bg-green-700 text-white -mx-4 py-16 px-4 sm:rounded-2xl">
|
||||
<h2 className="text-4xl font-extrabold mb-4">Ready to Conquer Your Goals?</h2>
|
||||
<h2 className="text-4xl font-extrabold mb-4">{t('ctaTitle')}</h2>
|
||||
<p className="text-lg text-green-100 mb-8 max-w-2xl mx-auto">
|
||||
Stop procrastinating and start planning. Your next big achievement is just a few clicks away.
|
||||
{t('ctaBody')}
|
||||
</p>
|
||||
<button
|
||||
onClick={onGetStarted}
|
||||
className="bg-white dark:bg-slate-900 text-green-600 dark:text-green-400 font-bold px-10 py-4 rounded-lg hover:bg-green-50 dark:hover:bg-slate-800 transition-colors shadow-2xl transform hover:scale-105 text-lg"
|
||||
>
|
||||
Get Started for Free
|
||||
{t('ctaButton')}
|
||||
</button>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user