From de6a83a87c565bc55b6d5a3ff095ebc558bff934 Mon Sep 17 00:00:00 2001 From: sasha-astiadi Date: Tue, 16 Sep 2025 13:25:24 +0200 Subject: [PATCH] dd stacks --- src/components/Archives/Cubec.tsx | 116 +++++++++++++++++++++++++++++ src/components/StackSection.tsx | 2 +- src/components/ui/Cube.tsx | 75 +++++++++++++------ src/components/ui/StackedCubes.tsx | 2 +- 4 files changed, 171 insertions(+), 24 deletions(-) create mode 100644 src/components/Archives/Cubec.tsx diff --git a/src/components/Archives/Cubec.tsx b/src/components/Archives/Cubec.tsx new file mode 100644 index 0000000..3a9530f --- /dev/null +++ b/src/components/Archives/Cubec.tsx @@ -0,0 +1,116 @@ +"use client"; + +import React from "react"; +import Image from "next/image"; +import { motion } from "framer-motion"; +import { CT, CP } from '@/components/Texts'; + +interface CubeProps { + title: string; + descriptionTitle: string; + description: string; + isActive: boolean; + index: number; + onHover: () => void; + onLeave: () => void; +} + + +export function Cube({ title, descriptionTitle, description, isActive, index, onHover, onLeave }: CubeProps) { + return ( +
+ + {/* Image Cube */} + Cube + + {/* Title overlay */} +
+ + {title} + +
+ + {/* Description with arrow line - Desktop */} + {isActive && ( + + {/* Arrow line */} + + + + + {/* Description text */} +
+

+ {descriptionTitle} +

+ {description} +
+
+ )} + + {/* Description for Mobile - Below cube */} + {isActive && ( + +
+

+ {descriptionTitle} +

+ {description} +
+
+ )} +
+
+ ); +} diff --git a/src/components/StackSection.tsx b/src/components/StackSection.tsx index 14afaf2..ec688ed 100644 --- a/src/components/StackSection.tsx +++ b/src/components/StackSection.tsx @@ -44,7 +44,7 @@ export function StackSectionPreview() { animate={isInView ? { opacity: 1, y: 0 } : { opacity: 0, y: 30 }} transition={{ duration: 0.8, delay: 0.6 }} > -

+

Built with Mycelium technology, our AI infrastructure ensures unbreakable networks, complete data sovereignty, ultra-secure agent-human communication, and unhackable data storage systems.

diff --git a/src/components/ui/Cube.tsx b/src/components/ui/Cube.tsx index 3a9530f..bf93d4a 100644 --- a/src/components/ui/Cube.tsx +++ b/src/components/ui/Cube.tsx @@ -1,9 +1,7 @@ "use client"; import React from "react"; -import Image from "next/image"; import { motion } from "framer-motion"; -import { CT, CP } from '@/components/Texts'; interface CubeProps { title: string; @@ -15,12 +13,40 @@ interface CubeProps { onLeave: () => void; } +const CubeSvg: React.FC & { index: number }> = ({ index, ...props }) => ( + + + + + + + + + +); export function Cube({ title, descriptionTitle, description, isActive, index, onHover, onLeave }: CubeProps) { return (
- {/* Image Cube */} - Cube {/* Title overlay */}
- +

{title} - +

{/* Description with arrow line - Desktop */} @@ -77,18 +104,20 @@ export function Cube({ title, descriptionTitle, description, isActive, index, on y1="1" x2="120" y2="1" - stroke="currentColor" + stroke="white" strokeWidth="1" opacity="0.6" /> {/* Description text */} -
-

+
+

{descriptionTitle}

- {description} +

+ {description} +

)} @@ -102,11 +131,13 @@ export function Cube({ title, descriptionTitle, description, isActive, index, on transition={{ duration: 0.3 }} className="lg:hidden absolute top-full left-1/2 -translate-x-1/2 mt-8 z-50" > -
-

+
+

{descriptionTitle}

- {description} +

+ {description} +

)} diff --git a/src/components/ui/StackedCubes.tsx b/src/components/ui/StackedCubes.tsx index e153c45..4d5cf64 100644 --- a/src/components/ui/StackedCubes.tsx +++ b/src/components/ui/StackedCubes.tsx @@ -2,7 +2,7 @@ import { useState } from "react"; import { motion } from "framer-motion"; -import { Cube } from "@/components/ui/Cube"; +import { Cube } from "@/components/ui/Cube" const stackData = [ {