From cdd6e3104bb2c14c78efefe18b5639cffe43f905 Mon Sep 17 00:00:00 2001 From: sasha-astiadi Date: Fri, 7 Nov 2025 13:19:13 +0100 Subject: [PATCH] feat: add horizontal scrolling capabilities section for compute page - Created new ComputeCapabilitiesNew component with card-based slider showcasing containers, VMs, and native Linux workloads - Implemented smooth horizontal scroll navigation with arrow controls and snap-to-card behavior - Added intro card with overview text and navigation controls, followed by capability cards with icons and descriptions --- src/pages/compute/ComputeCapabilitiesNew.tsx | 118 +++++++++++++++++++ src/pages/compute/ComputePage.tsx | 3 +- 2 files changed, 120 insertions(+), 1 deletion(-) create mode 100644 src/pages/compute/ComputeCapabilitiesNew.tsx diff --git a/src/pages/compute/ComputeCapabilitiesNew.tsx b/src/pages/compute/ComputeCapabilitiesNew.tsx new file mode 100644 index 0000000..918d5ef --- /dev/null +++ b/src/pages/compute/ComputeCapabilitiesNew.tsx @@ -0,0 +1,118 @@ +"use client"; + +import { useRef } from "react"; +import { Eyebrow, CP, CT, H5 } from "@/components/Texts"; +import { IoArrowBackOutline, IoArrowForwardOutline } from "react-icons/io5"; + +const capabilities = [ + { + isIntro: true, + eyebrow: "CAPABILITIES", + title: "What You Can Run", + description: + "Mycelium Compute supports multiple workload types on a single execution fabric, from legacy VMs to modern Kubernetes clusters.", + }, + { + title: "Containers & K3s", + description: + "Deploy services, web apps, and APIs with full Kubernetes compatibility.", + icon: ( +
+ Kubernetes +
+ ), + }, + { + title: "Virtual Machines", + description: + "Run legacy apps and specialized stacks with secure boot and attestation.", + icon: ( +
+ Virtual Machines +
+ ), + }, + { + title: "Native Linux Workloads", + description: + "Execute agents, batch jobs, and custom tooling statelessly across the grid.", + icon: ( +
+ Linux +
+ ), + }, +]; + +export function ComputeCapabilitiesNew() { + const sliderRef = useRef(null); + + const scrollLeft = () => sliderRef.current?.scrollBy({ left: -400, behavior: "smooth" }); + const scrollRight = () => sliderRef.current?.scrollBy({ left: 400, behavior: "smooth" }); + + return ( +
+
+
+ +
+ + {/* Horizontal Slider — shows part of next card */} +
    + {capabilities.map((item, idx) => ( +
  • + {/* First card with arrows */} + {item.isIntro ? ( +
    +
    + {item.eyebrow} +
    {item.title}
    +

    {item.description}

    +
    + + {/* Arrows inside first card */} +
    + + Learn more → + + + + +
    +
    + ) : ( + <> + {item.icon} + {item.title} + {item.description} + + )} +
  • + ))} +
+
+ +
+
+
+ ); +} diff --git a/src/pages/compute/ComputePage.tsx b/src/pages/compute/ComputePage.tsx index 6bb2e45..414202c 100644 --- a/src/pages/compute/ComputePage.tsx +++ b/src/pages/compute/ComputePage.tsx @@ -7,6 +7,7 @@ import { CallToAction } from './CallToAction' import { ComputeCapabilities } from './ComputeCapabilities' import { ComputeDesign } from './ComputeDesign' import { ComputeOverview } from './ComputeOverview' +import { ComputeCapabilitiesNew } from './ComputeCapabilitiesNew' export default function ComputePage() { @@ -17,7 +18,7 @@ export default function ComputePage() { - +