fix(hero+tools+navbar): uncrop complete image, dial down white gradient, vertical mobile tools list, and opaque solid mobile navbar

This commit is contained in:
2026-11-05 18:14:27 +05:30
parent d225e7ab6e
commit f8f7a737dc
4 changed files with 82 additions and 35 deletions
@@ -134,12 +134,17 @@ export function ShiftableToolsGridSection({
</p>
</div>
{/* 2-Row Shiftable Grid Container (Slow, Calm, Pure Horizontal Expansion with Locked Height) */}
<div className="space-y-6 sm:space-y-8">
{/* Desktop View (md and up): 2-Row Shiftable Expansion Grid */}
<div className="hidden md:block space-y-8">
<ShiftableRow items={row1} />
<ShiftableRow items={row2} />
</div>
{/* Mobile / Phone View (<md): Pure Vertical Stack (NOT placed horizontally) */}
<div className="block md:hidden">
<MobileVerticalToolsList items={displayItems} />
</div>
{/* See More Section Button Redirecting to /tools */}
<div className="pt-6 text-center">
<Link
@@ -155,11 +160,55 @@ export function ShiftableToolsGridSection({
);
}
function MobileVerticalToolsList({ items }: { items: ToolMediaItem[] }) {
return (
<div className="flex flex-col gap-6 w-full">
{items.map((item) => (
<div key={item.id} className="w-full flex flex-col">
{item.mediaType === 'comparison' ? (
<div
style={{ borderRadius: '24px' }}
className="group block relative w-full h-[240px] rounded-[24px] overflow-hidden isolate bg-slate-950 border border-slate-900/[0.08] shadow-cream-sm"
>
<ToolWindowMedia item={item} isHovered={false} />
<Link
href={`/tools/${item.slug}`}
className="absolute top-3 right-3 z-30 inline-flex items-center gap-1.5 px-3.5 py-1.5 rounded-full text-[10px] font-mono font-bold tracking-wider uppercase bg-slate-950/90 text-white border border-white/20 hover:bg-blue-600 transition-colors shadow-sm cursor-pointer"
aria-label={`Open ${item.title}`}
>
<span>TRY TOOL</span>
<ArrowRight className="w-2.5 h-2.5" />
</Link>
</div>
) : (
<Link
href={`/tools/${item.slug}`}
style={{ borderRadius: '24px' }}
className="group block relative w-full h-[240px] rounded-[24px] overflow-hidden isolate bg-slate-950 border border-slate-900/[0.08] shadow-cream-sm cursor-pointer"
>
<ToolWindowMedia item={item} isHovered={false} />
</Link>
)}
{/* Title Below Window */}
<Link
href={`/tools/${item.slug}`}
className="mt-2.5 px-1 flex items-center justify-between text-sm font-display font-bold text-slate-900 hover:text-blue-600 transition-colors"
>
<span>{item.title}</span>
<ArrowRight className="w-4 h-4 text-slate-400 group-hover:text-blue-600 group-hover:translate-x-0.5 transition-transform" />
</Link>
</div>
))}
</div>
);
}
function ShiftableRow({ items }: { items: ToolMediaItem[] }) {
const [hoveredId, setHoveredId] = useState<string | null>(null);
return (
<div className="flex flex-row md:flex-row gap-4 sm:gap-6 w-full items-start overflow-x-auto md:overflow-visible pb-2 no-scrollbar scroll-smooth snap-x snap-mandatory touch-pan-x -mx-4 px-4 md:mx-0 md:px-0">
<div className="flex flex-row gap-6 w-full items-start overflow-visible">
{items.map((item) => {
const isHovered = hoveredId === item.id;
const hasOtherHovered = hoveredId !== null && !isHovered;