feat: 3 effects per row, 1:1 square cards, remake teeth whitener 1:1 with face, add firebase security guide
This commit is contained in:
@@ -32,7 +32,7 @@ export function RelatedToolsSection({ tools = [], locale = 'en' }: RelatedToolsS
|
||||
</Link>
|
||||
</div>
|
||||
|
||||
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6">
|
||||
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6">
|
||||
{tools.map((tool) => (
|
||||
<Link
|
||||
key={tool.id}
|
||||
|
||||
@@ -285,7 +285,7 @@ function ToolCardImage({ tool, toolName }: { tool: ToolItem; toolName: string })
|
||||
// 1. VIDEO TOOL (Background Remover)
|
||||
if (media.type === 'video') {
|
||||
return (
|
||||
<div className="relative w-full aspect-[4/3] rounded-xl overflow-hidden bg-paper-2 select-none group/img isolate shadow-inner">
|
||||
<div className="relative w-full aspect-square rounded-xl overflow-hidden bg-paper-2 select-none group/img isolate shadow-inner">
|
||||
<video
|
||||
ref={videoRef}
|
||||
src={media.videoUrl}
|
||||
@@ -294,7 +294,7 @@ function ToolCardImage({ tool, toolName }: { tool: ToolItem; toolName: string })
|
||||
loop
|
||||
playsInline
|
||||
preload="none"
|
||||
className="absolute inset-0 w-full h-full object-cover pointer-events-none"
|
||||
className="absolute inset-0 w-full h-full object-cover object-top pointer-events-none"
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
@@ -303,14 +303,14 @@ function ToolCardImage({ tool, toolName }: { tool: ToolItem; toolName: string })
|
||||
// 2. SINGLE IMAGE (Polaroid, etc.)
|
||||
if (media.type === 'single') {
|
||||
return (
|
||||
<div className="relative w-full aspect-[4/3] rounded-xl overflow-hidden bg-paper-2 select-none group/img shadow-inner">
|
||||
<div className="relative w-full aspect-square rounded-xl overflow-hidden bg-paper-2 select-none group/img shadow-inner">
|
||||
{/* eslint-disable-next-line @next/next/no-img-element */}
|
||||
<img
|
||||
src={media.image}
|
||||
alt={toolName}
|
||||
loading="lazy"
|
||||
decoding="async"
|
||||
className="absolute inset-0 w-full h-full object-cover transition-transform duration-500 group-hover:scale-[1.02]"
|
||||
className="absolute inset-0 w-full h-full object-cover object-top transition-transform duration-500 group-hover:scale-[1.02]"
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
@@ -323,7 +323,7 @@ function ToolCardImage({ tool, toolName }: { tool: ToolItem; toolName: string })
|
||||
onPointerDown={handleContainerPointerDown}
|
||||
onPointerMove={handleContainerPointerMove}
|
||||
onPointerLeave={handleContainerPointerLeave}
|
||||
className="relative w-full aspect-[4/3] rounded-xl overflow-hidden bg-paper-2 select-none cursor-ew-resize group/img shadow-inner touch-pan-y"
|
||||
className="relative w-full aspect-square rounded-xl overflow-hidden bg-paper-2 select-none cursor-ew-resize group/img shadow-inner touch-pan-y"
|
||||
style={{ touchAction: 'pan-y' }}
|
||||
>
|
||||
{/* Enhanced / After Image (Underneath) */}
|
||||
@@ -333,7 +333,7 @@ function ToolCardImage({ tool, toolName }: { tool: ToolItem; toolName: string })
|
||||
alt={`${toolName} after`}
|
||||
loading="lazy"
|
||||
decoding="async"
|
||||
className="absolute inset-0 w-full h-full object-cover pointer-events-none"
|
||||
className="absolute inset-0 w-full h-full object-cover object-top pointer-events-none"
|
||||
/>
|
||||
|
||||
{/* Original / Before Image (Clipped overlay) */}
|
||||
@@ -350,7 +350,7 @@ function ToolCardImage({ tool, toolName }: { tool: ToolItem; toolName: string })
|
||||
alt={`${toolName} before`}
|
||||
loading="lazy"
|
||||
decoding="async"
|
||||
className="absolute inset-0 w-full h-full object-cover pointer-events-none"
|
||||
className="absolute inset-0 w-full h-full object-cover object-top pointer-events-none"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -550,7 +550,7 @@ export function ToolGridSection({
|
||||
{resolveLocalised(title, locale)}
|
||||
</h3>
|
||||
)}
|
||||
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4 sm:gap-5">
|
||||
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-3 gap-5 sm:gap-6">
|
||||
{tools.map((tool) => (
|
||||
<ToolCard key={tool.id} tool={tool} locale={locale} />
|
||||
))}
|
||||
@@ -912,7 +912,7 @@ export function ToolGridSection({
|
||||
</div>
|
||||
|
||||
{searchResults.length > 0 ? (
|
||||
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4 sm:gap-5">
|
||||
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-3 gap-5 sm:gap-6">
|
||||
{searchResults.map((tool) => (
|
||||
<ToolCard key={tool.id} tool={tool} locale={locale} />
|
||||
))}
|
||||
@@ -938,7 +938,7 @@ export function ToolGridSection({
|
||||
) : activeCategoryItem ? (
|
||||
/* ================= SINGLE CATEGORY FOCUSED WORKSPACE (SHOWS ALL TOOLS IN CATEGORY) ================= */
|
||||
<div className="space-y-6">
|
||||
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4 sm:gap-5">
|
||||
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-3 gap-5 sm:gap-6">
|
||||
{activeCategoryItem.tools.map((tool) => (
|
||||
<ToolCard
|
||||
key={tool.id}
|
||||
@@ -960,9 +960,9 @@ export function ToolGridSection({
|
||||
: group.id;
|
||||
const catDesc = group.category ? resolveLocalised(group.category.description, locale) : '';
|
||||
|
||||
// In "All Tools" view, only 2 rows are visible (4 items per row * 2 rows = 8 tools)
|
||||
const displayedTools = group.tools.slice(0, 8);
|
||||
const hasMoreTools = group.tools.length > 8;
|
||||
// In "All Tools" view, only 2 rows are visible (3 items per row * 2 rows = 6 tools)
|
||||
const displayedTools = group.tools.slice(0, 6);
|
||||
const hasMoreTools = group.tools.length > 6;
|
||||
|
||||
return (
|
||||
<div
|
||||
@@ -1012,8 +1012,8 @@ export function ToolGridSection({
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* Tool Cards Grid: 4 items in a row, at most 2 rows (8 tools) visible */}
|
||||
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4 sm:gap-5">
|
||||
{/* Tool Cards Grid: 3 items in a row, at most 2 rows (6 tools) visible */}
|
||||
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-3 gap-5 sm:gap-6">
|
||||
{displayedTools.map((tool) => (
|
||||
<ToolCard
|
||||
key={tool.id}
|
||||
|
||||
Reference in New Issue
Block a user