This commit is contained in:
2025-09-13 16:22:16 +02:00
parent 115fb060e8
commit 0f5d64cbbc
13 changed files with 291 additions and 2 deletions

125
src/components/ui/Cube.tsx Normal file
View File

@@ -0,0 +1,125 @@
"use client";
import React from "react";
import Image from "next/image";
import { motion } from "framer-motion";
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 (
<div className="relative flex flex-col items-center">
<motion.div
className="relative cursor-pointer"
onMouseEnter={onHover}
onMouseLeave={onLeave}
style={{
zIndex: 10 - index,
}}
animate={{
scale: isActive ? 1.05 : 1,
}}
transition={{
duration: 0.3,
ease: "easeOut",
}}
>
{/* Image Cube */}
<Image
src="/images/cube.png"
alt="Cube"
width={507}
height={234}
className="w-60 sm:w-80 lg:w-96 h-auto drop-shadow-lg"
style={{
filter: isActive
? 'brightness(1.1) drop-shadow(0 25px 25px rgba(144, 137, 252, 0.4))'
: 'brightness(0.9) drop-shadow(0 10px 15px rgba(144, 137, 252, 0.2))',
}}
/>
{/* Title overlay */}
<div className="absolute inset-0 flex items-center justify-center">
<h3
className="text-[#2F3178] text-sm lg:text-base font-semibold text-center px-4 drop-shadow-lg"
style={{
transform: 'rotate(0deg) skewX(0deg)',
transformOrigin: 'center'
}}
>
{title}
</h3>
</div>
{/* Description with arrow line - Desktop */}
{isActive && (
<motion.div
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
exit={{ opacity: 0 }}
transition={{ duration: 0.3 }}
className="hidden lg:block absolute left-full top-1/2 -translate-y-1/2 z-50"
>
{/* Arrow line */}
<svg
className="absolute left-0 top-1/2 -translate-y-1/2"
width="120"
height="2"
viewBox="0 0 120 2"
fill="none"
>
<line
x1="0"
y1="1"
x2="120"
y2="1"
stroke="currentColor"
strokeWidth="1"
opacity="0.6"
/>
</svg>
{/* Description text */}
<div className="ml-32 w-80 text-[#2F3178]">
<h4 className="text-base font-semibold mb-2">
{descriptionTitle}
</h4>
<p className="text-sm leading-relaxed font-light">
{description}
</p>
</div>
</motion.div>
)}
{/* Description for Mobile - Below cube */}
{isActive && (
<motion.div
initial={{ opacity: 0, y: 10 }}
animate={{ opacity: 1, y: 0 }}
exit={{ opacity: 0, y: 10 }}
transition={{ duration: 0.3 }}
className="lg:hidden absolute top-full left-1/2 -translate-x-1/2 mt-8 z-50"
>
<div className="w-64 sm:w-80 px-4 text-[#2F3178]">
<h4 className="text-base font-semibold mb-2 text-center">
{descriptionTitle}
</h4>
<p className="text-sm leading-relaxed font-light text-center">
{description}
</p>
</div>
</motion.div>
)}
</motion.div>
</div>
);
}

View File

@@ -0,0 +1,75 @@
"use client";
import { useState } from "react";
import { motion } from "framer-motion";
import { Cube } from "@/components/ui/Cube";
const stackData = [
{
id: "agent",
title: "Agent Layer",
descriptionTitle: "Personal Agents - Secure & Sovereign",
description:
"Personal AI agents operate as secure digital twins, providing tailored intelligent assistance. They interact with existing chat, MCP agents, and coding tools while maintaining sovereignty and ecosystem compatibility.",
position: "top",
},
{
id: "ai",
title: "AI Layer",
descriptionTitle: "AI Agents & AI Brains + Mycelium Code & Compute Sandboxes",
description:
"Intelligence core combining LLMs with specialized AI agents. Mycelium-powered sandboxes provide secure environments for development, testing, and compilation with active memory systems and unbreakable network architecture.",
position: "middle",
},
{
id: "cloud",
title: "Cloud Layer",
descriptionTitle: "Mycelium Compute & Storage - Decentralized Infrastructure Layer",
description:
"Foundation runs bare metal Zero OS enabling autonomous cloud. Decentralized infrastructure supports Web2, Web3, AI workloads with superior scalability. Built on twenty years cloud experience.",
position: "bottom",
},
];
export function StackedCubes() {
const [active, setActive] = useState<string | null>("agent");
return (
<div
className="relative w-full flex items-center justify-center lg:justify-start min-h-[600px] sm:min-h-[700px] lg:min-h-[600px]"
onMouseLeave={() => setActive("agent")}
>
<motion.div
className="relative ml-0 sm:ml-4 lg:ml-8 h-[400px] w-96"
animate={{ y: ["-8px", "8px"] }}
transition={{
duration: 4,
repeat: Infinity,
repeatType: "reverse",
ease: "easeInOut",
}}
>
{stackData.map((layer, index) => (
<div
key={layer.id}
className="absolute"
style={{
top: `${index * 100}px`,
zIndex: active === layer.id ? 20 : 10 - index,
}}
>
<Cube
title={layer.title}
descriptionTitle={layer.descriptionTitle}
description={layer.description}
isActive={active === layer.id}
index={index}
onHover={() => setActive(layer.id)}
onLeave={() => {}}
/>
</div>
))}
</motion.div>
</div>
);
}