From ee6b5458de58fdb6b3350f73d1c06a89891037f2 Mon Sep 17 00:00:00 2001 From: sasha-astiadi Date: Fri, 7 Nov 2025 23:34:27 +0100 Subject: [PATCH] feat: convert network use cases to horizontal carousel with icons - Replaced static grid layout with scrollable carousel supporting touch/mouse navigation - Added hero icons to each use case card for visual hierarchy - Introduced intro card with navigation controls and updated styling for better mobile experience --- src/pages/network/NetworkUsecases.tsx | 153 +++++++++++++++++------- src/pages/network/SecondaryFeatures.tsx | 19 +-- 2 files changed, 119 insertions(+), 53 deletions(-) diff --git a/src/pages/network/NetworkUsecases.tsx b/src/pages/network/NetworkUsecases.tsx index b2d032f..509c08c 100644 --- a/src/pages/network/NetworkUsecases.tsx +++ b/src/pages/network/NetworkUsecases.tsx @@ -1,64 +1,125 @@ -import { Container } from '@/components/Container' -import { Eyebrow, SectionHeader, P } from '@/components/Texts' +"use client"; + +import { useRef } from "react"; +import { Eyebrow, SectionHeader, P, CT, CP } from "@/components/Texts"; +import { IoArrowBackOutline, IoArrowForwardOutline } from "react-icons/io5"; +import { + LockClosedIcon, + ArrowPathIcon, + GlobeAltIcon, +} from "@heroicons/react/24/solid"; const networkUseCases = [ { - title: 'Secure Access to Self-Hosted Services', + isIntro: true, + eyebrow: "USE CASES", + title: "Private Connectivity for People, Services, and Infrastructures", description: - 'Access your services, VMs, and clusters remotely without VPNs, public IPs, or port forwarding.', - ideal: - 'Ideal for: homelabs, personal clouds, long-running self-hosted stacks', + "Mycelium Network provides a secure, autonomous communication layer that works across homes, clouds, edge workloads, and global deployments.", }, { - title: 'Service-to-Service Networking Across Environments', + title: "Secure Access to Self-Hosted Services", description: - 'Connect applications running across home labs, cloud regions, edge nodes, and data centers all on one address space.', - ideal: - 'Ideal for: dev teams, distributed apps, container + K3s workloads', + "Access your services, VMs, and clusters remotely without VPNs, public IPs, or port forwarding.", + ideal: "Ideal for: homelabs, personal clouds, long-running self-hosted stacks", + icon: LockClosedIcon, }, { - title: 'Resilient Connectivity Across Regions & Outages', + title: "Service-to-Service Networking Across Environments", description: - 'Connect systems across countries, datacenters, edge locations, and remote deployments — with routing that automatically heals around ISP failures, censorship, and regional outages.', - ideal: - 'Ideal for: research networks, cross-border orgs, distributed compute, off-grid / rural deployments', + "Connect applications running across home labs, cloud regions, edge nodes, and data centers all on one address space.", + ideal: "Ideal for: dev teams, distributed apps, container + K3s workloads", + icon: GlobeAltIcon, }, -] + { + title: "Resilient Connectivity Across Regions & Outages", + description: + "Connect systems across countries, datacenters, edge locations, and remote deployments — with routing that automatically heals around ISP failures, censorship, and regional outages.", + ideal: + "Ideal for: research networks, cross-border orgs, distributed compute, off-grid / rural deployments", + icon: ArrowPathIcon, + }, +]; export function NetworkUsecases() { - return ( -
- -
- USE CASES - - Private Connectivity for People, Services, and Infrastructures - -

- Mycelium Network provides a secure, autonomous communication layer - that works across homes, clouds, edge workloads, and global deployments. -

-
+ const sliderRef = useRef(null); -
- {networkUseCases.map((useCase) => ( -
+ sliderRef.current?.scrollBy({ left: -400, behavior: "smooth" }); + + const scrollRight = () => + sliderRef.current?.scrollBy({ left: 400, behavior: "smooth" }); + + return ( +
+
+
+ +
+
    + {networkUseCases.map((item, idx) => ( +
  • -

    - {useCase.title} -

    -

    - {useCase.description} -

    -

    - {useCase.ideal} -

    -
+ {item.isIntro ? ( +
+
+ {item.eyebrow} + + {item.title} + +

+ {item.description} +

+
+ +
+ + +
+
+ ) : ( + <> + {/* ✅ Icon above title */} +
+ +
+ + + {item.title} + + + + {item.description} + + + {item.ideal} + + + )} + ))} -
- + +
- ) + ); } diff --git a/src/pages/network/SecondaryFeatures.tsx b/src/pages/network/SecondaryFeatures.tsx index 4ea73f6..5ed9359 100644 --- a/src/pages/network/SecondaryFeatures.tsx +++ b/src/pages/network/SecondaryFeatures.tsx @@ -187,12 +187,14 @@ function DeviceChartIcon(props: React.ComponentPropsWithoutRef<'svg'>) { export function SecondaryFeatures() { return ( -
- +
+ + {/* ✅ Top horizontal line with spacing */} +
+
+ + +

IN ACTIVE EVOLUTION

@@ -204,7 +206,7 @@ export function SecondaryFeatures() {

    {features.map((feature) => (
  • + {/* ✅ Bottom horizontal line with spacing */} +
    +
) }