feat: rebrand to CRE Innovations, enhance ultra-smooth UI and mobile responsiveness
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
import React, { useState } from 'react';
|
||||
import Link from 'next/link';
|
||||
import { HelpCircle, CheckCircle2, ArrowRight, Sparkles, Smartphone } from 'lucide-react';
|
||||
import { HelpCircle, ArrowRight, Sparkles, Smile, RefreshCcw, Scissors, Palette } from 'lucide-react';
|
||||
import { AppItem, resolveLocalised } from '@/types';
|
||||
|
||||
interface AppPickerSectionProps {
|
||||
@@ -19,31 +19,34 @@ export function AppPickerSection({
|
||||
locale = 'en',
|
||||
}: AppPickerSectionProps) {
|
||||
const [photoGoal, setPhotoGoal] = useState<string>('portrait');
|
||||
const [step, setStep] = useState<number>(1);
|
||||
|
||||
const goalOptions = [
|
||||
{
|
||||
id: 'portrait',
|
||||
title: 'Portraits, Selfies & Skin Beauty',
|
||||
desc: 'Acne, blemish removal, teeth whitening, eye redness',
|
||||
icon: Smile,
|
||||
appSlug: 'portrait-app',
|
||||
},
|
||||
{
|
||||
id: 'restoration',
|
||||
title: 'Blurry, Damaged or Old Photos',
|
||||
desc: 'Restoring old photos, fixing scratches, sharpening faces',
|
||||
desc: 'Fixing scratches, sharpening faces, colorizing black & white',
|
||||
icon: RefreshCcw,
|
||||
appSlug: 'photo-enhancer-pro',
|
||||
},
|
||||
{
|
||||
id: 'cutout',
|
||||
title: 'Background Cutout & Object Removal',
|
||||
desc: 'Transparent PNGs, product photography, erasing strangers',
|
||||
title: 'Background Cutout & Eraser',
|
||||
desc: 'Transparent PNGs, e-commerce products, erasing strangers',
|
||||
icon: Scissors,
|
||||
appSlug: 'bg-cleaner-app',
|
||||
},
|
||||
{
|
||||
id: 'art',
|
||||
title: 'Anime, Cartoon & Vintage Film Art',
|
||||
desc: 'Cartoon avatars, Polaroid aesthetic, anime stylization',
|
||||
desc: 'Cartoon avatars, Polaroid frames, manga illustrations',
|
||||
icon: Palette,
|
||||
appSlug: 'art-studio-app',
|
||||
},
|
||||
];
|
||||
@@ -52,68 +55,79 @@ export function AppPickerSection({
|
||||
const recommendedApp = apps.find((a) => a.slug === matchedGoal.appSlug) || apps[0];
|
||||
|
||||
return (
|
||||
<section className="py-12 lg:py-16 bg-white dark:bg-slate-900 border-t border-slate-200 dark:border-slate-800">
|
||||
<section className="py-14 sm:py-20 bg-white dark:bg-slate-900 border-t border-slate-200/80 dark:border-slate-800/80">
|
||||
<div className="max-w-4xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||
<div className="text-center space-y-3 mb-10">
|
||||
<div className="inline-flex items-center space-x-2 px-3 py-1 rounded-full bg-blue-50 dark:bg-blue-950 text-blue-600 dark:text-blue-400 text-xs font-semibold">
|
||||
<div className="inline-flex items-center space-x-2 px-3.5 py-1.5 rounded-full bg-blue-50 dark:bg-blue-950/80 text-blue-600 dark:text-cyan-400 text-xs font-bold border border-blue-200/60 dark:border-blue-800/60">
|
||||
<HelpCircle className="w-3.5 h-3.5" />
|
||||
<span>Interactive App Matcher</span>
|
||||
<span>Interactive Tool & App Matcher</span>
|
||||
</div>
|
||||
<h2 className="text-3xl font-bold text-slate-900 dark:text-white">
|
||||
<h2 className="text-3xl sm:text-4xl font-black text-slate-900 dark:text-white tracking-tight">
|
||||
{resolveLocalised(title, locale, 'Not Sure Which App You Need?')}
|
||||
</h2>
|
||||
<p className="text-sm text-slate-600 dark:text-slate-400">
|
||||
{resolveLocalised(subtitle, locale, 'Select your photo editing goal to find your tailored mobile tool.')}
|
||||
<p className="text-sm text-slate-600 dark:text-slate-400 max-w-lg mx-auto">
|
||||
{resolveLocalised(subtitle, locale, 'Select what you want to edit and find your tailored CRE Innovations app.')}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className="bg-slate-50 dark:bg-slate-950 rounded-3xl p-6 sm:p-8 border border-slate-200 dark:border-slate-800 shadow-md space-y-8">
|
||||
<div className="bg-slate-50/80 dark:bg-slate-950/80 rounded-3xl p-6 sm:p-9 border border-slate-200/80 dark:border-slate-800/80 shadow-xl space-y-8">
|
||||
<div>
|
||||
<label className="block text-xs font-bold uppercase tracking-wider text-slate-500 dark:text-slate-400 mb-4">
|
||||
Step 1: What would you like to edit?
|
||||
Select Your Creative Goal:
|
||||
</label>
|
||||
<div className="grid grid-cols-1 sm:grid-cols-2 gap-3">
|
||||
{goalOptions.map((opt) => (
|
||||
<button
|
||||
key={opt.id}
|
||||
onClick={() => setPhotoGoal(opt.id)}
|
||||
className={`p-4 rounded-2xl border text-left transition-all ${
|
||||
photoGoal === opt.id
|
||||
? 'border-blue-600 bg-white dark:bg-slate-900 shadow-md ring-2 ring-blue-500/20'
|
||||
: 'border-slate-200 dark:border-slate-800 hover:border-slate-300 dark:hover:border-slate-700 bg-white/60 dark:bg-slate-900/60'
|
||||
}`}
|
||||
>
|
||||
<p className="font-semibold text-sm text-slate-900 dark:text-white">
|
||||
{opt.title}
|
||||
</p>
|
||||
<p className="text-xs text-slate-500 dark:text-slate-400 mt-1">
|
||||
{opt.desc}
|
||||
</p>
|
||||
</button>
|
||||
))}
|
||||
<div className="grid grid-cols-1 sm:grid-cols-2 gap-3.5">
|
||||
{goalOptions.map((opt) => {
|
||||
const Icon = opt.icon;
|
||||
const isSelected = photoGoal === opt.id;
|
||||
return (
|
||||
<button
|
||||
key={opt.id}
|
||||
onClick={() => setPhotoGoal(opt.id)}
|
||||
className={`p-4 sm:p-5 rounded-2xl border text-left transition-all duration-200 flex items-start space-x-3.5 ${
|
||||
isSelected
|
||||
? 'border-blue-600 bg-white dark:bg-slate-900 shadow-lg ring-2 ring-blue-500/20 scale-[1.01]'
|
||||
: 'border-slate-200/80 dark:border-slate-800/80 hover:border-slate-300 dark:hover:border-slate-700 bg-white/70 dark:bg-slate-900/70'
|
||||
}`}
|
||||
>
|
||||
<div className={`w-9 h-9 rounded-xl flex items-center justify-center shrink-0 mt-0.5 ${
|
||||
isSelected ? 'bg-blue-600 text-white' : 'bg-slate-100 dark:bg-slate-800 text-slate-500'
|
||||
}`}>
|
||||
<Icon className="w-4 h-4" />
|
||||
</div>
|
||||
<div>
|
||||
<p className="font-bold text-sm text-slate-900 dark:text-white">
|
||||
{opt.title}
|
||||
</p>
|
||||
<p className="text-xs text-slate-500 dark:text-slate-400 mt-1 leading-relaxed">
|
||||
{opt.desc}
|
||||
</p>
|
||||
</div>
|
||||
</button>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Recommended Result */}
|
||||
{/* Recommended Result Box */}
|
||||
{recommendedApp && (
|
||||
<div className="pt-6 border-t border-slate-200 dark:border-slate-800 flex flex-col sm:flex-row items-center justify-between gap-6 bg-gradient-to-r from-blue-50/50 to-teal-50/50 dark:from-blue-950/20 dark:to-teal-950/20 p-6 rounded-2xl">
|
||||
<div className="pt-6 border-t border-slate-200 dark:border-slate-800 flex flex-col sm:flex-row items-start sm:items-center justify-between gap-6 bg-gradient-to-r from-blue-50 via-indigo-50 to-cyan-50 dark:from-blue-950/40 dark:via-indigo-950/40 dark:to-cyan-950/40 p-6 sm:p-7 rounded-2xl border border-blue-200/60 dark:border-blue-900/40 shadow-sm">
|
||||
<div className="space-y-1">
|
||||
<span className="text-[11px] font-bold uppercase tracking-wider text-emerald-600 dark:text-emerald-400">
|
||||
Recommended Match:
|
||||
<span className="text-[11px] font-black uppercase tracking-wider text-blue-600 dark:text-cyan-400">
|
||||
★ Recommended Match
|
||||
</span>
|
||||
<h4 className="text-xl font-bold text-slate-900 dark:text-white">
|
||||
<h4 className="text-xl sm:text-2xl font-black text-slate-900 dark:text-white">
|
||||
{resolveLocalised(recommendedApp.name, locale)}
|
||||
</h4>
|
||||
<p className="text-xs text-slate-600 dark:text-slate-400">
|
||||
<p className="text-xs sm:text-sm text-slate-600 dark:text-slate-400">
|
||||
{resolveLocalised(recommendedApp.tagline, locale)}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<Link
|
||||
href={`/apps/${recommendedApp.slug}`}
|
||||
className="shrink-0 inline-flex items-center space-x-2 px-5 py-3 rounded-xl text-xs font-semibold text-white bg-blue-600 hover:bg-blue-700 shadow-md shadow-blue-500/20 transition-all hover:scale-105"
|
||||
className="w-full sm:w-auto shrink-0 inline-flex items-center justify-center space-x-2 px-6 py-3.5 rounded-2xl text-xs font-bold text-white bg-blue-600 hover:bg-blue-700 shadow-lg shadow-blue-500/25 transition-all hover:scale-105 active:scale-95"
|
||||
>
|
||||
<span>View App & Get 50 Bonus Credits</span>
|
||||
<span>Get App & 50 Bonus Credits</span>
|
||||
<ArrowRight className="w-4 h-4" />
|
||||
</Link>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user