Web: rdzen ekosystemu jako diagram - przerywane wiazania z przeplywem + dryfujace kafelki uczestnikow

This commit is contained in:
tisachi
2026-10-20 00:07:47 +02:00
parent d841e09a11
commit bae289fedf
2 changed files with 161 additions and 21 deletions

View File

@@ -8,6 +8,7 @@ import {
} from 'lucide-react';
import { Brandmark } from '../components/Brandmark';
import { Reveal } from '../components/Reveal';
import { cn } from '../lib/utils';
import { Section, SectionHeading } from './shared';
import type { TrackId } from '../lib/tracks';
@@ -87,30 +88,103 @@ export function Ecosystem() {
lead="FitOS nie jest aplikacją treningową z dodatkiem siłowni. To rdzeń, w którym potrzeby ćwiczących, trenerów i siłowni zazębiają się nawzajem — nikt nie jest tu użytkownikiem końcowym."
/>
<div className="mt-14 grid items-center gap-6 lg:grid-cols-[1fr_auto_1fr]">
<Reveal className="flex flex-col gap-4">
{[PARTICIPANTS[1], PARTICIPANTS[2]].map((p, i) => (
<ParticipantCard key={p.role} participant={p} align={i === 0 ? 'right' : 'left'} />
))}
</Reveal>
{/* Diagram rdzenia (lg+): przerywane wiązania z przepływem + kafelki dryfujące
niezależnie od animacji wejścia (dryf na wewnętrznym spanie) */}
<Reveal className="relative mt-14 hidden h-[540px] lg:block">
{/* Wiązania w % kontenera — końce dotykają krawędzi kafelków (w-[32%] h-[38%])
niezależnie od szerokości (preserveAspectRatio="none" skaluje obie osie) */}
<svg
aria-hidden="true"
viewBox="0 0 100 100"
preserveAspectRatio="none"
className="absolute inset-0 h-full w-full"
>
<line
className="link-line"
x1="45"
y1="44"
x2="32"
y2="19"
vectorEffect="non-scaling-stroke"
stroke="var(--accent)"
strokeOpacity="0.45"
strokeWidth="1.5"
/>
<line
className="link-line"
style={{ animationDelay: '-0.5s' }}
x1="45"
y1="56"
x2="32"
y2="81"
vectorEffect="non-scaling-stroke"
stroke="var(--accent)"
strokeOpacity="0.45"
strokeWidth="1.5"
/>
<line
className="link-line"
style={{ animationDelay: '-0.9s' }}
x1="55"
y1="45"
x2="68"
y2="22"
vectorEffect="non-scaling-stroke"
stroke="var(--accent)"
strokeOpacity="0.45"
strokeWidth="1.5"
/>
</svg>
<Reveal delayMs={80}>
<div className="window-glow grid size-40 place-items-center rounded-full border border-line bg-(image:--card-grad) shadow-glow">
<div className="window-glow absolute left-1/2 top-1/2 z-10 grid size-40 -translate-x-1/2 -translate-y-1/2 place-items-center rounded-full border border-line bg-(image:--card-grad) shadow-glow">
<div className="text-center">
<Brandmark size={40} className="mx-auto" />
<p className="mt-2 font-display text-sm font-bold text-ink">FitOS</p>
<p className="font-mono text-[10px] text-accent">rdzeń</p>
</div>
</div>
<div className="absolute left-0 top-[3%] z-10 h-[38%] w-[32%]">
<div className="drift-1 h-full">
<ParticipantCard participant={PARTICIPANTS[1]} align="right" className="h-full" />
</div>
</div>
<div className="absolute bottom-[3%] left-0 z-10 h-[38%] w-[32%]">
<div className="drift-2 h-full">
<ParticipantCard participant={PARTICIPANTS[2]} align="left" className="h-full" />
</div>
</div>
<div className="absolute right-0 top-[4%] z-10 h-[38%] w-[32%]">
<div className="drift-3 h-full">
<ParticipantCard participant={PARTICIPANTS[0]} align="left" className="h-full" />
</div>
</div>
<p className="absolute bottom-[10%] right-2 w-[31%] text-[12.5px] leading-relaxed text-dim">
Ten sam rdzeń obsługuje też <span className="text-ink">administrację</span>: katalogi
treści, weryfikacje i pełny audyt w tle.
</p>
</Reveal>
{/* Telefon/tablet: rdzeń nad listą uczestników */}
<div className="mt-14 flex flex-col gap-4 lg:hidden">
<Reveal className="flex justify-center">
<div className="window-glow grid size-36 place-items-center rounded-full border border-line bg-(image:--card-grad) shadow-glow">
<div className="text-center">
<Brandmark size={40} className="mx-auto" />
<p className="mt-2 font-display text-sm font-bold text-ink">FitOS</p>
<Brandmark size={34} className="mx-auto" />
<p className="mt-1.5 font-display text-sm font-bold text-ink">FitOS</p>
<p className="font-mono text-[10px] text-accent">rdzeń</p>
</div>
</div>
</Reveal>
<Reveal delayMs={160} className="flex flex-col gap-4">
<ParticipantCard participant={PARTICIPANTS[0]} align="left" />
<p className="text-center text-[12.5px] leading-relaxed text-dim lg:text-left">
Ten sam rdzeń obsługuje też <span className="text-ink">administrację</span>: katalogi
treści, weryfikacje i pełny audyt w tle.
</p>
</Reveal>
{PARTICIPANTS.map((p, i) => (
<Reveal key={p.role} delayMs={i * 60}>
<ParticipantCard participant={p} align="left" />
</Reveal>
))}
<p className="text-center text-[12.5px] leading-relaxed text-dim">
Ten sam rdzeń obsługuje też <span className="text-ink">administrację</span>: katalogi
treści, weryfikacje i pełny audyt w tle.
</p>
</div>
<div className="mt-12 grid gap-4 md:grid-cols-3" id="zazebienia">
@@ -146,16 +220,20 @@ export function Ecosystem() {
function ParticipantCard({
participant,
align,
className,
}: {
participant: Participant;
align: 'left' | 'right';
className?: string;
}) {
const Icon = participant.icon;
return (
<div
className={`window-glow rounded-lg border border-line bg-(image:--card-grad) p-4 shadow-card ${
align === 'right' ? 'text-right' : 'text-left'
}`}
className={cn(
'window-glow rounded-lg border border-line bg-(image:--card-grad) p-4 shadow-card',
align === 'right' ? 'text-right' : 'text-left',
className,
)}
>
<div className={`flex items-center gap-2 ${align === 'right' ? 'flex-row-reverse' : ''}`}>
<span className="grid size-8 place-items-center rounded-md border border-line bg-input text-accent">

View File

@@ -146,6 +146,58 @@
animation: streak-ignite 260ms var(--ease-out-quart) backwards;
}
/* Rdzeń ekosystemu — przepływ po przerywanych wiązaniach */
@keyframes dash-flow {
to {
stroke-dashoffset: -16;
}
}
.link-line {
stroke-dasharray: 4 4;
animation: dash-flow 1.4s linear infinite;
}
/* Delikatne pływanie kafelków uczestników wokół rdzenia */
@keyframes drift-1 {
from {
transform: translate3d(0, 0, 0) rotate(0deg);
}
to {
transform: translate3d(0, -9px, 0) rotate(-0.5deg);
}
}
@keyframes drift-2 {
from {
transform: translate3d(0, 0, 0) rotate(0deg);
}
to {
transform: translate3d(7px, 6px, 0) rotate(0.5deg);
}
}
@keyframes drift-3 {
from {
transform: translate3d(0, 0, 0) rotate(0deg);
}
to {
transform: translate3d(-7px, 8px, 0) rotate(-0.4deg);
}
}
.drift-1 {
animation: drift-1 9s ease-in-out infinite alternate;
}
.drift-2 {
animation: drift-2 11s ease-in-out infinite alternate;
}
.drift-3 {
animation: drift-3 13s ease-in-out infinite alternate;
}
/* Wejścia sekcji na scroll (IntersectionObserver dodaje .revealed) */
.reveal {
opacity: 0;
@@ -255,6 +307,16 @@
animation: none;
}
.link-line {
animation: none;
}
.drift-1,
.drift-2,
.drift-3 {
animation: none;
}
.reveal {
opacity: 1;
transform: none;