refactor: add device icons to PodsFeatures cards and wrap PodsPage sections with AnimatedSection

- Added useId import for unique gradient IDs in SVG icons
- Created six device icon components: DeviceArrowIcon, DeviceCardsIcon, DeviceClockIcon, DeviceListIcon, DeviceLockIcon, DeviceChartIcon
- Mapped icons array to use cases with corresponding device icons
- Updated PodsFeatures to render icons above card titles with h-8 w-8 sizing
- Added mt-6 spacing to card titles for icon separation
- Wrapped all
This commit is contained in:
2025-11-19 12:11:19 +01:00
parent 00c5f7f880
commit d8a7a7331a
3 changed files with 201 additions and 28 deletions

View File

@@ -1,5 +1,6 @@
"use client"; "use client";
import { useId } from "react";
import { Container } from "@/components/Container"; import { Container } from "@/components/Container";
const useCases = [ const useCases = [
@@ -65,6 +66,160 @@ const useCases = [
}, },
]; ];
function DeviceArrowIcon(props: React.ComponentPropsWithoutRef<'svg'>) {
return (
<svg viewBox="0 0 32 32" aria-hidden="true" {...props}>
<path
fillRule="evenodd"
clipRule="evenodd"
d="M9 0a4 4 0 00-4 4v24a4 4 0 004 4h14a4 4 0 004-4V4a4 4 0 00-4-4H9zm0 2a2 2 0 00-2 2v24a2 2 0 002 2h14a2 2 0 002-2V4a2 2 0 00-2-2h-1.382a1 1 0 00-.894.553l-.448.894a1 1 0 01-.894.553h-6.764a1 1 0 01-.894-.553l-.448-.894A1 1 0 0010.382 2H9z"
fill="#737373"
/>
<path
d="M12 25l8-8m0 0h-6m6 0v6"
stroke="#171717"
strokeWidth={2}
strokeLinecap="round"
/>
<circle cx={16} cy={16} r={16} fill="#A3A3A3" fillOpacity={0.2} />
</svg>
);
}
function DeviceCardsIcon(props: React.ComponentPropsWithoutRef<'svg'>) {
let id = useId();
return (
<svg viewBox="0 0 32 32" aria-hidden="true" {...props}>
<path
fillRule="evenodd"
clipRule="evenodd"
d="M9 0a4 4 0 00-4 4v24a4 4 0 004 4h14a4 4 0 004-4V4a4 4 0 00-4-4H9zm0 2a2 2 0 00-2 2v24a2 2 0 002 2h14a2 2 0 002-2V4a2 2 0 00-2-2h-1.382a1 1 0 00-.894.553l-.448.894a1 1 0 01-.894.553h-6.764a1 1 0 01-.894-.553l-.448-.894A1 1 0 0010.382 2H9z"
fill="#737373"
/>
<path
fillRule="evenodd"
clipRule="evenodd"
d="M9 13a1 1 0 011-1h12a1 1 0 011 1v2a1 1 0 01-1 1H10a1 1 0 01-1-1v-2zm0 6a1 1 0 011-1h12a1 1 0 011 1v2a1 1 0 01-1 1H10a1 1 0 01-1-1v-2zm1 5a1 1 0 00-1 1v2a1 1 0 001 1h12a1 1 0 001-1v-2a1 1 0 00-1-1H10z"
fill={`url(#${id}-gradient)`}
/>
<rect x={9} y={6} width={14} height={4} rx={1} fill="#171717" />
<circle cx={16} cy={16} r={16} fill="#A3A3A3" fillOpacity={0.2} />
<defs>
<linearGradient
id={`${id}-gradient`}
x1={16}
y1={12}
x2={16}
y2={28}
gradientUnits="userSpaceOnUse"
>
<stop stopColor="#737373" />
<stop offset={1} stopColor="#737373" stopOpacity={0} />
</linearGradient>
</defs>
</svg>
);
}
function DeviceClockIcon(props: React.ComponentPropsWithoutRef<'svg'>) {
return (
<svg viewBox="0 0 32 32" aria-hidden="true" {...props}>
<circle cx={16} cy={16} r={16} fill="#A3A3A3" fillOpacity={0.2} />
<path
fillRule="evenodd"
clipRule="evenodd"
d="M5 4a4 4 0 014-4h14a4 4 0 014 4v10h-2V4a2 2 0 00-2-2h-1.382a1 1 0 00-.894.553l-.448.894a1 1 0 01-.894.553h-6.764a1 1 0 01-.894-.553l-.448-.894A1 1 0 0010.382 2H9a2 2 0 00-2 2v24a2 2 0 002 2h5v2H9a4 4 0 01-4-4V4z"
fill="#737373"
/>
<path
fillRule="evenodd"
clipRule="evenodd"
d="M24 32a8 8 0 100-16 8 8 0 000 16zm1-8.414V19h-2v5.414l4 4L28.414 27 25 23.586z"
fill="#171717"
/>
</svg>
);
}
function DeviceListIcon(props: React.ComponentPropsWithoutRef<'svg'>) {
return (
<svg viewBox="0 0 32 32" fill="none" aria-hidden="true" {...props}>
<path
fillRule="evenodd"
clipRule="evenodd"
d="M9 0a4 4 0 00-4 4v24a4 4 0 004 4h14a4 4 0 004-4V4a4 4 0 00-4-4H9zm0 2a2 2 0 00-2 2v24a2 2 0 002 2h14a2 2 0 002-2V4a2 2 0 00-2-2h-1.382a1 1 0 00-.894.553l-.448.894a1 1 0 01-.894.553h-6.764a1 1 0 01-.894-.553l-.448-.894A1 1 0 0010.382 2H9z"
fill="#737373"
/>
<circle cx={11} cy={14} r={2} fill="#171717" />
<circle cx={11} cy={20} r={2} fill="#171717" />
<circle cx={11} cy={26} r={2} fill="#171717" />
<path
d="M16 14h6M16 20h6M16 26h6"
stroke="#737373"
strokeWidth={2}
strokeLinecap="square"
/>
<circle cx={16} cy={16} r={16} fill="#A3A3A3" fillOpacity={0.2} />
</svg>
);
}
function DeviceLockIcon(props: React.ComponentPropsWithoutRef<'svg'>) {
return (
<svg viewBox="0 0 32 32" aria-hidden="true" {...props}>
<circle cx={16} cy={16} r={16} fill="#A3A3A3" fillOpacity={0.2} />
<path
fillRule="evenodd"
clipRule="evenodd"
d="M5 4a4 4 0 014-4h14a4 4 0 014 4v10h-2V4a2 2 0 00-2-2h-1.382a1 1 0 00-.894.553l-.448.894a1 1 0 01-.894.553h-6.764a1 1 0 01-.894-.553l-.448-.894A1 1 0 0010.382 2H9a2 2 0 00-2 2v24a2 2 0 002 2h5v2H9a4 4 0 01-4-4V4z"
fill="#737373"
/>
<path
fillRule="evenodd"
clipRule="evenodd"
d="M18 19.5a3.5 3.5 0 117 0V22a2 2 0 012 2v6a2 2 0 01-2 2h-7a2 2 0 01-2-2v-6a2 2 0 012-2v-2.5zm2 2.5h3v-2.5a1.5 1.5 0 00-3 0V22z"
fill="#171717"
/>
</svg>
);
}
function DeviceChartIcon(props: React.ComponentPropsWithoutRef<'svg'>) {
return (
<svg viewBox="0 0 32 32" fill="none" aria-hidden="true" {...props}>
<path
fillRule="evenodd"
clipRule="evenodd"
d="M9 0a4 4 0 00-4 4v24a4 4 0 004 4h14a4 4 0 004-4V4a4 4 0 00-4-4H9zm0 2a2 2 0 00-2 2v24a2 2 0 002 2h14a2 2 0 002-2V4a2 2 0 00-2-2h-1.382a1 1 0 00-.894.553l-.448.894a1 1 0 01-.894.553h-6.764a1 1 0 01-.894-.553l-.448-.894A1 1 0 0010.382 2H9z"
fill="#737373"
/>
<path
fillRule="evenodd"
clipRule="evenodd"
d="M23 13.838V26a2 2 0 01-2 2H11a2 2 0 01-2-2V15.65l2.57 3.212a1 1 0 001.38.175L15.4 17.2a1 1 0 011.494.353l1.841 3.681c.399.797 1.562.714 1.843-.13L23 13.837z"
fill="#171717"
/>
<path
d="M10 12h12"
stroke="#737373"
strokeWidth={2}
strokeLinecap="square"
/>
<circle cx={16} cy={16} r={16} fill="#A3A3A3" fillOpacity={0.2} />
</svg>
);
}
const icons = [
DeviceListIcon, // Private Messaging & Calling
DeviceLockIcon, // Safe File Storage & Sharing
DeviceClockIcon, // Personal Calendar & Meetings (was Access icon)
DeviceCardsIcon, // Private Communities & Teams (was QSFS icon)
DeviceChartIcon, // Quantum Safe File System (was Meetings icon)
DeviceArrowIcon, // Access From Any Device (was Communities icon)
];
export function PodsFeatures() { export function PodsFeatures() {
return ( return (
<section className="w-full max-w-8xl mx-auto bg-transparent"> <section className="w-full max-w-8xl mx-auto bg-transparent">
@@ -94,15 +249,18 @@ export function PodsFeatures() {
className="mx-auto mt-12 grid max-w-2xl grid-cols-1 gap-6 className="mx-auto mt-12 grid max-w-2xl grid-cols-1 gap-6
sm:grid-cols-2 lg:max-w-none lg:grid-cols-3 md:gap-y-10" sm:grid-cols-2 lg:max-w-none lg:grid-cols-3 md:gap-y-10"
> >
{useCases.map((useCase) => ( {useCases.map((useCase, index) => {
const Icon = icons[index];
return (
<li <li
key={useCase.title} key={useCase.title}
className="rounded-md border border-gray-100 bg-white p-6 transition-all duration-300 className="rounded-md border border-gray-100 bg-white p-6 transition-all duration-300
hover:scale-105 hover:border-cyan-500 hover:shadow-lg hover:shadow-cyan-500/20 flex flex-col" hover:scale-105 hover:border-cyan-500 hover:shadow-lg hover:shadow-cyan-500/20 flex flex-col"
> >
{Icon && <Icon className="h-8 w-8" />}
{/* Title + label */} {/* Title + label */}
<div className="flex items-center justify-between"> <div className="flex items-center justify-between">
<h3 className="font-semibold text-gray-900"> <h3 className="mt-6 font-semibold text-gray-900">
{useCase.title} {useCase.title}
</h3> </h3>
</div> </div>
@@ -112,7 +270,8 @@ export function PodsFeatures() {
{useCase.description} {useCase.description}
</p> </p>
</li> </li>
))} );
})}
</ul> </ul>
</Container> </Container>

View File

@@ -29,8 +29,7 @@ export function PodsHow() {
return ( return (
<section className="relative w-full bg-[#121212] overflow-hidden"> <section className="relative w-full bg-[#121212] overflow-hidden">
<div className="max-w-7xl bg-[#121212] mx-auto py-6 border border-t-0 border-b-0 border-gray-800"></div>
<div className="w-full border-t border-l border-r border-gray-800" />
<div className="max-w-7xl mx-auto px-6 lg:px-8 py-12 border border-t-0 border-b-0 border-gray-800 bg-[#111111] overflow-hidden"> <div className="max-w-7xl mx-auto px-6 lg:px-8 py-12 border border-t-0 border-b-0 border-gray-800 bg-[#111111] overflow-hidden">

View File

@@ -5,17 +5,32 @@ import { CallToAction } from './CallToAction';
import { PodsWhat } from './PodsWhat'; import { PodsWhat } from './PodsWhat';
import { PodsPro } from './PodsPro'; import { PodsPro } from './PodsPro';
import { PodsBento } from './PodsBento'; import { PodsBento } from './PodsBento';
import { AnimatedSection } from '../../components/AnimatedSection';
const PodsPage = () => { const PodsPage = () => {
return ( return (
<> <>
<AnimatedSection>
<Homepod /> <Homepod />
</AnimatedSection>
<AnimatedSection>
<PodsWhat /> <PodsWhat />
<PodsFeatures /> </AnimatedSection>
<AnimatedSection>
<PodsHow /> <PodsHow />
</AnimatedSection>
<AnimatedSection>
<PodsFeatures />
</AnimatedSection>
<AnimatedSection>
<PodsBento /> <PodsBento />
</AnimatedSection>
<AnimatedSection>
<PodsPro /> <PodsPro />
</AnimatedSection>
<AnimatedSection>
<CallToAction /> <CallToAction />
</AnimatedSection>
</> </>
); );
}; };