feat: redesign tools page - remove subtitles in tools, increase title size, compact sidebar with smaller typography, and integrate rich Flaticons across categories

This commit is contained in:
2026-11-12 18:24:43 +05:30
parent ec609c5d4a
commit 484b268537
4 changed files with 366 additions and 84 deletions
+67 -76
View File
@@ -5,10 +5,6 @@ import Link from 'next/link';
import {
Search,
ArrowRight,
Wand2,
Scissors,
Smile,
Palette,
Sparkles,
X,
Layers,
@@ -16,6 +12,13 @@ import {
ChevronRight,
RotateCcw,
} from 'lucide-react';
import {
FlaticonPortraitIcon,
FlaticonRestorationIcon,
FlaticonCutoutIcon,
FlaticonArtIcon,
FlaticonAllToolsIcon,
} from '@/components/icons/Flaticons';
import { ToolItem, CategoryItem, AppItem, resolveLocalised } from '@/types';
import { KineticText } from '@/components/magicui/kinetic-text';
import { AnimatedShinyText } from '@/components/magicui/animated-shiny-text';
@@ -350,32 +353,37 @@ const TOOL_MODEL_SPECS: Record<string, string> = {
'hair-style-changer': 'FLUX.1-Fill Hairstyle Refiner',
};
// Category visual themes aligned to Porcelain Light theme
// Category visual themes aligned to Porcelain Light theme with Flaticons
const CATEGORY_THEMES: Record<
string,
{
icon: React.ReactNode;
largeIcon: React.ReactNode;
color: string;
badgeBg: string;
}
> = {
'portrait-retouch': {
icon: <Smile className="w-4 h-4 text-rose-500" />,
icon: <FlaticonPortraitIcon className="w-4.5 h-4.5" />,
largeIcon: <FlaticonPortraitIcon className="w-7 h-7" />,
color: 'text-rose-600',
badgeBg: 'bg-rose-500/10 text-rose-700 border-rose-500/20',
},
'restoration': {
icon: <Sparkles className="w-4 h-4 text-indigo-500" />,
icon: <FlaticonRestorationIcon className="w-4.5 h-4.5" />,
largeIcon: <FlaticonRestorationIcon className="w-7 h-7" />,
color: 'text-indigo-600',
badgeBg: 'bg-indigo-500/10 text-indigo-700 border-indigo-500/20',
},
'background-cutout': {
icon: <Scissors className="w-4 h-4 text-emerald-500" />,
icon: <FlaticonCutoutIcon className="w-4.5 h-4.5" />,
largeIcon: <FlaticonCutoutIcon className="w-7 h-7" />,
color: 'text-emerald-600',
badgeBg: 'bg-emerald-500/10 text-emerald-700 border-emerald-500/20',
},
'creative-art': {
icon: <Palette className="w-4 h-4 text-amber-500" />,
icon: <FlaticonArtIcon className="w-4.5 h-4.5" />,
largeIcon: <FlaticonArtIcon className="w-7 h-7" />,
color: 'text-amber-600',
badgeBg: 'bg-amber-500/10 text-amber-700 border-amber-500/20',
},
@@ -596,27 +604,21 @@ function ToolCard({
categoryName?: string;
}) {
const toolName = resolveLocalised(tool.name, locale);
const toolSummary = resolveLocalised(tool.summary, locale);
return (
<div className="group studio-sheet p-3 sm:p-3.5 rounded-2xl bg-paper-hi border border-rule shadow-[0_4px_20px_-4px_rgba(0,0,0,0.03)] hover:border-accent hover:shadow-glow motion-safe:transition-[border-color,box-shadow,transform] duration-300 hover:-translate-y-1 flex flex-col justify-between h-full">
{/* Image Dominant Preview Frame */}
<ToolCardImage tool={tool} toolName={toolName} />
{/* Info Area: Title, Subtitle, and Direct Action Button */}
<div className="mt-2.5 flex-1 flex flex-col justify-between space-y-2">
{/* Info Area: Title only (just a little bigger) and Direct Action Button */}
<div className="mt-3 flex-1 flex flex-col justify-between space-y-2.5">
<div>
{/* Tool Title */}
<Link href={`/tools/${tool.slug}`} className="block">
<h4 className="text-sm font-display font-bold text-ink tracking-tight leading-snug group-hover:text-accent transition-colors line-clamp-1">
<h4 className="text-[15px] sm:text-base font-display font-bold text-ink tracking-tight leading-snug group-hover:text-accent transition-colors line-clamp-1">
<AnimatedShinyText>{toolName}</AnimatedShinyText>
</h4>
</Link>
{/* Tool Description */}
<p className="mt-1 text-xs text-ink-2 font-sans line-clamp-2 leading-relaxed">
{toolSummary}
</p>
</div>
{/* Action Button Row: Highly Visible Prominent Primary Button */}
@@ -788,39 +790,40 @@ export function ToolGridSection({
LEFT SIDEBAR: DOCKED DIRECTLY TO VIEWPORT EDGE (STICKY DESKTOP)
High-contrast, clearly legible font with dedicated active category states
========================================================================= */}
<aside className="hidden lg:flex flex-col justify-between w-72 xl:w-80 shrink-0 border-r border-rule bg-paper-hi sticky top-[73px] h-[calc(100vh-73px)] overflow-y-auto no-scrollbar p-5 xl:p-6 z-20">
<aside className="hidden lg:flex flex-col justify-between w-56 xl:w-60 shrink-0 border-r border-rule bg-paper-hi sticky top-[73px] h-[calc(100vh-73px)] overflow-y-auto no-scrollbar p-3.5 xl:p-4 z-20">
{/* Top: Header, Search, Categories Nav */}
<div className="space-y-6">
<div className="space-y-4">
{/* Categories Header */}
<div className="pb-3.5 border-b border-rule">
<h2 className="text-sm font-bold text-slate-900 font-sans tracking-tight">
<div className="pb-2.5 border-b border-rule flex items-center justify-between">
<h2 className="text-xs font-bold text-slate-800 font-sans tracking-tight uppercase">
Categories
</h2>
<span className="text-[10px] font-mono text-slate-400 font-semibold">{tools.length} tools</span>
</div>
{/* Instant Search Bar with shortcut hint */}
{showSearch && (
<div className="relative w-full">
<Search className="w-3.5 h-3.5 absolute left-3.5 top-1/2 -translate-y-1/2 text-slate-400 pointer-events-none" />
<Search className="w-3 h-3 absolute left-2.5 top-1/2 -translate-y-1/2 text-slate-400 pointer-events-none" />
<input
type="text"
placeholder="Search tools..."
value={searchQuery}
onChange={(e) => setSearchQuery(e.target.value)}
className="w-full pl-9 pr-8 py-2.5 rounded-xl text-xs sm:text-sm border border-slate-200 bg-white text-slate-900 placeholder:text-slate-400 focus:outline-none focus:border-accent focus:ring-2 focus:ring-accent/20 shadow-2xs font-sans transition-colors"
className="w-full pl-8 pr-7 py-2 rounded-lg text-xs border border-slate-200 bg-white text-slate-900 placeholder:text-slate-400 focus:outline-none focus:border-accent focus:ring-1 focus:ring-accent/20 shadow-2xs font-sans transition-colors"
/>
{searchQuery ? (
<button
onClick={() => setSearchQuery('')}
className="absolute right-2.5 top-1/2 -translate-y-1/2 text-slate-400 hover:text-slate-900 cursor-pointer p-0.5"
className="absolute right-2 top-1/2 -translate-y-1/2 text-slate-400 hover:text-slate-900 cursor-pointer p-0.5"
aria-label="Clear search query"
>
<X className="w-3.5 h-3.5" />
<X className="w-3 h-3" />
</button>
) : (
<kbd className="absolute right-2.5 top-1/2 -translate-y-1/2 text-[10px] font-mono text-slate-500 bg-slate-100 border border-slate-200 px-1.5 py-0.5 rounded pointer-events-none">
<kbd className="absolute right-2 top-1/2 -translate-y-1/2 text-[9px] font-mono text-slate-400 bg-slate-100 border border-slate-200 px-1 py-0.5 rounded pointer-events-none">
/
</kbd>
)}
@@ -828,49 +831,49 @@ export function ToolGridSection({
)}
{/* Categories Navigation */}
<div className="space-y-2">
<div className="space-y-1.5">
<div className="flex items-center justify-between px-1 font-sans">
<span className="text-xs font-bold text-slate-600 uppercase tracking-wider">Workspaces</span>
<span className="text-[10px] font-bold text-slate-400 uppercase tracking-wider">Workspaces</span>
{(selectedCategory !== 'all' || searchQuery) && (
<button
onClick={() => {
handleSelectCategory('all');
setSearchQuery('');
}}
className="inline-flex items-center gap-1 text-xs font-semibold text-accent hover:underline cursor-pointer lowercase"
className="inline-flex items-center gap-1 text-[11px] font-semibold text-accent hover:underline cursor-pointer lowercase"
>
<RotateCcw className="w-3 h-3" />
<RotateCcw className="w-2.5 h-2.5" />
<span>reset</span>
</button>
)}
</div>
<nav className="flex flex-col gap-1.5" aria-label="Tool Categories">
<nav className="flex flex-col gap-1" aria-label="Tool Categories">
{/* All Studio Tools */}
<button
type="button"
onClick={() => handleSelectCategory('all')}
className={`w-full flex items-center justify-between px-3.5 py-2.5 rounded-xl text-xs sm:text-sm font-sans transition-all duration-150 cursor-pointer ${
className={`w-full flex items-center justify-between px-2.5 py-1.5 rounded-lg text-xs font-sans transition-all duration-150 cursor-pointer ${
selectedCategory === 'all' && !searchQuery
? 'bg-slate-900 text-white shadow-xs font-semibold'
: 'bg-transparent text-slate-800 hover:bg-slate-100 hover:text-slate-950 border border-transparent hover:border-slate-200 font-medium'
: 'bg-transparent text-slate-700 hover:bg-slate-100 hover:text-slate-950 font-medium'
}`}
>
<div className="flex items-center gap-2.5 min-w-0">
<div className={`w-6 h-6 rounded-lg flex items-center justify-center shrink-0 ${
<div className="flex items-center gap-2 min-w-0">
<div className={`w-5 h-5 rounded-md flex items-center justify-center shrink-0 ${
selectedCategory === 'all' && !searchQuery
? 'bg-white/20 text-accent'
: 'bg-slate-100 text-slate-600'
? 'bg-white/20'
: 'bg-slate-100'
}`}>
<Layers className="w-3.5 h-3.5" />
<FlaticonAllToolsIcon className="w-3.5 h-3.5" />
</div>
<span className="truncate">All Studio Tools</span>
</div>
<span
className={`text-[11px] font-mono px-2 py-0.5 rounded-full font-bold shrink-0 ${
className={`text-[10px] font-mono px-1.5 py-0.5 rounded font-bold shrink-0 ${
selectedCategory === 'all' && !searchQuery
? 'bg-white/20 text-white'
: 'bg-slate-100 text-slate-700 border border-slate-200/60'
: 'bg-slate-100 text-slate-600'
}`}
>
{tools.length}
@@ -890,27 +893,27 @@ export function ToolGridSection({
key={group.id}
type="button"
onClick={() => handleSelectCategory(group.id)}
className={`w-full flex items-center justify-between px-3.5 py-2.5 rounded-xl text-xs sm:text-sm font-sans transition-all duration-150 cursor-pointer ${
className={`w-full flex items-center justify-between px-2.5 py-1.5 rounded-lg text-xs font-sans transition-all duration-150 cursor-pointer ${
isSelected
? 'bg-slate-900 text-white shadow-xs font-semibold'
: 'bg-transparent text-slate-800 hover:bg-slate-100 hover:text-slate-950 border border-transparent hover:border-slate-200 font-medium'
: 'bg-transparent text-slate-700 hover:bg-slate-100 hover:text-slate-950 font-medium'
}`}
>
<div className="flex items-center gap-2.5 min-w-0">
<div className={`w-6 h-6 rounded-lg flex items-center justify-center shrink-0 ${
<div className="flex items-center gap-2 min-w-0">
<div className={`w-5 h-5 rounded-md flex items-center justify-center shrink-0 ${
isSelected
? 'bg-white/20 text-accent'
: 'bg-slate-100 text-slate-600'
? 'bg-white/20'
: 'bg-slate-100'
}`}>
{theme?.icon || <Wand2 className="w-3.5 h-3.5 text-accent" />}
{theme?.icon || <FlaticonAllToolsIcon className="w-3.5 h-3.5" />}
</div>
<span className="truncate">{catName}</span>
</div>
<span
className={`text-[11px] font-mono px-2 py-0.5 rounded-full font-bold shrink-0 ${
className={`text-[10px] font-mono px-1.5 py-0.5 rounded font-bold shrink-0 ${
isSelected
? 'bg-white/20 text-white'
: 'bg-slate-100 text-slate-700 border border-slate-200/60'
: 'bg-slate-100 text-slate-600'
}`}
>
{group.tools.length}
@@ -924,12 +927,12 @@ export function ToolGridSection({
</div>
{/* Bottom: Native App Suite Link */}
<div className="pt-4 border-t border-rule space-y-3">
<div className="pt-3 border-t border-rule space-y-2">
<Link
href="/apps"
className="w-full inline-flex items-center justify-between px-3.5 py-2.5 rounded-xl text-xs sm:text-sm font-sans font-semibold text-slate-800 bg-slate-100 hover:bg-slate-900 hover:text-white transition-colors duration-150 group shadow-2xs"
className="w-full inline-flex items-center justify-between px-2.5 py-2 rounded-lg text-xs font-sans font-medium text-slate-700 bg-slate-100/80 hover:bg-slate-900 hover:text-white transition-colors duration-150 group shadow-2xs"
>
<div className="flex items-center gap-2">
<div className="flex items-center gap-1.5">
<Smartphone className="w-3.5 h-3.5 text-accent group-hover:text-white" />
<span>Mobile studio suite</span>
</div>
@@ -977,17 +980,17 @@ export function ToolGridSection({
</div>
)}
<div className="flex items-center gap-2 overflow-x-auto no-scrollbar py-1">
<div className="flex items-center gap-1.5 overflow-x-auto no-scrollbar py-1">
<button
type="button"
onClick={() => handleSelectCategory('all')}
className={`inline-flex items-center gap-1.5 px-3.5 py-1.5 rounded-full text-xs font-sans font-semibold shrink-0 transition-colors ${
className={`inline-flex items-center gap-1.5 px-3 py-1.5 rounded-full text-xs font-sans font-semibold shrink-0 transition-colors ${
selectedCategory === 'all' && !searchQuery
? 'bg-slate-900 text-white shadow-xs'
: 'bg-white text-slate-800 border border-slate-200 hover:text-slate-950'
}`}
>
<Layers className="w-3.5 h-3.5" />
<FlaticonAllToolsIcon className="w-3.5 h-3.5" />
<span>All tools ({tools.length})</span>
</button>
{categorizedTools.map((group) => {
@@ -1002,13 +1005,13 @@ export function ToolGridSection({
key={group.id}
type="button"
onClick={() => handleSelectCategory(group.id)}
className={`inline-flex items-center gap-1.5 px-3.5 py-1.5 rounded-full text-xs font-sans font-semibold shrink-0 transition-colors ${
className={`inline-flex items-center gap-1.5 px-3 py-1.5 rounded-full text-xs font-sans font-semibold shrink-0 transition-colors ${
isSelected
? 'bg-slate-900 text-white shadow-xs'
: 'bg-white text-slate-800 border border-slate-200 hover:text-slate-950'
}`}
>
<span className="shrink-0">{theme?.icon}</span>
<span className="shrink-0">{theme?.icon || <FlaticonAllToolsIcon className="w-3.5 h-3.5" />}</span>
<span>{catName}</span>
<span className="text-[10px] opacity-70">({group.tools.length})</span>
</button>
@@ -1047,9 +1050,9 @@ export function ToolGridSection({
{activeCategoryItem ? (
/* Focused Category Workspace Header */
<div className="flex flex-col sm:flex-row sm:items-start justify-between gap-4 pt-1">
<div className="flex items-start gap-3.5">
<div className="w-12 h-12 rounded-2xl flex items-center justify-center bg-paper-hi shadow-xs border border-rule text-accent shrink-0 mt-0.5">
{CATEGORY_THEMES[activeCategoryItem.id]?.icon || <Wand2 className="w-5 h-5 text-accent" />}
<div className="flex items-center gap-3.5">
<div className="w-12 h-12 rounded-2xl flex items-center justify-center bg-paper-hi shadow-xs border border-rule shrink-0">
{CATEGORY_THEMES[activeCategoryItem.id]?.largeIcon || <FlaticonAllToolsIcon className="w-7 h-7" />}
</div>
<div>
<div className="flex items-center gap-3">
@@ -1063,9 +1066,6 @@ export function ToolGridSection({
{activeCategoryItem.tools.length === 1 ? 'tool' : 'tools'}
</span>
</div>
<p className="text-sm sm:text-base text-ink-2 font-sans max-w-2xl mt-1.5 leading-relaxed">
{resolveLocalised(activeCategoryItem.category?.description, locale)}
</p>
</div>
</div>
@@ -1079,17 +1079,13 @@ export function ToolGridSection({
</button>
</div>
) : (
/* Universal Studio Overview Header */
/* Universal Studio Overview Header - Title Only */
<div>
<h1 className="text-3xl sm:text-4xl lg:text-5xl font-display font-bold text-ink tracking-tight">
<KineticText>
{resolveLocalised(title, locale) || 'AI Photo & Vision Tools Studio'}
</KineticText>
</h1>
<p className="text-sm sm:text-base text-ink-2 font-sans max-w-3xl mt-3 leading-relaxed">
{resolveLocalised(subtitle, locale) ||
'Client-side neural vision models running directly in volatile GPU memory with zero retention. Test interactive before/after sliders or export in native 4K.'}
</p>
</div>
)}
</div>
@@ -1176,8 +1172,8 @@ export function ToolGridSection({
{/* Section Category Header */}
<div className="flex flex-col sm:flex-row sm:items-end justify-between gap-3 pb-4 border-b border-rule">
<div className="flex items-center gap-3.5">
<div className="w-11 h-11 rounded-2xl flex items-center justify-center bg-paper-hi shadow-xs border border-rule text-accent shrink-0">
{theme?.icon || <Wand2 className="w-4 h-4 text-accent" />}
<div className="w-11 h-11 rounded-2xl flex items-center justify-center bg-paper-hi shadow-xs border border-rule shrink-0">
{theme?.largeIcon || theme?.icon || <FlaticonAllToolsIcon className="w-6 h-6" />}
</div>
<div>
<div className="flex items-center gap-2.5">
@@ -1189,11 +1185,6 @@ export function ToolGridSection({
{group.tools.length === 1 ? 'tool' : 'tools'}
</span>
</div>
{catDesc && (
<p className="text-xs sm:text-sm text-ink-2 mt-0.5 font-sans line-clamp-1 sm:line-clamp-none">
{catDesc}
</p>
)}
</div>
</div>