feat: rebrand to CRE Innovations, enhance ultra-smooth UI and mobile responsiveness

This commit is contained in:
2026-11-03 12:31:06 +05:30
parent fa2eca3643
commit 7e137d88bc
37 changed files with 434 additions and 343 deletions
+30 -20
View File
@@ -1,6 +1,7 @@
'use client';
import React, { useState, useRef, useCallback, useEffect } from 'react';
import { Eye, Sparkles } from 'lucide-react';
interface BeforeAfterSliderProps {
beforeUrl: string;
@@ -15,9 +16,9 @@ export function BeforeAfterSlider({
beforeUrl,
afterUrl,
beforeLabel = 'Original',
afterLabel = 'AI Result',
afterLabel = 'CRE AI Result',
caption,
aspectRatio = 'aspect-[4/3]',
aspectRatio = 'aspect-[4/3] sm:aspect-[16/10]',
}: BeforeAfterSliderProps) {
const [sliderPosition, setSliderPosition] = useState(50);
const [isDragging, setIsDragging] = useState(false);
@@ -47,9 +48,9 @@ export function BeforeAfterSlider({
useEffect(() => {
if (isDragging) {
window.addEventListener('mousemove', handleMouseMove);
window.addEventListener('mousemove', handleMouseMove, { passive: true });
window.addEventListener('mouseup', handleMouseUp);
window.addEventListener('touchmove', handleTouchMove);
window.addEventListener('touchmove', handleTouchMove, { passive: true });
window.addEventListener('touchend', handleMouseUp);
}
return () => {
@@ -66,58 +67,67 @@ export function BeforeAfterSlider({
ref={containerRef}
onMouseDown={() => setIsDragging(true)}
onTouchStart={() => setIsDragging(true)}
className={`relative w-full ${aspectRatio} rounded-2xl overflow-hidden select-none cursor-ew-resize shadow-lg border border-slate-200 dark:border-slate-800 bg-slate-950`}
className={`relative w-full ${aspectRatio} rounded-2xl sm:rounded-3xl overflow-hidden select-none cursor-ew-resize shadow-2xl border border-slate-200/80 dark:border-slate-800/80 bg-slate-950 group`}
>
{/* After Image (Background) */}
{/* eslint-disable-next-line @next/next/no-img-element */}
<img
src={afterUrl}
alt="After result"
className="absolute inset-0 w-full h-full object-cover pointer-events-none"
loading="eager"
className="absolute inset-0 w-full h-full object-cover pointer-events-none will-change-transform"
/>
{/* Before Image (Clipped) */}
{/* Before Image (Clipped Left side) */}
<div
className="absolute inset-0 overflow-hidden pointer-events-none"
className="absolute inset-0 overflow-hidden pointer-events-none will-change-transform"
style={{ clipPath: `polygon(0 0, ${sliderPosition}% 0, ${sliderPosition}% 100%, 0 100%)` }}
>
{/* eslint-disable-next-line @next/next/no-img-element */}
<img
src={beforeUrl}
alt="Before result"
loading="eager"
className="absolute inset-0 w-full h-full object-cover"
/>
</div>
{/* Split Divider Line */}
{/* Split Divider Line with Glow */}
<div
className="absolute top-0 bottom-0 w-0.5 bg-white shadow-[0_0_10px_rgba(0,0,0,0.5)] z-20 pointer-events-none"
className="absolute top-0 bottom-0 w-1 bg-white shadow-[0_0_15px_rgba(37,99,235,0.8)] z-20 pointer-events-none will-change-transform"
style={{ left: `${sliderPosition}%` }}
>
{/* Center Handle */}
<div className="absolute top-1/2 -translate-y-1/2 -translate-x-1/2 w-8 h-8 rounded-full bg-white dark:bg-slate-900 border-2 border-blue-600 shadow-md flex items-center justify-center pointer-events-auto cursor-ew-resize">
{/* Center Circular Touch/Mouse Handle */}
<div className="absolute top-1/2 -translate-y-1/2 -translate-x-1/2 w-9 h-9 sm:w-10 sm:h-10 rounded-full bg-white dark:bg-slate-900 border-2 border-blue-600 shadow-xl flex items-center justify-center pointer-events-auto cursor-ew-resize hover:scale-110 active:scale-95 transition-transform duration-150">
<svg
className="w-4 h-4 text-blue-600"
className="w-4 h-4 text-blue-600 dark:text-blue-400"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
>
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M8 9l4-4 4 4m0 6l-4 4-4-4" />
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2.5} d="M8 9l-3 3 3 3m8-6l3 3-3 3" />
</svg>
</div>
</div>
{/* Floating Labels */}
<div className="absolute top-3 left-3 bg-black/60 backdrop-blur-md px-2.5 py-1 rounded-md text-xs font-semibold text-white pointer-events-none z-10">
{beforeLabel}
{/* Floating Badges */}
<div className="absolute top-3 left-3 sm:top-4 sm:left-4 bg-slate-950/70 backdrop-blur-md px-3 py-1.5 rounded-xl text-[11px] sm:text-xs font-bold text-white border border-white/10 pointer-events-none z-10 flex items-center space-x-1.5">
<Eye className="w-3.5 h-3.5 text-slate-300" />
<span>{beforeLabel}</span>
</div>
<div className="absolute top-3 right-3 bg-blue-600/90 backdrop-blur-md px-2.5 py-1 rounded-md text-xs font-semibold text-white pointer-events-none z-10">
{afterLabel}
<div className="absolute top-3 right-3 sm:top-4 sm:right-4 bg-gradient-to-r from-blue-600/90 to-cyan-500/90 backdrop-blur-md px-3 py-1.5 rounded-xl text-[11px] sm:text-xs font-bold text-white shadow-lg shadow-blue-500/25 border border-white/20 pointer-events-none z-10 flex items-center space-x-1.5">
<Sparkles className="w-3.5 h-3.5 text-white" />
<span>{afterLabel}</span>
</div>
{/* Bottom Helper Hint */}
<div className="absolute bottom-3 left-1/2 -translate-x-1/2 bg-black/40 backdrop-blur-md px-3 py-1 rounded-full text-[10px] text-white/80 pointer-events-none opacity-0 group-hover:opacity-100 transition-opacity duration-200">
Drag horizontally to compare
</div>
</div>
{caption && (
<p className="mt-2 text-center text-xs text-slate-500 dark:text-slate-400">
<p className="mt-2.5 text-center text-xs font-medium text-slate-500 dark:text-slate-400">
{caption}
</p>
)}
+39 -38
View File
@@ -1,6 +1,6 @@
import React from 'react';
import Link from 'next/link';
import { Sparkles, Shield, Heart } from 'lucide-react';
import { ShieldCheck, Heart, ArrowUpRight } from 'lucide-react';
import { SiteConfig, resolveLocalised } from '@/types';
interface FooterProps {
@@ -10,75 +10,76 @@ interface FooterProps {
export function Footer({ config, currentLocale }: FooterProps) {
return (
<footer className="bg-slate-50 dark:bg-slate-950 border-t border-slate-200 dark:border-slate-800 transition-colors">
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12 lg:py-16">
<div className="grid grid-cols-1 md:grid-cols-4 gap-8">
<footer className="bg-slate-900 text-slate-300 dark:bg-black border-t border-slate-800 transition-colors">
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-14 lg:py-20">
<div className="grid grid-cols-1 md:grid-cols-4 gap-10">
{/* Brand info */}
<div className="md:col-span-2 space-y-4">
<div className="md:col-span-2 space-y-5">
<div className="flex items-center space-x-3">
<div className="w-8 h-8 rounded-lg bg-blue-600 flex items-center justify-center text-white">
<Sparkles className="w-4 h-4" />
<div className="w-10 h-10 rounded-2xl bg-gradient-to-tr from-blue-600 via-indigo-600 to-cyan-400 flex items-center justify-center text-white font-black text-sm tracking-tighter shadow-lg shadow-blue-500/20">
CRE
</div>
<span className="text-xl font-bold text-slate-900 dark:text-white">
{config.brand.name}
<span className="text-2xl font-black text-white tracking-tight">
CRE <span className="text-cyan-400">Innovations</span>
</span>
</div>
<p className="text-sm text-slate-600 dark:text-slate-400 max-w-sm">
{resolveLocalised(config.brand.tagline, currentLocale)}. Try our professional photo AI tools free online, then unlock 4K batch processing in our native mobile apps.
<p className="text-sm text-slate-400 max-w-md leading-relaxed">
{resolveLocalised(config.brand.tagline, currentLocale)}. Commercial-grade deep learning vision models for portraits, e-commerce products, enhancement, and creative generative art.
</p>
<div className="flex items-center space-x-2 text-xs text-emerald-600 dark:text-emerald-400 font-medium">
<Shield className="w-4 h-4" />
<span>Zero-Storage Policy: Photos processed in RAM and streamed directly back.</span>
<div className="inline-flex items-center space-x-2 text-xs text-emerald-400 bg-emerald-950/60 border border-emerald-800/80 px-3.5 py-1.5 rounded-full font-medium">
<ShieldCheck className="w-4 h-4 text-emerald-400" />
<span>Zero-Storage Guarantee: In-memory streaming inference with zero photo retention.</span>
</div>
</div>
{/* Quick Links */}
<div>
<h4 className="text-sm font-semibold uppercase tracking-wider text-slate-900 dark:text-white mb-4">
Explore
<div className="space-y-4">
<h4 className="text-xs font-bold uppercase tracking-wider text-white">
Platform & Tools
</h4>
<ul className="space-y-2 text-sm">
<ul className="space-y-2.5 text-xs sm:text-sm">
<li>
<Link href="/tools" className="text-slate-600 dark:text-slate-400 hover:text-blue-600 dark:hover:text-blue-400">
All Photo Tools
<Link href="/tools" className="text-slate-400 hover:text-cyan-400 transition-colors flex items-center space-x-1">
<span>All Photo Tools</span>
</Link>
</li>
<li>
<Link href="/apps" className="text-slate-600 dark:text-slate-400 hover:text-blue-600 dark:hover:text-blue-400">
Mobile Apps Suite
<Link href="/apps" className="text-slate-400 hover:text-cyan-400 transition-colors flex items-center space-x-1">
<span>Mobile Apps Suite</span>
</Link>
</li>
<li>
<Link href="/pricing" className="text-slate-600 dark:text-slate-400 hover:text-blue-600 dark:hover:text-blue-400">
Pricing & In-App Credits
<Link href="/pricing" className="text-slate-400 hover:text-cyan-400 transition-colors flex items-center space-x-1">
<span>Pricing & Store Credits</span>
</Link>
</li>
<li>
<Link href="/catalog-manager" className="text-slate-600 dark:text-slate-400 hover:text-blue-600 dark:hover:text-blue-400">
API Catalogue Inspector
<Link href="/catalog-manager" className="text-slate-400 hover:text-cyan-400 transition-colors flex items-center space-x-1">
<span>API Catalogue Inspector</span>
<ArrowUpRight className="w-3 h-3 text-cyan-400" />
</Link>
</li>
</ul>
</div>
{/* Legal & Trust */}
<div>
<h4 className="text-sm font-semibold uppercase tracking-wider text-slate-900 dark:text-white mb-4">
{/* Trust & Legal */}
<div className="space-y-4">
<h4 className="text-xs font-bold uppercase tracking-wider text-white">
Trust & Legal
</h4>
<ul className="space-y-2 text-sm">
<ul className="space-y-2.5 text-xs sm:text-sm">
<li>
<Link href="/trust" className="text-slate-600 dark:text-slate-400 hover:text-blue-600 dark:hover:text-blue-400">
Trust & Security
<Link href="/trust" className="text-slate-400 hover:text-cyan-400 transition-colors">
Trust & Security Safeguards
</Link>
</li>
<li>
<Link href="/privacy" className="text-slate-600 dark:text-slate-400 hover:text-blue-600 dark:hover:text-blue-400">
<Link href="/privacy" className="text-slate-400 hover:text-cyan-400 transition-colors">
Privacy Policy
</Link>
</li>
<li>
<Link href="/terms" className="text-slate-600 dark:text-slate-400 hover:text-blue-600 dark:hover:text-blue-400">
<Link href="/terms" className="text-slate-400 hover:text-cyan-400 transition-colors">
Terms of Service
</Link>
</li>
@@ -87,11 +88,11 @@ export function Footer({ config, currentLocale }: FooterProps) {
</div>
{/* Bottom Bar */}
<div className="mt-12 pt-8 border-t border-slate-200 dark:border-slate-800 flex flex-col sm:flex-row items-center justify-between text-xs text-slate-500 dark:text-slate-500">
<div className="mt-14 pt-8 border-t border-slate-800 flex flex-col sm:flex-row items-center justify-between text-xs text-slate-500 space-y-3 sm:space-y-0">
<p>{config.footer.copyright}</p>
<p className="mt-2 sm:mt-0 flex items-center space-x-1">
<span>Built with precision for creators</span>
<Heart className="w-3.5 h-3.5 text-rose-500 inline fill-rose-500" />
<p className="flex items-center space-x-1.5">
<span>Engineering excellence by CRE Innovations</span>
<span className="w-1.5 h-1.5 rounded-full bg-cyan-400"></span>
</p>
</div>
</div>
+56 -43
View File
@@ -3,16 +3,15 @@
import React, { useState, useEffect } from 'react';
import Link from 'next/link';
import { usePathname } from 'next/navigation';
import { Sparkles, Moon, Sun, Menu, X, Smartphone, Globe } from 'lucide-react';
import { Sparkles, Moon, Sun, Menu, X, Smartphone, Layers, ChevronRight, Zap } from 'lucide-react';
import { SiteConfig, resolveLocalised } from '@/types';
interface NavbarProps {
config: SiteConfig;
currentLocale: string;
onLocaleChange?: (locale: string) => void;
}
export function Navbar({ config, currentLocale, onLocaleChange }: NavbarProps) {
export function Navbar({ config, currentLocale }: NavbarProps) {
const [isScrolled, setIsScrolled] = useState(false);
const [mobileMenuOpen, setMobileMenuOpen] = useState(false);
const [isDark, setIsDark] = useState(false);
@@ -20,9 +19,9 @@ export function Navbar({ config, currentLocale, onLocaleChange }: NavbarProps) {
useEffect(() => {
const handleScroll = () => {
setIsScrolled(window.scrollY > 20);
setIsScrolled(window.scrollY > 15);
};
window.addEventListener('scroll', handleScroll);
window.addEventListener('scroll', handleScroll, { passive: true });
return () => window.removeEventListener('scroll', handleScroll);
}, []);
@@ -38,40 +37,46 @@ export function Navbar({ config, currentLocale, onLocaleChange }: NavbarProps) {
return (
<header
className={`sticky top-0 z-50 transition-all duration-200 ${
className={`sticky top-0 z-50 transition-all duration-300 ${
isScrolled
? 'bg-white/90 dark:bg-slate-900/90 backdrop-blur-md shadow-sm border-b border-slate-200 dark:border-slate-800'
: 'bg-white dark:bg-slate-900 border-b border-transparent'
? 'bg-white/85 dark:bg-slate-950/85 backdrop-blur-xl shadow-lg shadow-slate-900/5 dark:shadow-black/40 border-b border-slate-200/80 dark:border-slate-800/80'
: 'bg-white/50 dark:bg-slate-950/50 backdrop-blur-md border-b border-transparent'
}`}
>
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 h-16 flex items-center justify-between">
{/* Brand Logo */}
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 h-16 sm:h-20 flex items-center justify-between">
{/* CRE Innovations Brand Mark */}
<Link href="/" className="flex items-center space-x-3 group">
<div className="w-10 h-10 rounded-xl bg-gradient-to-tr from-blue-600 to-teal-500 flex items-center justify-center text-white shadow-md shadow-blue-500/20 group-hover:scale-105 transition-transform">
<Sparkles className="w-5 h-5" />
<div className="relative w-10 h-10 sm:w-11 sm:h-11 rounded-2xl bg-gradient-to-tr from-blue-600 via-indigo-600 to-cyan-400 flex items-center justify-center text-white shadow-lg shadow-blue-500/25 group-hover:shadow-blue-500/40 group-hover:scale-105 transition-all duration-300">
<span className="font-extrabold text-base tracking-tighter">CRE</span>
<span className="absolute -top-1 -right-1 flex h-3 w-3">
<span className="animate-ping absolute inline-flex h-full w-full rounded-full bg-cyan-400 opacity-75"></span>
<span className="relative inline-flex rounded-full h-3 w-3 bg-cyan-500"></span>
</span>
</div>
<div>
<span className="text-xl font-bold bg-clip-text text-transparent bg-gradient-to-r from-blue-600 to-teal-600 dark:from-blue-400 dark:to-teal-400">
{config.brand.name}
</span>
<span className="hidden sm:block text-xs text-slate-500 dark:text-slate-400">
{resolveLocalised(config.brand.tagline, currentLocale)}
<div className="flex items-center space-x-1.5">
<span className="text-lg sm:text-xl font-extrabold tracking-tight text-slate-900 dark:text-white">
CRE <span className="bg-clip-text text-transparent bg-gradient-to-r from-blue-600 to-cyan-500 dark:from-blue-400 dark:to-cyan-400">Innovations</span>
</span>
</div>
<span className="hidden sm:block text-[11px] font-medium text-slate-500 dark:text-slate-400 tracking-wide">
AI Photo Tools & Neural Vision
</span>
</div>
</Link>
{/* Desktop Navigation Links */}
<nav className="hidden md:flex items-center space-x-1 lg:space-x-2">
<nav className="hidden md:flex items-center space-x-1 lg:space-x-1.5 bg-slate-100/70 dark:bg-slate-900/70 p-1.5 rounded-2xl border border-slate-200/60 dark:border-slate-800/60 backdrop-blur-md">
{config.nav.header.map((item) => {
const active = pathname === item.href;
return (
<Link
key={item.href}
href={item.href}
className={`px-3 py-2 rounded-lg text-sm font-medium transition-colors ${
className={`px-4 py-2 rounded-xl text-xs font-semibold tracking-wide transition-all duration-200 ${
active
? 'text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-950/40'
: 'text-slate-700 dark:text-slate-200 hover:text-blue-600 dark:hover:text-blue-400 hover:bg-slate-50 dark:hover:bg-slate-800/50'
? 'text-white bg-blue-600 shadow-md shadow-blue-500/25'
: 'text-slate-700 dark:text-slate-300 hover:text-blue-600 dark:hover:text-blue-400 hover:bg-white/80 dark:hover:bg-slate-800/80'
}`}
>
{resolveLocalised(item.label, currentLocale)}
@@ -82,19 +87,19 @@ export function Navbar({ config, currentLocale, onLocaleChange }: NavbarProps) {
{/* Right Action Buttons */}
<div className="hidden md:flex items-center space-x-3">
{/* Theme Toggle */}
{/* Theme Toggle Button */}
<button
onClick={toggleTheme}
aria-label="Toggle theme"
className="p-2 rounded-lg text-slate-500 dark:text-slate-400 hover:bg-slate-100 dark:hover:bg-slate-800 transition-colors"
className="p-2.5 rounded-xl border border-slate-200 dark:border-slate-800 text-slate-600 dark:text-slate-400 hover:bg-slate-100 dark:hover:bg-slate-900 transition-colors"
>
{isDark ? <Sun className="w-5 h-5 text-amber-400" /> : <Moon className="w-5 h-5 text-slate-600" />}
{isDark ? <Sun className="w-4 h-4 text-amber-400" /> : <Moon className="w-4 h-4 text-slate-600" />}
</button>
{/* Primary CTA Button */}
<Link
href={config.nav.cta.href}
className="inline-flex items-center space-x-2 px-4 py-2 rounded-xl text-sm font-medium text-white bg-blue-600 hover:bg-blue-700 shadow-md shadow-blue-500/20 transition-all hover:shadow-lg active:scale-95"
className="inline-flex items-center space-x-2 px-5 py-2.5 rounded-xl text-xs font-bold text-white bg-gradient-to-r from-blue-600 to-indigo-600 hover:from-blue-700 hover:to-indigo-700 shadow-lg shadow-blue-500/25 hover:shadow-blue-500/40 hover:-translate-y-0.5 active:translate-y-0 transition-all duration-200"
>
<Smartphone className="w-4 h-4" />
<span>{resolveLocalised(config.nav.cta.label, currentLocale)}</span>
@@ -105,38 +110,46 @@ export function Navbar({ config, currentLocale, onLocaleChange }: NavbarProps) {
<div className="flex md:hidden items-center space-x-2">
<button
onClick={toggleTheme}
className="p-2 rounded-lg text-slate-600 dark:text-slate-300"
className="p-2 rounded-xl text-slate-600 dark:text-slate-300 border border-slate-200 dark:border-slate-800"
>
{isDark ? <Sun className="w-5 h-5 text-amber-400" /> : <Moon className="w-5 h-5" />}
{isDark ? <Sun className="w-4 h-4 text-amber-400" /> : <Moon className="w-4 h-4" />}
</button>
<button
onClick={() => setMobileMenuOpen(!mobileMenuOpen)}
className="p-2 rounded-lg text-slate-700 dark:text-slate-200 hover:bg-slate-100 dark:hover:bg-slate-800"
className="p-2.5 rounded-xl text-slate-700 dark:text-slate-200 bg-slate-100 dark:bg-slate-900 border border-slate-200 dark:border-slate-800 hover:bg-slate-200"
aria-label="Open menu"
>
{mobileMenuOpen ? <X className="w-6 h-6" /> : <Menu className="w-6 h-6" />}
{mobileMenuOpen ? <X className="w-5 h-5" /> : <Menu className="w-5 h-5" />}
</button>
</div>
</div>
{/* Mobile Menu Dropdown */}
{/* Mobile Drawer */}
{mobileMenuOpen && (
<div className="md:hidden border-b border-slate-200 dark:border-slate-800 bg-white dark:bg-slate-900 px-4 pt-2 pb-6 space-y-2">
{config.nav.header.map((item) => (
<Link
key={item.href}
href={item.href}
onClick={() => setMobileMenuOpen(false)}
className="block px-3 py-2 rounded-lg text-base font-medium text-slate-700 dark:text-slate-200 hover:bg-slate-100 dark:hover:bg-slate-800"
>
{resolveLocalised(item.label, currentLocale)}
</Link>
))}
<div className="pt-2">
<div className="md:hidden border-b border-slate-200 dark:border-slate-800 bg-white/95 dark:bg-slate-950/95 backdrop-blur-2xl px-5 pt-3 pb-6 space-y-2 animate-in slide-in-from-top-4 duration-200">
{config.nav.header.map((item) => {
const active = pathname === item.href;
return (
<Link
key={item.href}
href={item.href}
onClick={() => setMobileMenuOpen(false)}
className={`flex items-center justify-between px-4 py-3 rounded-xl text-sm font-semibold transition-colors ${
active
? 'text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-950/40'
: 'text-slate-700 dark:text-slate-200 hover:bg-slate-100 dark:hover:bg-slate-900'
}`}
>
<span>{resolveLocalised(item.label, currentLocale)}</span>
<ChevronRight className="w-4 h-4 text-slate-400" />
</Link>
);
})}
<div className="pt-3">
<Link
href={config.nav.cta.href}
onClick={() => setMobileMenuOpen(false)}
className="flex items-center justify-center space-x-2 w-full px-4 py-3 rounded-xl text-sm font-medium text-white bg-blue-600 hover:bg-blue-700"
className="flex items-center justify-center space-x-2 w-full py-3.5 rounded-xl text-sm font-bold text-white bg-gradient-to-r from-blue-600 to-indigo-600 shadow-md shadow-blue-500/25"
>
<Smartphone className="w-4 h-4" />
<span>{resolveLocalised(config.nav.cta.label, currentLocale)}</span>