Skip to content

Commit e1b7288

Browse files
UI/UX Upgrade: Modernize Hero Section and Category Slider - Add stealth navigation and gradient masks
1 parent ad65f47 commit e1b7288

2 files changed

Lines changed: 37 additions & 31 deletions

File tree

app/globals.css

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,6 @@ button, a, .transition-all {
9999
.text-balance {
100100
text-wrap: balance;
101101
}
102-
}
102+
}
103+
.no-scrollbar::-webkit-scrollbar { display: none; }
104+
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

app/tools/page.tsx

Lines changed: 34 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
Search, Filter, Laptop, Zap, Settings, Layout, Layers, Code2, Star,
99
DollarSign, ClipboardList, TrendingDown
1010
} from 'lucide-react'
11+
import AdSlot from '@/components/ads/AdSlot'
1112

1213
const tools = [
1314
// Formatters
@@ -93,51 +94,57 @@ export default function ToolsPage() {
9394
return (
9495
<div className="py-16 px-4 sm:px-6 lg:px-8 bg-gray-50/50 dark:bg-slate-950/50 min-h-screen">
9596
<div className="max-w-7xl mx-auto">
96-
<div className="text-center mb-12">
97-
<h1 className="text-5xl font-extrabold text-gray-900 dark:text-white mb-4 tracking-tight">
97+
<div className="text-center mb-16 relative">
98+
<div className="absolute -top-24 left-1/2 -translate-x-1/2 w-96 h-96 bg-blue-500/10 dark:bg-blue-600/5 blur-[120px] rounded-full pointer-events-none" />
99+
<h1 className="text-5xl md:text-7xl font-black text-gray-900 dark:text-white mb-6 tracking-tighter leading-tight bg-clip-text text-transparent bg-gradient-to-b from-gray-900 to-gray-600 dark:from-white dark:to-slate-500">
98100
Developer Toolkit
99101
</h1>
100-
<p className="text-xl text-gray-500 dark:text-slate-400 max-w-2xl mx-auto leading-relaxed">
101-
A comprehensive suite of {tools.length} free, high-performance tools built for modern web professionals.
102+
<p className="text-xl text-gray-500 dark:text-slate-400 max-w-2xl mx-auto leading-relaxed font-medium">
103+
A comprehensive suite of <span className="text-blue-600 dark:text-blue-400 font-bold">{tools.length}</span> free, high-performance tools built for the next generation of web professionals.
102104
</p>
103105
</div>
104106

105107
{/* Search and Filter Section */}
106-
<div className="max-w-4xl mx-auto mb-16">
107-
<div className="flex flex-col md:flex-row gap-4">
108-
<div className="relative flex-grow">
109-
<div className="absolute inset-y-0 left-0 pl-4 flex items-center pointer-events-none">
108+
<div className="max-w-5xl mx-auto mb-20">
109+
<div className="bg-white dark:bg-slate-900 p-2 rounded-[2rem] border border-gray-100 dark:border-slate-800 shadow-2xl shadow-blue-900/5 dark:shadow-none flex flex-col md:flex-row items-center gap-2">
110+
<div className="relative flex-grow w-full">
111+
<div className="absolute inset-y-0 left-0 pl-6 flex items-center pointer-events-none">
110112
<Search className="h-5 w-5 text-gray-400" />
111113
</div>
112114
<input
113115
type="text"
114116
placeholder="Search for a tool (e.g., JSON, Password, Encoder)..."
115-
className="block w-full pl-11 pr-4 py-4 bg-white dark:bg-slate-900 border border-gray-200 dark:border-slate-800 rounded-2xl shadow-sm focus:ring-2 focus:ring-blue-500 focus:border-transparent outline-none transition-all dark:text-white"
117+
className="block w-full pl-14 pr-6 py-5 bg-transparent border-none focus:ring-0 outline-none text-lg font-medium dark:text-white placeholder:text-gray-400 dark:placeholder:text-slate-600"
116118
value={search}
117119
onChange={(e) => setSearch(e.target.value)}
118120
/>
119121
</div>
120-
<div className="flex gap-2 overflow-x-auto pb-2 md:pb-0 no-scrollbar">
121-
{categories.map((cat) => (
122-
<button
123-
key={cat}
124-
onClick={() => setActiveCategory(cat)}
125-
className={`px-6 py-4 rounded-2xl font-bold whitespace-nowrap transition-all duration-300 ${activeCategory === cat
126-
? 'bg-blue-600 text-white shadow-lg shadow-blue-200 dark:shadow-none'
127-
: 'bg-white dark:bg-slate-900 text-gray-600 dark:text-slate-400 hover:bg-gray-100 dark:hover:bg-slate-800 border border-gray-100 dark:border-slate-800'
128-
}`}
129-
>
130-
{cat}
131-
</button>
132-
))}
122+
123+
<div className="w-px h-10 bg-gray-100 dark:bg-slate-800 hidden md:block mx-2" />
124+
125+
<div className="relative group/nav w-full md:w-auto overflow-hidden">
126+
<div className="absolute left-0 top-0 bottom-0 w-8 bg-gradient-to-r from-white dark:from-slate-900 to-transparent z-10 pointer-events-none" />
127+
<div className="absolute right-0 top-0 bottom-0 w-8 bg-gradient-to-l from-white dark:from-slate-900 to-transparent z-10 pointer-events-none" />
128+
129+
<div className="flex gap-2 overflow-x-auto py-2 px-6 no-scrollbar mask-fade-edges">
130+
{categories.map((cat) => (
131+
<button
132+
key={cat}
133+
onClick={() => setActiveCategory(cat)}
134+
className={`px-6 py-3 rounded-2xl font-bold whitespace-nowrap transition-all duration-300 text-sm uppercase tracking-widest ${activeCategory === cat
135+
? 'bg-blue-600 text-white shadow-lg shadow-blue-500/20'
136+
: 'bg-gray-50 dark:bg-slate-800/50 text-gray-500 dark:text-slate-400 hover:bg-gray-100 dark:hover:bg-slate-800 border border-transparent'
137+
}`}
138+
>
139+
{cat}
140+
</button>
141+
))}
142+
</div>
133143
</div>
134144
</div>
135145
</div>
136146

137-
{/* AdSense Slot */}
138-
<div className="max-w-3xl mx-auto mb-12 min-h-[90px] flex items-center justify-center">
139-
{/* AdSense Leaderboard */}
140-
</div>
147+
<AdSlot className="mb-12" />
141148

142149
{/* Favorites Section */}
143150
{favoriteTools.length > 0 && search === '' && activeCategory === 'All' && (
@@ -232,10 +239,7 @@ export default function ToolsPage() {
232239
</div>
233240
)}
234241

235-
{/* AdSense Slot */}
236-
<div className="max-w-3xl mx-auto mt-20 min-h-[250px] flex items-center justify-center">
237-
{/* AdSense Rectangle */}
238-
</div>
242+
<AdSlot className="mt-20" />
239243
</div>
240244
</div>
241245
)

0 commit comments

Comments
 (0)