feat(tools): curate 10 AI tools suite, dynamic page configuration, and synced navbar dropdown
This commit is contained in:
@@ -11,14 +11,14 @@ export async function generateMetadata(): Promise<Metadata> {
|
||||
const siteConfig = getSiteConfig();
|
||||
const siteUrl = (process.env.SITE_URL || siteConfig.seo.siteUrl || 'http://localhost:3000').replace(/\/$/, '');
|
||||
|
||||
const title = 'AI Image Generate - Text to Image, 3D Caricatures & Art Studio';
|
||||
const title = 'AI Image - Text to Image, 3D Caricatures & Art Studio';
|
||||
const description = 'Generate creative AI artwork, 3D caricatures, cartoon avatars, and generative effects. 100% free with browser hardware acceleration.';
|
||||
|
||||
return {
|
||||
title,
|
||||
description,
|
||||
keywords: [
|
||||
'ai image generate',
|
||||
'ai image',
|
||||
'text to image free',
|
||||
'3d caricature maker',
|
||||
'ai cartoon avatar',
|
||||
@@ -43,7 +43,7 @@ export async function generateMetadata(): Promise<Metadata> {
|
||||
url: `${siteUrl}/brand/og-default.png`,
|
||||
width: 1200,
|
||||
height: 630,
|
||||
alt: 'CRE Innovations - AI Image Generate Studio',
|
||||
alt: 'CRE Innovations - AI Image Studio',
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -93,8 +93,8 @@ export default function AiImageGeneratePage() {
|
||||
{
|
||||
'@context': 'https://schema.org',
|
||||
'@type': 'CollectionPage',
|
||||
name: 'AI Image Generate & Creative Studio',
|
||||
description: 'Comprehensive directory of 40+ generative AI tools, caricatures, and artistic filters.',
|
||||
name: 'AI Image & Creative Studio',
|
||||
description: 'Comprehensive directory of generative AI tools, caricatures, and artistic filters.',
|
||||
url: `${siteUrl}/ai-image-generate`,
|
||||
mainEntity: {
|
||||
'@type': 'ItemList',
|
||||
@@ -121,7 +121,7 @@ export default function AiImageGeneratePage() {
|
||||
{
|
||||
'@type': 'ListItem',
|
||||
position: 2,
|
||||
name: 'AI Image Generate',
|
||||
name: 'AI Image',
|
||||
item: `${siteUrl}/ai-image-generate`,
|
||||
},
|
||||
],
|
||||
|
||||
@@ -63,6 +63,17 @@
|
||||
overflow-x: clip;
|
||||
}
|
||||
|
||||
html.mobile-menu-active,
|
||||
html.mobile-menu-active body {
|
||||
overflow: hidden !important;
|
||||
height: 100% !important;
|
||||
touch-action: none !important;
|
||||
}
|
||||
|
||||
html.mobile-menu-active #mobile-drawer-content {
|
||||
touch-action: pan-y !important;
|
||||
}
|
||||
|
||||
html {
|
||||
scroll-behavior: smooth;
|
||||
background-color: var(--color-paper);
|
||||
|
||||
+4
-4
@@ -9,9 +9,9 @@
|
||||
--color-error: oklch(56% 0.22 27); --color-success: oklch(58% 0.18 150);
|
||||
--container: 1720px; --gutter: 24px; --gap-columns: 28px; --section-gap-s: 120px; --section-gap: 144px; --section-gap-l: 176px;
|
||||
--z-base: 1; --z-raised: 10; --z-dropdown: 100; --z-sticky: 200; --z-sticky-nav: 300; --z-modal: 400; --z-toast: 500; --z-tooltip: 600;
|
||||
--color-paper: oklch(98% 0.006 85); --color-paper-2: oklch(95% 0.008 85); --color-paper-3: oklch(91.5% 0.012 85); --color-paper-hi: oklch(99.2% 0.006 85);
|
||||
--color-paper: #ffffff; --color-paper-2: #f8fafc; --color-paper-3: #f1f5f9; --color-paper-hi: #ffffff;
|
||||
--color-ink: oklch(18% 0.03 260); --color-ink-2: oklch(36% 0.025 260); --color-muted: oklch(52% 0.02 260);
|
||||
--color-rule: oklch(90% 0.008 260); --color-rule-2: oklch(82% 0.012 260);
|
||||
--color-rule: #f1f5f9; --color-rule-2: #e2e8f0;
|
||||
--color-accent: oklch(48% 0.26 265); --color-accent-hi: oklch(40% 0.28 268); --color-accent-soft: oklch(96% 0.02 260); --color-accent-ink: oklch(99.2% 0.006 85); --color-focus: oklch(48% 0.26 265);
|
||||
--color-gold: oklch(76% 0.16 75);
|
||||
--color-dot: color-mix(in oklab, var(--color-ink) 10%, transparent); --color-mark: color-mix(in oklab, var(--color-ink) 25%, transparent);
|
||||
@@ -20,8 +20,8 @@
|
||||
--font-body: var(--font-sf);
|
||||
--font-outlier: "SF Pro Display", "SF Pro Text", "SF Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, monospace;
|
||||
--radius-card: 24px; --radius-pill: 9999px; --rule-hair: 1px;
|
||||
--shadow-card: 0 10px 30px -10px rgba(15, 23, 42, 0.07), 0 0 0 1px rgba(15, 23, 42, 0.05);
|
||||
--shadow-sheet: 0 20px 45px -15px rgba(15, 23, 42, 0.09), 0 0 0 1px rgba(15, 23, 42, 0.06);
|
||||
--shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(0, 0, 0, 0.04);
|
||||
--shadow-sheet: 0 12px 32px -8px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(0, 0, 0, 0.04);
|
||||
--shadow-glow: 0 0 45px -10px color-mix(in oklab, var(--color-accent) 25%, transparent);
|
||||
--gradient-ambient: radial-gradient(ellipse 80% 50% at 50% -20%, color-mix(in oklab, var(--color-accent) 10%, transparent) 0%, transparent 100%);
|
||||
--tracking-display: -0.028em; --display-weight: 700;
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Metadata } from 'next';
|
||||
import { getPageConfig, getAllTools, getAllApps, getAllCategories, getSiteConfig } from '@/lib/config/loader';
|
||||
import { SectionRenderer } from '@/components/sections/SectionRenderer';
|
||||
import { notFound } from 'next/navigation';
|
||||
import { resolveLocalised } from '@/types';
|
||||
import { ToolItem, resolveLocalised } from '@/types';
|
||||
|
||||
export const dynamic = 'force-dynamic';
|
||||
export const revalidate = 0;
|
||||
@@ -75,7 +75,13 @@ export default function ToolsIndexPage() {
|
||||
if (!page) notFound();
|
||||
|
||||
const allTools = getAllTools();
|
||||
const tools = allTools.filter((t) => t.category !== 'creative-art');
|
||||
const toolGridSection = page.sections?.find((s) => s.type === 'toolGrid');
|
||||
const configuredSlugs = toolGridSection?.props?.toolSlugs as string[] | undefined;
|
||||
|
||||
const tools = configuredSlugs && Array.isArray(configuredSlugs)
|
||||
? (configuredSlugs.map((slug) => allTools.find((t) => t.slug === slug)).filter(Boolean) as ToolItem[])
|
||||
: allTools.filter((t) => t.category !== 'creative-art');
|
||||
|
||||
const apps = getAllApps();
|
||||
const categories = getAllCategories().filter((c) => c.id !== 'creative-art');
|
||||
const siteConfig = getSiteConfig();
|
||||
@@ -95,7 +101,7 @@ export default function ToolsIndexPage() {
|
||||
'@context': 'https://schema.org',
|
||||
'@type': 'CollectionPage',
|
||||
name: 'All AI Photo Tools & Creative Studio',
|
||||
description: 'Comprehensive directory of 80+ online AI vision and photo editing tools.',
|
||||
description: 'Comprehensive directory of 10 online AI vision and photo editing tools.',
|
||||
url: `${siteUrl}/tools`,
|
||||
mainEntity: {
|
||||
'@type': 'ItemList',
|
||||
|
||||
@@ -20,23 +20,19 @@ export const RainbowButton = React.forwardRef<
|
||||
>(({ children, href, className, ...props }, ref) => {
|
||||
const content = (
|
||||
<>
|
||||
{/* Chromatic Border Ring: active on hover, 0% CPU at rest */}
|
||||
{/* Crisp 1.5px Animated Rainbow Ring Strip (no outer diffuse glow) */}
|
||||
<span
|
||||
aria-hidden="true"
|
||||
className="pointer-events-none absolute inset-0 p-[2px] transition-opacity duration-300 group-hover:opacity-100"
|
||||
className="pointer-events-none absolute -inset-[1.5px] rounded-full animate-[rainbow-move_4s_linear_infinite]"
|
||||
style={{
|
||||
borderRadius: 9999,
|
||||
background: 'linear-gradient(90deg, #3b82f6, #6366f1, #ec4899, #f59e0b, #10b981, #3b82f6)',
|
||||
background: 'linear-gradient(90deg, #2563eb, #7c3aed, #ec4899, #f59e0b, #10b981, #2563eb)',
|
||||
backgroundSize: '200% 100%',
|
||||
WebkitMask: 'linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)',
|
||||
WebkitMaskComposite: 'xor',
|
||||
mask: 'linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)',
|
||||
maskComposite: 'exclude',
|
||||
}}
|
||||
/>
|
||||
{/* Inner Button Canvas */}
|
||||
<span
|
||||
className="relative z-10 flex h-full w-full items-center justify-center gap-2 bg-ink px-6 sm:px-7 py-3 text-paper-hi font-body text-sm sm:text-base font-bold shadow-md transition-colors duration-200 group-hover:bg-slate-900"
|
||||
className="relative z-10 flex h-full w-full items-center justify-center gap-2 bg-slate-950 px-6 sm:px-7 py-3 text-white font-body text-sm sm:text-base font-semibold transition-colors duration-200 group-hover:bg-slate-900"
|
||||
style={{ borderRadius: 9999 }}
|
||||
>
|
||||
{children}
|
||||
|
||||
@@ -369,7 +369,7 @@ export function HeroSection({
|
||||
<img
|
||||
src="/management/pages/home/hero_desktop.jpg"
|
||||
alt="CRE Innovations Photo Studio"
|
||||
className="w-full h-full object-cover object-[right_top] sm:object-[right_top] -translate-y-3 sm:-translate-y-5 scale-[1.03] sm:scale-[1.04] origin-top-right select-none pointer-events-none opacity-85 sm:opacity-95 brightness-[0.98] sm:brightness-[0.97]"
|
||||
className="w-full h-full object-cover object-top -translate-y-24 sm:-translate-y-36 md:-translate-y-44 scale-[1.08] sm:scale-[1.12] origin-top select-none pointer-events-none opacity-85 sm:opacity-95 brightness-[0.98] sm:brightness-[0.97]"
|
||||
loading="eager"
|
||||
decoding="sync"
|
||||
/>
|
||||
@@ -399,51 +399,51 @@ export function HeroSection({
|
||||
<div className="max-w-4xl lg:max-w-5xl xl:max-w-6xl space-y-5 sm:space-y-7 text-center mx-auto">
|
||||
|
||||
{/* Centered 2-Line Headline matching Figma:
|
||||
Line 1: Imagine Transform (Large prominent bold dark text ~80px-92px)
|
||||
Line 2: Create Impossible (Identical large font size in gradient ~80px-92px) */}
|
||||
<div className="space-y-1.5 sm:space-y-2">
|
||||
Line 1: Imagine Transform (Prominent larger bold dark text)
|
||||
Line 2: Create Impossible (Slightly smaller in vibrant bluish-purple gradient) */}
|
||||
<div className="space-y-1 sm:space-y-1.5">
|
||||
<h1 className="sr-only">Imagine Transform Create Impossible</h1>
|
||||
|
||||
{/* Line 1 - Imagine Transform */}
|
||||
<div className="text-4xl sm:text-6xl md:text-7xl lg:text-[80px] xl:text-[92px] font-display font-extrabold text-ink tracking-tight leading-[1.03] block overflow-visible">
|
||||
{/* Line 1 - Imagine Transform (Bigger than Line 2) */}
|
||||
<div className="text-4xl sm:text-6xl md:text-7xl lg:text-[84px] xl:text-[96px] font-display font-black font-[950] text-ink tracking-tight leading-[1.02] block overflow-visible">
|
||||
<AnimatedShinyText
|
||||
shimmerWidth={340}
|
||||
hoverOnly={true}
|
||||
className="font-display font-extrabold text-ink tracking-tight inline-block cursor-pointer select-none"
|
||||
className="font-display font-black font-[950] text-ink tracking-tight inline-block cursor-pointer select-none"
|
||||
>
|
||||
<span>Imagine Transform</span>
|
||||
</AnimatedShinyText>
|
||||
</div>
|
||||
|
||||
{/* Line 2 - Create Impossible (Identical font size to Line 1 matching Figma) */}
|
||||
<div className="text-4xl sm:text-6xl md:text-7xl lg:text-[80px] xl:text-[92px] font-display font-extrabold tracking-tight bg-gradient-to-r from-[#2563EB] via-[#4F46E5] to-[#7C3AED] bg-clip-text text-transparent leading-[1.03] block overflow-visible">
|
||||
{/* Line 2 - Create Impossible (A little smaller than Line 1 according to UI) */}
|
||||
<div className="text-3xl sm:text-5xl md:text-6xl lg:text-[72px] xl:text-[82px] font-display font-extrabold tracking-tight bg-gradient-to-r from-[#2563EB] via-[#4F46E5] to-[#7C3AED] bg-clip-text text-transparent leading-[1.04] block overflow-visible">
|
||||
Create Impossible
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Subtitle - Centered matching Figma */}
|
||||
{/* Subtitle - Strictly forced into two lines across all devices */}
|
||||
<BlurFade delay={0.16}>
|
||||
<div className="max-w-2xl mx-auto px-2">
|
||||
<p className="text-base sm:text-lg md:text-xl text-ink-2 font-body font-normal leading-relaxed text-pretty">
|
||||
Turn ordinary moments into extraordinary visual art. Instant and private photo transformation right in your browser with hardware acceleration.
|
||||
<div className="max-w-2xl sm:max-w-3xl mx-auto px-2">
|
||||
<p className="text-sm sm:text-base md:text-lg lg:text-xl text-ink-2 font-body font-normal leading-relaxed">
|
||||
<span className="block whitespace-normal sm:whitespace-nowrap">
|
||||
Turn ordinary moments into extraordinary visual art. Instant and private
|
||||
</span>
|
||||
<span className="block whitespace-normal sm:whitespace-nowrap">
|
||||
photo transformation right in your browser with hardware acceleration.
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
</BlurFade>
|
||||
|
||||
{/* Centered Action Buttons matching Figma:
|
||||
Button 1: Black Pill with subtle rainbow border "Explore our tools ->"
|
||||
Button 1: Black Pill with glowing rainbow ring "Explore our tools ->"
|
||||
Button 2: Clean White Pill "• Mobile studio apps" */}
|
||||
<BlurFade delay={0.24}>
|
||||
<div className="flex flex-col sm:flex-row items-center justify-center gap-3.5 pt-2">
|
||||
<Link
|
||||
href={primaryCtaHref}
|
||||
className="group relative p-[1px] rounded-full bg-gradient-to-r from-blue-500 via-indigo-500 to-purple-500 hover:from-blue-600 hover:to-purple-600 shadow-md active:scale-95 transition-all inline-flex w-full sm:w-auto"
|
||||
>
|
||||
<span className="inline-flex items-center justify-center gap-2 px-7 py-3 rounded-full bg-slate-950 hover:bg-slate-900 text-white font-body font-semibold text-sm transition-colors w-full sm:w-auto">
|
||||
<span>{primaryCtaLabel}</span>
|
||||
<ArrowRight className="w-4 h-4 group-hover:translate-x-0.5 transition-transform" aria-hidden="true" />
|
||||
</span>
|
||||
</Link>
|
||||
<RainbowButton href={primaryCtaHref} className="w-full sm:w-auto">
|
||||
<span>{primaryCtaLabel}</span>
|
||||
<ArrowRight className="w-4 h-4 ml-0.5 inline" aria-hidden="true" />
|
||||
</RainbowButton>
|
||||
|
||||
<Link
|
||||
href={secondaryCtaHref}
|
||||
|
||||
@@ -6,6 +6,7 @@ import { ArrowRight } from 'lucide-react';
|
||||
import { ToolItem } from '@/types';
|
||||
import { KineticText } from '@/components/magicui/kinetic-text';
|
||||
import { AnimatedShinyText } from '@/components/magicui/animated-shiny-text';
|
||||
import { RainbowButton } from '@/components/magicui/rainbow-button';
|
||||
|
||||
export interface ToolMediaItem {
|
||||
id: string;
|
||||
@@ -107,15 +108,6 @@ export function ShiftableToolsGridSection({
|
||||
|
||||
return (
|
||||
<section id="our-tools" className="py-8 sm:py-12 px-4 sm:px-6 md:px-8 lg:px-10 bg-paper relative overflow-hidden">
|
||||
{/* Studio Lighting Ambient Glow */}
|
||||
<div
|
||||
className="pointer-events-none absolute top-10 left-10 w-[550px] h-[350px] [background:radial-gradient(circle_at_center,color-mix(in_oklab,var(--color-accent)_10%,transparent)_0%,transparent_70%)]"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
<div
|
||||
className="pointer-events-none absolute bottom-10 right-10 w-[550px] h-[350px] [background:radial-gradient(circle_at_center,color-mix(in_oklab,var(--color-ink)_6%,transparent)_0%,transparent_70%)]"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
<div
|
||||
className="pointer-events-none absolute inset-0 opacity-20 studio-proof-grid"
|
||||
aria-hidden="true"
|
||||
@@ -152,17 +144,12 @@ export function ShiftableToolsGridSection({
|
||||
<MobileVerticalToolsList items={displayItems} />
|
||||
</div>
|
||||
|
||||
{/* Centered "View All AI Tool Directory ->" button matching Figma */}
|
||||
{/* Centered "View All AI Tool Directory ->" button with glowing rainbow ring */}
|
||||
<div className="pt-8 flex justify-center">
|
||||
<Link
|
||||
href="/tools"
|
||||
className="group relative p-[1px] rounded-full bg-gradient-to-r from-blue-500 via-indigo-500 to-purple-500 hover:from-blue-600 hover:to-purple-600 shadow-md active:scale-95 transition-all inline-flex"
|
||||
>
|
||||
<span className="inline-flex items-center justify-center gap-2 px-7 py-3 rounded-full bg-slate-950 hover:bg-slate-900 text-white font-body font-semibold text-xs sm:text-sm transition-colors">
|
||||
<span>View All AI Tool Directory</span>
|
||||
<ArrowRight className="w-4 h-4 group-hover:translate-x-0.5 transition-transform" aria-hidden="true" />
|
||||
</span>
|
||||
</Link>
|
||||
<RainbowButton href="/tools">
|
||||
<span>View All AI Tool Directory</span>
|
||||
<ArrowRight className="w-4 h-4 ml-0.5 inline" aria-hidden="true" />
|
||||
</RainbowButton>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -22,7 +22,7 @@ export function StatsSection({
|
||||
const displayItems = items && items.length > 0 ? items : defaultItems;
|
||||
|
||||
return (
|
||||
<section id="stats-section" className="py-14 sm:py-20 bg-white relative overflow-hidden">
|
||||
<section id="stats-section" className="py-14 sm:py-20 bg-slate-50/50 relative overflow-hidden">
|
||||
<div className="max-w-container mx-auto px-4 sm:px-6 lg:px-8 relative z-10">
|
||||
|
||||
{/* Section Heading matching Figma */}
|
||||
@@ -32,21 +32,47 @@ export function StatsSection({
|
||||
</h2>
|
||||
</div>
|
||||
|
||||
{/* 4 Gradient Stat Cards matching Figma */}
|
||||
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6 sm:gap-7">
|
||||
{/* 4 Gradient Stat Cards matching Figma with strong white glow/shadow below */}
|
||||
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6 sm:gap-7 pb-12">
|
||||
{displayItems.map((stat, idx) => (
|
||||
<div
|
||||
key={idx}
|
||||
className="relative rounded-[28px] bg-gradient-to-b from-[#2563EB] via-[#3B82F6] to-[#60A5FA] py-14 sm:py-16 px-6 flex flex-col items-center justify-center text-center shadow-lg shadow-blue-500/15 hover:shadow-2xl hover:shadow-blue-500/25 transition-all duration-300 group hover:-translate-y-1.5"
|
||||
>
|
||||
{/* Stat Value */}
|
||||
<div className="text-white font-display font-bold text-4xl sm:text-[46px] lg:text-[50px] tracking-tight leading-none mb-6 drop-shadow-sm">
|
||||
{stat.value}
|
||||
</div>
|
||||
<div key={idx} className="relative group">
|
||||
{/* Very Prominent Radiant Pure White Glow & Shadow Pill Underneath the Card */}
|
||||
<div
|
||||
className="absolute -bottom-10 inset-x-0 h-28 bg-white rounded-full blur-2xl opacity-100 group-hover:scale-110 transition-all duration-300 pointer-events-none z-0 shadow-[0_25px_50px_25px_rgba(255,255,255,1)]"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
<div
|
||||
className="absolute -bottom-6 inset-x-4 h-20 bg-white rounded-full blur-xl opacity-100 pointer-events-none z-0 shadow-[0_15px_30px_15px_rgba(255,255,255,1)]"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
<div
|
||||
className="absolute -bottom-3 inset-x-8 h-12 bg-white rounded-full blur-md opacity-100 pointer-events-none z-0"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
|
||||
{/* White Pill Badge with Blue Label */}
|
||||
<div className="inline-flex items-center justify-center px-7 py-2.5 rounded-full bg-white text-[#2563EB] font-body font-bold text-sm sm:text-base shadow-sm">
|
||||
<span>{stat.label}</span>
|
||||
{/* Card Container with Emerging From White Fade Gradient Effect */}
|
||||
<div
|
||||
className="relative z-10 rounded-[28px] bg-gradient-to-b from-[#2563EB] via-[#3B82F6] to-[#60A5FA] py-14 sm:py-16 px-6 flex flex-col items-center justify-center text-center shadow-[0_15px_30px_-5px_rgba(37,99,235,0.25),0_25px_50px_10px_rgba(255,255,255,1)] hover:shadow-[0_20px_40px_-5px_rgba(37,99,235,0.35),0_30px_60px_15px_rgba(255,255,255,1)] transition-all duration-300 hover:-translate-y-1.5 overflow-hidden"
|
||||
>
|
||||
{/* Emerging from White Fade: bottom intense white fade overlay */}
|
||||
<div
|
||||
className="absolute inset-x-0 bottom-0 h-44 bg-gradient-to-t from-white/60 via-white/25 via-60% to-transparent pointer-events-none"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
<div
|
||||
className="absolute inset-x-0 bottom-0 h-20 bg-gradient-to-t from-white/40 to-transparent pointer-events-none"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
|
||||
{/* Stat Value */}
|
||||
<div className="relative z-10 text-white font-display font-bold text-4xl sm:text-[46px] lg:text-[50px] tracking-tight leading-none mb-6 drop-shadow-sm">
|
||||
{stat.value}
|
||||
</div>
|
||||
|
||||
{/* White Pill Badge with Blue Label and strong bottom white shadow */}
|
||||
<div className="relative z-10 inline-flex items-center justify-center px-7 py-2.5 rounded-full bg-white text-[#2563EB] font-body font-bold text-sm sm:text-base shadow-[0_12px_28px_rgba(255,255,255,0.95),0_4px_12px_rgba(0,0,0,0.12)]">
|
||||
<span>{stat.label}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -122,17 +122,7 @@ export function TrendyBentoSection({
|
||||
};
|
||||
|
||||
return (
|
||||
<section id="trendy-effects" className="py-10 sm:py-16 px-4 sm:px-6 md:px-8 lg:px-10 bg-paper relative overflow-hidden">
|
||||
{/* Studio Lighting Ambient Glow */}
|
||||
<div
|
||||
className="pointer-events-none absolute bottom-0 right-1/4 w-[500px] h-[350px] [background:radial-gradient(circle_at_center,color-mix(in_oklab,var(--color-accent)_10%,transparent)_0%,transparent_70%)]"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
<div
|
||||
className="pointer-events-none absolute inset-0 opacity-20 studio-proof-grid"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
|
||||
<section id="trendy-effects" className="py-10 sm:py-16 px-4 sm:px-6 md:px-8 lg:px-10 bg-white relative overflow-hidden">
|
||||
<div className="max-w-container mx-auto space-y-6 relative z-10">
|
||||
{/* Header with Title on Left, and View All on Right matching Figma */}
|
||||
<div className="flex flex-col sm:flex-row sm:items-end justify-between gap-4 pb-1">
|
||||
@@ -158,7 +148,7 @@ export function TrendyBentoSection({
|
||||
{/* View All Button */}
|
||||
<Link
|
||||
href="/tools"
|
||||
className="group inline-flex items-center gap-1.5 px-4 py-2 rounded-full border border-rule/80 hover:border-ink bg-paper-hi text-ink text-xs font-semibold shadow-2xs transition-all active:scale-95"
|
||||
className="group inline-flex items-center gap-1.5 px-4 py-2 rounded-full border border-slate-200 hover:border-ink bg-white text-ink text-xs font-semibold shadow-2xs transition-all active:scale-95"
|
||||
>
|
||||
<span>View All</span>
|
||||
<ArrowRight className="w-3.5 h-3.5 group-hover:translate-x-0.5 transition-transform" aria-hidden="true" />
|
||||
@@ -166,22 +156,22 @@ export function TrendyBentoSection({
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Specimen Tiles Horizontal Scrolling Row with Buttons at Both Ends */}
|
||||
{/* Specimen Tiles Horizontal Row with Buttons at Both Sides and Hidden Scrollbar */}
|
||||
<div className="relative group/carousel">
|
||||
{/* Navigation Button at Left End */}
|
||||
{/* Navigation Button at Left Side */}
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => scroll('left')}
|
||||
className="absolute -left-2 sm:-left-5 top-1/2 -translate-y-1/2 z-30 w-10 h-10 sm:w-11 sm:h-11 rounded-full bg-paper-hi/95 hover:bg-paper-2 backdrop-blur-md border border-rule/80 hover:border-accent text-ink hover:text-accent shadow-md hover:shadow-lg flex items-center justify-center hover:scale-110 active:scale-95 transition-all"
|
||||
className="absolute -left-2 sm:-left-5 top-1/2 -translate-y-1/2 z-30 w-10 h-10 sm:w-11 sm:h-11 rounded-full bg-white hover:bg-slate-50 border border-slate-200 hover:border-accent text-slate-800 hover:text-accent shadow-md hover:shadow-lg flex items-center justify-center hover:scale-110 active:scale-95 transition-all cursor-pointer"
|
||||
aria-label="Scroll left"
|
||||
>
|
||||
<ChevronLeft className="w-5 h-5" aria-hidden="true" />
|
||||
</button>
|
||||
|
||||
{/* Horizontal Scrolling Track */}
|
||||
{/* Horizontal Scrolling Track - Scroller/Scrollbar hidden completely */}
|
||||
<div
|
||||
ref={scrollRef}
|
||||
className="flex items-stretch gap-5 sm:gap-6 overflow-x-auto pb-4 pt-1 scrollbar-none snap-x snap-mandatory scroll-smooth px-1"
|
||||
className="flex items-stretch gap-5 sm:gap-6 overflow-x-auto pb-4 pt-1 snap-x snap-mandatory scroll-smooth px-1 no-scrollbar [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden"
|
||||
>
|
||||
{tiles.map((tile) => {
|
||||
const Icon = tile.icon;
|
||||
@@ -190,10 +180,10 @@ export function TrendyBentoSection({
|
||||
<Link
|
||||
key={tile.id}
|
||||
href={tile.href}
|
||||
className="w-[280px] sm:w-[320px] shrink-0 snap-start studio-sheet p-4 rounded-3xl bg-paper-hi border border-rule shadow-sheet hover:border-accent hover:shadow-glow flex flex-col justify-between group motion-safe:transition-[border-color,box-shadow,transform] duration-200"
|
||||
className="w-[260px] sm:w-[275px] md:w-[285px] lg:w-[290px] shrink-0 snap-start p-4 rounded-3xl bg-white border border-slate-200/80 hover:border-accent hover:shadow-[0_12px_32px_-10px_rgba(37,99,235,0.18)] flex flex-col justify-between group motion-safe:transition-[border-color,box-shadow,transform] duration-200 min-h-[420px] sm:min-h-[440px]"
|
||||
>
|
||||
{/* Image Specimen */}
|
||||
<div className="relative aspect-[4/3] rounded-2xl overflow-hidden bg-paper-2 border border-rule mb-3.5">
|
||||
{/* Image Specimen 1:1 Aspect Ratio */}
|
||||
<div className="relative aspect-square w-full rounded-2xl overflow-hidden bg-slate-50 border border-slate-100 mb-3.5 shrink-0">
|
||||
<img
|
||||
src={tile.imageUrl}
|
||||
alt={tile.name}
|
||||
@@ -203,20 +193,20 @@ export function TrendyBentoSection({
|
||||
</div>
|
||||
|
||||
{/* Details */}
|
||||
<div className="space-y-2 px-1 flex-1 flex flex-col justify-between">
|
||||
<div className="space-y-2.5 px-0.5 flex-1 flex flex-col justify-between">
|
||||
<div>
|
||||
<div className="flex items-center gap-2 mb-1">
|
||||
<Icon className="w-4 h-4 text-accent" aria-hidden="true" />
|
||||
<h3 className="text-base font-body font-bold text-ink">
|
||||
<div className="flex items-center gap-2 mb-1.5">
|
||||
<Icon className="w-4 h-4 text-accent shrink-0" aria-hidden="true" />
|
||||
<h3 className="text-base font-body font-bold text-ink leading-snug">
|
||||
<AnimatedShinyText>{tile.name}</AnimatedShinyText>
|
||||
</h3>
|
||||
</div>
|
||||
<p className="text-xs text-muted leading-relaxed font-body line-clamp-2">
|
||||
<p className="text-xs sm:text-sm text-muted leading-relaxed font-body line-clamp-2">
|
||||
{tile.description}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className="pt-2.5 mt-2 border-t border-rule flex items-center justify-between text-xs font-body font-semibold text-accent">
|
||||
<div className="pt-3 mt-2 border-t border-slate-100 flex items-center justify-between text-xs sm:text-sm font-body font-semibold text-accent">
|
||||
<span>{tile.cta}</span>
|
||||
<ArrowRight className="w-4 h-4 motion-safe:transition-transform group-hover:translate-x-1" aria-hidden="true" />
|
||||
</div>
|
||||
@@ -226,11 +216,11 @@ export function TrendyBentoSection({
|
||||
})}
|
||||
</div>
|
||||
|
||||
{/* Navigation Button at Right End */}
|
||||
{/* Navigation Button at Right Side */}
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => scroll('right')}
|
||||
className="absolute -right-2 sm:-right-5 top-1/2 -translate-y-1/2 z-30 w-10 h-10 sm:w-11 sm:h-11 rounded-full bg-paper-hi/95 hover:bg-paper-2 backdrop-blur-md border border-rule/80 hover:border-accent text-ink hover:text-accent shadow-md hover:shadow-lg flex items-center justify-center hover:scale-110 active:scale-95 transition-all"
|
||||
className="absolute -right-2 sm:-right-5 top-1/2 -translate-y-1/2 z-30 w-10 h-10 sm:w-11 sm:h-11 rounded-full bg-white hover:bg-slate-50 border border-slate-200 hover:border-accent text-slate-800 hover:text-accent shadow-md hover:shadow-lg flex items-center justify-center hover:scale-110 active:scale-95 transition-all cursor-pointer"
|
||||
aria-label="Scroll right"
|
||||
>
|
||||
<ChevronRight className="w-5 h-5" aria-hidden="true" />
|
||||
|
||||
+112
-62
@@ -1,6 +1,6 @@
|
||||
'use client';
|
||||
|
||||
import React, { useState, useEffect, useRef } from 'react';
|
||||
import React, { useState, useEffect, useRef, useMemo } from 'react';
|
||||
import Link from 'next/link';
|
||||
import { usePathname } from 'next/navigation';
|
||||
import {
|
||||
@@ -26,50 +26,56 @@ interface NavbarProps {
|
||||
totalToolsCount?: number;
|
||||
}
|
||||
|
||||
// AI Tools dropdown — 4 columns, text-only items matching Figma
|
||||
const AI_TOOLS_DROPDOWN = {
|
||||
columns: [
|
||||
{
|
||||
heading: 'Portrait Retouch',
|
||||
items: [
|
||||
{ slug: 'blemish-remover', title: 'Blemish Remover' },
|
||||
{ slug: 'eye-bag-remover', title: 'Eye Bag Remover' },
|
||||
{ slug: 'teeth-whitener', title: 'Teeth Whitener' },
|
||||
{ slug: 'studio-headshots', title: 'Studio Headshots' },
|
||||
],
|
||||
},
|
||||
{
|
||||
heading: 'Skin & Hair',
|
||||
items: [
|
||||
{ slug: 'hair-color-changer', title: 'Hair Color Changer' },
|
||||
{ slug: 'hair-style-changer', title: 'Hair Style Changer' },
|
||||
{ slug: 'eye-color-changer', title: 'Eye Color Changer' },
|
||||
{ slug: 'eye-redness-remover', title: 'Eye Redness Remover' },
|
||||
],
|
||||
},
|
||||
{
|
||||
heading: 'Photo Restoration',
|
||||
items: [
|
||||
{ slug: 'photo-enhancer', title: 'Photo Enhancer' },
|
||||
{ slug: 'old-photo-restorer', title: 'Old Photo Restorer' },
|
||||
{ slug: 'colorization', title: 'Colorization' },
|
||||
{ slug: 'vintage-look', title: 'Vintage Look' },
|
||||
],
|
||||
},
|
||||
{
|
||||
heading: 'Cutout & Eraser',
|
||||
items: [
|
||||
{ slug: 'background-remover', title: 'Background Remover' },
|
||||
{ slug: 'object-eraser', title: 'Object Eraser' },
|
||||
{ slug: 'background-with-depth', title: 'Background Depth' },
|
||||
{ slug: 'studio-relighting', title: 'Studio Relighting' },
|
||||
],
|
||||
},
|
||||
],
|
||||
};
|
||||
interface DropdownItem {
|
||||
slug: string;
|
||||
title: string;
|
||||
}
|
||||
|
||||
interface DropdownColumn {
|
||||
heading: string;
|
||||
items: DropdownItem[];
|
||||
}
|
||||
|
||||
interface DropdownData {
|
||||
columns: DropdownColumn[];
|
||||
}
|
||||
|
||||
// 10 Curated AI Tools default layout matching the tools suite
|
||||
const AI_TOOLS_DEFAULT_COLUMNS: DropdownColumn[] = [
|
||||
{
|
||||
heading: 'Restoration & Enhancement',
|
||||
items: [
|
||||
{ slug: 'photo-enhancer', title: 'Image Enhancer' },
|
||||
{ slug: 'old-photo-restorer', title: 'Restore Old Photos' },
|
||||
{ slug: 'colorization', title: 'Colorize Photo' },
|
||||
],
|
||||
},
|
||||
{
|
||||
heading: 'Cutout & Object Eraser',
|
||||
items: [
|
||||
{ slug: 'background-remover', title: 'Remove Background' },
|
||||
{ slug: 'object-eraser', title: 'Object Remover' },
|
||||
],
|
||||
},
|
||||
{
|
||||
heading: 'Skin & Beauty Retouch',
|
||||
items: [
|
||||
{ slug: 'blemish-remover', title: 'Blemish Remover' },
|
||||
{ slug: 'teeth-whitener', title: 'Teeth Whitener' },
|
||||
{ slug: 'face-swap', title: 'Face Swapper' },
|
||||
],
|
||||
},
|
||||
{
|
||||
heading: 'Hair & Fashion',
|
||||
items: [
|
||||
{ slug: 'hair-color-changer', title: 'Hair Color Changer' },
|
||||
{ slug: 'dress-changer', title: 'Dress Changer' },
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
// AI Image Generate dropdown — 4 columns, text-only items matching Figma
|
||||
const AI_IMAGE_GENERATE_DROPDOWN = {
|
||||
const AI_IMAGE_GENERATE_DROPDOWN: DropdownData = {
|
||||
columns: [
|
||||
{
|
||||
heading: 'Generative Art',
|
||||
@@ -99,12 +105,12 @@ const AI_IMAGE_GENERATE_DROPDOWN = {
|
||||
],
|
||||
},
|
||||
{
|
||||
heading: 'Face & Fashion',
|
||||
heading: 'Face & Expression Art',
|
||||
items: [
|
||||
{ slug: 'face-swap', title: 'Face Swap' },
|
||||
{ slug: 'cartoon-avatar', title: '3D Cartoon' },
|
||||
{ slug: 'dress-changer', title: 'Dress Changer' },
|
||||
{ slug: 'facial-expressions', title: 'Facial Expressions' },
|
||||
{ slug: 'cartoon-avatar', title: '3D Cartoon' },
|
||||
{ slug: 'avatar-original-face', title: 'Stylized Avatar' },
|
||||
{ slug: 'caricature-hair-face', title: 'Caricature Face' },
|
||||
],
|
||||
},
|
||||
],
|
||||
@@ -120,6 +126,38 @@ export function Navbar({ config, currentLocale, categories = [], tools = [] }: N
|
||||
const closeTimerRef = useRef<NodeJS.Timeout | null>(null);
|
||||
const navRef = useRef<HTMLElement>(null);
|
||||
|
||||
// Dynamically resolve AI Tools dropdown from site config and loaded tools collection
|
||||
const toolsDropdownData: DropdownData = useMemo(() => {
|
||||
const configuredCols = (config as any)?.nav?.toolsDropdown?.columns || (config as any)?.toolsDropdown?.columns;
|
||||
if (configuredCols && Array.isArray(configuredCols)) {
|
||||
return {
|
||||
columns: configuredCols.map((col: any): DropdownColumn => ({
|
||||
heading: col.heading,
|
||||
items: (col.slugs || []).map((slug: string): DropdownItem => {
|
||||
const tool = tools?.find((t) => t.slug === slug);
|
||||
return {
|
||||
slug,
|
||||
title: tool ? resolveLocalised(tool.name, currentLocale) : slug,
|
||||
};
|
||||
}),
|
||||
})),
|
||||
};
|
||||
}
|
||||
// Fallback: strictly render the 10 curated tools with dynamic localized title resolution
|
||||
return {
|
||||
columns: AI_TOOLS_DEFAULT_COLUMNS.map((col): DropdownColumn => ({
|
||||
heading: col.heading,
|
||||
items: col.items.map((item): DropdownItem => {
|
||||
const tool = tools?.find((t) => t.slug === item.slug);
|
||||
return {
|
||||
slug: item.slug,
|
||||
title: tool ? resolveLocalised(tool.name, currentLocale) : item.title,
|
||||
};
|
||||
}),
|
||||
})),
|
||||
};
|
||||
}, [config, tools, currentLocale]);
|
||||
|
||||
// Detect scroll to elevate glass opacity
|
||||
useEffect(() => {
|
||||
const handleScroll = () => {
|
||||
@@ -159,18 +197,24 @@ export function Navbar({ config, currentLocale, categories = [], tools = [] }: N
|
||||
setMobileMenuOpen(false);
|
||||
}, [pathname]);
|
||||
|
||||
// Lock body scroll on mobile drawer
|
||||
// Universal mobile drawer scroll-lock
|
||||
useEffect(() => {
|
||||
if (mobileMenuOpen) {
|
||||
document.body.style.overflow = 'hidden';
|
||||
document.body.style.touchAction = 'none';
|
||||
} else {
|
||||
document.body.style.overflow = '';
|
||||
document.body.style.touchAction = '';
|
||||
}
|
||||
if (!mobileMenuOpen) return;
|
||||
|
||||
// Prevent touchmoves outside the drawer menu
|
||||
const preventDefaultTouch = (e: TouchEvent) => {
|
||||
const target = e.target as HTMLElement | null;
|
||||
if (!target?.closest('#mobile-drawer-content')) {
|
||||
e.preventDefault();
|
||||
}
|
||||
};
|
||||
|
||||
document.documentElement.classList.add('mobile-menu-active');
|
||||
document.addEventListener('touchmove', preventDefaultTouch, { passive: false });
|
||||
|
||||
return () => {
|
||||
document.body.style.overflow = '';
|
||||
document.body.style.touchAction = '';
|
||||
document.documentElement.classList.remove('mobile-menu-active');
|
||||
document.removeEventListener('touchmove', preventDefaultTouch);
|
||||
};
|
||||
}, [mobileMenuOpen]);
|
||||
|
||||
@@ -212,8 +256,10 @@ export function Navbar({ config, currentLocale, categories = [], tools = [] }: N
|
||||
|
||||
return (
|
||||
<header
|
||||
className={`sticky top-0 left-0 right-0 w-full z-40 motion-safe:transition-[background-color,border-color,box-shadow] duration-200 bg-paper ${
|
||||
scrolled
|
||||
className={`sticky top-0 left-0 right-0 w-full motion-safe:transition-[background-color,border-color,box-shadow] duration-200 bg-paper ${
|
||||
mobileMenuOpen ? 'z-50' : 'z-40'
|
||||
} ${
|
||||
scrolled || mobileMenuOpen
|
||||
? 'border-b border-rule shadow-[0_2px_16px_-4px_color-mix(in_oklab,var(--color-ink)_6%,transparent)] md:bg-paper/95 md:backdrop-blur-xl'
|
||||
: 'border-b border-transparent shadow-none md:bg-paper'
|
||||
}`}
|
||||
@@ -236,7 +282,7 @@ export function Navbar({ config, currentLocale, categories = [], tools = [] }: N
|
||||
const isGenerateLink = link.href === '/ai-image-generate' || link.label.toLowerCase().includes('image');
|
||||
const dropdownType = isToolsLink ? 'tools' : isGenerateLink ? 'generate' : null;
|
||||
const isOpen = openDropdown === dropdownType;
|
||||
const dropdownData = dropdownType === 'tools' ? AI_TOOLS_DROPDOWN : AI_IMAGE_GENERATE_DROPDOWN;
|
||||
const dropdownData = dropdownType === 'tools' ? toolsDropdownData : AI_IMAGE_GENERATE_DROPDOWN;
|
||||
|
||||
if (dropdownType) {
|
||||
return (
|
||||
@@ -377,7 +423,11 @@ export function Navbar({ config, currentLocale, categories = [], tools = [] }: N
|
||||
|
||||
{/* Mobile Drawer Overlay */}
|
||||
{mobileMenuOpen && (
|
||||
<div className="md:hidden fixed inset-x-0 top-[65px] bottom-0 z-50 bg-paper border-t border-rule px-5 py-6 flex flex-col justify-between overflow-y-auto">
|
||||
<div
|
||||
id="mobile-drawer-content"
|
||||
className="md:hidden fixed inset-x-0 top-[65px] bottom-0 z-50 bg-paper border-t border-rule px-5 py-6 flex flex-col justify-between overflow-y-auto overscroll-contain"
|
||||
style={{ overscrollBehavior: 'contain', WebkitOverflowScrolling: 'touch' }}
|
||||
>
|
||||
<nav className="flex flex-col space-y-2.5">
|
||||
<span className="text-xs font-body font-semibold text-muted px-2 py-1">Navigation</span>
|
||||
{navLinks.map((link, idx) => {
|
||||
@@ -386,7 +436,7 @@ export function Navbar({ config, currentLocale, categories = [], tools = [] }: N
|
||||
const isGenerateLink = link.href === '/ai-image-generate' || link.label.toLowerCase().includes('image');
|
||||
const dropdownType = isToolsLink ? 'tools' : isGenerateLink ? 'generate' : null;
|
||||
const isExpanded = mobileExpanded === dropdownType;
|
||||
const mobileDropData = dropdownType === 'tools' ? AI_TOOLS_DROPDOWN : AI_IMAGE_GENERATE_DROPDOWN;
|
||||
const mobileDropData = dropdownType === 'tools' ? toolsDropdownData : AI_IMAGE_GENERATE_DROPDOWN;
|
||||
|
||||
return (
|
||||
<div key={`${link.href}-${idx}`} className="space-y-1">
|
||||
|
||||
Reference in New Issue
Block a user