页面显示优化

This commit is contained in:
Dev
2026-11-02 17:15:39 +08:00
parent 061fa9d029
commit cf145c8266
15 changed files with 234 additions and 204 deletions
+16 -15
View File
@@ -10,8 +10,8 @@ const GenerateIcon = () => <svg xmlns="http://www.w3.org/2000/svg" fill="none" v
const ExecuteIcon = () => <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor" className="w-6 h-6"><path strokeLinecap="round" strokeLinejoin="round" d="M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>;
const FeatureCard: React.FC<{ icon: React.ReactElement; title: string; children: React.ReactNode }> = ({ icon, title, children }) => (
<div className="bg-white dark:bg-slate-800 p-6 rounded-lg shadow-md border border-slate-200 dark:border-slate-700">
<div className="flex items-center justify-center h-12 w-12 rounded-full bg-green-100 dark:bg-green-900/30 text-green-600 dark:text-green-400 mb-4">
<div className="bg-white dark:bg-slate-800 p-6 sm:p-7 rounded-2xl shadow-sm border border-slate-200/80 dark:border-slate-700 text-left hover:-translate-y-0.5 hover:shadow-md transition-all duration-200">
<div className="flex items-center justify-center h-12 w-12 rounded-2xl bg-emerald-50 dark:bg-emerald-900/30 text-emerald-600 dark:text-emerald-400 mb-4">
{icon}
</div>
<h3 className="text-lg font-semibold text-slate-900 dark:text-slate-100 mb-2">{title}</h3>
@@ -24,26 +24,27 @@ const LandingPage: React.FC<LandingPageProps> = ({ onGetStarted }) => {
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">
<section className="py-14 md:py-20">
<p className="inline-flex items-center rounded-full bg-emerald-50 dark:bg-emerald-900/30 text-emerald-700 dark:text-emerald-300 text-xs font-semibold px-3 py-1 mb-5">Goal Planner</p>
<h1 className="text-4xl md:text-6xl font-extrabold text-slate-900 dark:text-slate-100 mb-5 tracking-tight leading-[1.1]">
{t('heroTitle')}
</h1>
<p className="max-w-2xl mx-auto text-lg md:text-xl text-slate-600 dark:text-slate-400 mb-8">
<p className="max-w-2xl mx-auto text-lg md:text-xl text-slate-600 dark:text-slate-400 mb-8 leading-relaxed">
{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"
className="bg-emerald-600 text-white font-semibold px-8 py-3.5 rounded-xl hover:bg-emerald-700 transition-all shadow-lg shadow-emerald-200/70 dark:shadow-none hover:-translate-y-0.5"
>
{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">
<section id="how-it-works" className="py-14 md:py-20 bg-white/70 dark:bg-slate-800/40 -mx-4 px-4 sm:mx-0 sm:px-8 sm:rounded-3xl border border-slate-200/70 dark:border-slate-700/60">
<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">
<div className="grid md:grid-cols-3 gap-5 max-w-5xl mx-auto text-left">
<FeatureCard
icon={<GoalIcon />}
title={t('step1Title')}
@@ -69,12 +70,12 @@ const LandingPage: React.FC<LandingPageProps> = ({ onGetStarted }) => {
<section id="testimonials" className="py-16 md:py-24">
<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">
<div className="bg-white dark:bg-slate-800 p-6 sm:p-7 rounded-2xl shadow-sm border border-slate-200/80 dark:border-slate-700 text-left">
<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">{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">
<div className="bg-white dark:bg-slate-800 p-6 sm:p-7 rounded-2xl shadow-sm border border-slate-200/80 dark:border-slate-700 text-left">
<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">{t('testimonial2Role')}</p>
@@ -83,7 +84,7 @@ const LandingPage: React.FC<LandingPageProps> = ({ onGetStarted }) => {
</section>
{/* 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">
<section id="about" className="py-14 md:py-20 bg-white/70 dark:bg-slate-800/40 -mx-4 px-4 sm:mx-0 sm:px-8 sm:rounded-3xl border border-slate-200/70 dark:border-slate-700/60">
<div className="max-w-4xl mx-auto text-center">
<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">
@@ -94,14 +95,14 @@ 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">{t('ctaTitle')}</h2>
<p className="text-lg text-green-100 mb-8 max-w-2xl mx-auto">
<div className="max-w-4xl mx-auto text-center bg-gradient-to-br from-emerald-600 to-teal-600 dark:from-emerald-700 dark:to-teal-800 text-white py-14 sm:py-16 px-6 sm:px-10 rounded-3xl shadow-lg shadow-emerald-200/50 dark:shadow-none">
<h2 className="text-3xl sm:text-4xl font-extrabold mb-4">{t('ctaTitle')}</h2>
<p className="text-lg text-emerald-50 mb-8 max-w-2xl mx-auto">
{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"
className="bg-white text-emerald-700 font-bold px-10 py-4 rounded-xl hover:bg-emerald-50 transition-all shadow-xl hover:-translate-y-0.5 text-lg"
>
{t('ctaButton')}
</button>