feat(tool-page): clean up alternating tool description layout (remove cards, tags, badges, and metrics)
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
|
||||
import React from 'react';
|
||||
import { AlternatingFeature, resolveLocalised } from '@/types';
|
||||
import { Sparkles, CheckCircle2 } from 'lucide-react';
|
||||
import { KineticText } from '@/components/magicui/kinetic-text';
|
||||
|
||||
interface AlternatingFeaturesSectionProps {
|
||||
@@ -23,124 +22,70 @@ export function AlternatingFeaturesSection({
|
||||
if (!features || features.length === 0) return null;
|
||||
|
||||
return (
|
||||
<section className={`py-10 sm:py-14 border-t border-rule bg-paper overflow-hidden ${className}`}>
|
||||
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 space-y-8 sm:space-y-10">
|
||||
<section className={`py-14 sm:py-20 border-t border-rule bg-paper overflow-hidden ${className}`}>
|
||||
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 space-y-12 sm:space-y-16">
|
||||
|
||||
{/* Section Heading */}
|
||||
<div className="text-center max-w-2xl mx-auto space-y-2">
|
||||
<div className="inline-flex items-center gap-2 px-3 py-1 rounded-full bg-accent/10 border border-accent/20 text-accent text-xs font-semibold font-sans">
|
||||
<Sparkles className="w-3.5 h-3.5" />
|
||||
<span>Core Capabilities</span>
|
||||
</div>
|
||||
<h2 className="text-2xl sm:text-3xl font-display font-bold text-ink tracking-tight">
|
||||
<div className="text-center max-w-3xl mx-auto space-y-3">
|
||||
<h2 className="text-3xl sm:text-4xl font-display font-bold text-ink tracking-tight leading-tight">
|
||||
<KineticText>{sectionTitle}</KineticText>
|
||||
</h2>
|
||||
<p className="text-xs sm:text-sm text-ink-2 font-sans leading-relaxed">
|
||||
<p className="text-base text-ink-2 font-sans leading-relaxed">
|
||||
{sectionSubtitle}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
{/* Alternating Feature Items: Left-Right Zig-Zag in Unified Studio Sheets */}
|
||||
<div className="space-y-6 sm:space-y-8">
|
||||
{/* Alternating Feature Items: Image at Left - Text at Right, then Text at Left - Image at Right (No cards, pure editorial) */}
|
||||
<div className="space-y-14 sm:space-y-20">
|
||||
{features.map((feature, idx) => {
|
||||
const isEven = idx % 2 === 0;
|
||||
const title = resolveLocalised(feature.title, locale);
|
||||
const desc = resolveLocalised(feature.description, locale);
|
||||
const badge = feature.badge ? resolveLocalised(feature.badge, locale) : undefined;
|
||||
const caption = feature.caption ? resolveLocalised(feature.caption, locale) : undefined;
|
||||
|
||||
return (
|
||||
<div
|
||||
key={idx}
|
||||
className="studio-sheet p-5 sm:p-7 rounded-2xl bg-paper-hi border border-rule shadow-xs hover:border-accent/40 transition-colors duration-200"
|
||||
className="grid grid-cols-1 lg:grid-cols-12 gap-8 lg:gap-14 items-center"
|
||||
>
|
||||
<div className="grid grid-cols-1 lg:grid-cols-12 gap-6 lg:gap-8 items-center">
|
||||
{/* Visual / Image Block */}
|
||||
<div
|
||||
className={`lg:col-span-5 ${
|
||||
isEven ? 'order-1 lg:order-1' : 'order-1 lg:order-2'
|
||||
}`}
|
||||
>
|
||||
<div className="group relative rounded-xl overflow-hidden bg-paper-2 border border-rule shadow-inner">
|
||||
{/* Aspect Frame */}
|
||||
<div className="aspect-[16/10] sm:aspect-[4/3] w-full overflow-hidden relative">
|
||||
{/* eslint-disable-next-line @next/next/no-img-element */}
|
||||
<img
|
||||
src={feature.image}
|
||||
alt={title}
|
||||
loading="lazy"
|
||||
decoding="async"
|
||||
className="w-full h-full object-cover transition-transform duration-500 group-hover:scale-105"
|
||||
/>
|
||||
|
||||
{/* Badge Overlay */}
|
||||
{badge && (
|
||||
<div className="absolute top-3 left-3 z-10 px-2.5 py-1 rounded-full bg-slate-900/80 backdrop-blur-md border border-white/20 text-[10px] font-semibold text-white shadow-xs font-sans">
|
||||
{badge}
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Optional Caption Overlay */}
|
||||
{caption && (
|
||||
<div className="absolute bottom-2.5 inset-x-2.5 z-10 p-2 rounded-xl bg-slate-900/80 backdrop-blur-md border border-white/10 text-[11px] font-sans text-slate-200 shadow-sm">
|
||||
{caption}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
{/* Visual / Image Block */}
|
||||
<div
|
||||
className={`lg:col-span-6 ${
|
||||
isEven ? 'order-1 lg:order-1' : 'order-1 lg:order-2'
|
||||
}`}
|
||||
>
|
||||
<div className="group relative rounded-3xl overflow-hidden bg-paper-2 border border-rule shadow-md transition-all duration-300 hover:shadow-lg">
|
||||
<div className="aspect-[16/10] sm:aspect-[4/3] w-full overflow-hidden">
|
||||
{/* eslint-disable-next-line @next/next/no-img-element */}
|
||||
<img
|
||||
src={feature.image}
|
||||
alt={title}
|
||||
loading="lazy"
|
||||
decoding="async"
|
||||
className="w-full h-full object-cover transition-transform duration-700 group-hover:scale-[1.02]"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Text Paragraph Block - Rich, informative, space-efficient */}
|
||||
<div
|
||||
className={`lg:col-span-7 flex flex-col justify-between space-y-4 py-1 ${
|
||||
isEven ? 'order-2 lg:order-2' : 'order-2 lg:order-1'
|
||||
}`}
|
||||
>
|
||||
<div className="space-y-3">
|
||||
<div className="flex items-center gap-2.5">
|
||||
<span className="px-3 py-1 rounded-full bg-accent/10 border border-accent/20 text-xs font-semibold text-accent uppercase tracking-wider font-sans">
|
||||
Feature 0{idx + 1}
|
||||
</span>
|
||||
{badge && (
|
||||
<span className="px-2.5 py-1 rounded-full bg-slate-100 text-slate-700 text-xs font-semibold font-sans">
|
||||
{badge}
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
{/* Text Paragraph Block: Clean Heading + Spacious Paragraph (No cards, no Feature labels, no pills) */}
|
||||
<div
|
||||
className={`lg:col-span-6 space-y-4 ${
|
||||
isEven ? 'order-2 lg:order-2' : 'order-2 lg:order-1'
|
||||
}`}
|
||||
>
|
||||
<h3 className="text-2xl sm:text-3xl lg:text-4xl font-display font-bold text-ink tracking-tight leading-snug">
|
||||
{title}
|
||||
</h3>
|
||||
|
||||
<h3 className="text-xl sm:text-2xl font-display font-bold text-ink tracking-tight leading-snug">
|
||||
{title}
|
||||
</h3>
|
||||
|
||||
<p className="text-sm sm:text-base text-ink-2 font-sans leading-relaxed pt-1">
|
||||
{desc}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
{/* Specifications & Hardware Highlights (Fills the column cleanly) */}
|
||||
<div className="pt-3 flex flex-wrap items-center gap-2.5">
|
||||
{feature.metrics && feature.metrics.length > 0 ? (
|
||||
feature.metrics.map((metric, mIdx) => (
|
||||
<div
|
||||
key={mIdx}
|
||||
className="px-3 py-1.5 rounded-xl bg-paper border border-rule text-xs font-sans flex items-center gap-1.5"
|
||||
>
|
||||
<span className="text-slate-500 text-[11px]">{metric.label}:</span>
|
||||
<span className="font-bold text-slate-900">{metric.value}</span>
|
||||
</div>
|
||||
))
|
||||
) : null}
|
||||
|
||||
<div className="px-3 py-1.5 rounded-xl bg-emerald-500/10 border border-emerald-500/20 text-xs font-sans text-emerald-700 flex items-center gap-1.5">
|
||||
<CheckCircle2 className="w-3.5 h-3.5 shrink-0" />
|
||||
<span>Volatile GPU RAM execution · Zero retention</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<p className="text-base sm:text-lg text-ink-2 font-sans leading-relaxed">
|
||||
{desc}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user