Compare commits
10 Commits
ee92692aac
...
ba12c1c976
| Author | SHA1 | Date | |
|---|---|---|---|
| ba12c1c976 | |||
| 9ed690c53f | |||
| 2e1e34a617 | |||
| e33dcdddac | |||
| 74caea6854 | |||
| 079398239f | |||
| c97ee638d9 | |||
| 8fc4cadd19 | |||
| 8a9b30f926 | |||
| 22faf4387d |
@@ -17,7 +17,6 @@ import { cookies } from 'next/headers';
|
||||
import { TransitionProvider } from '@/components/providers/TransitionProvider';
|
||||
import { PageTransitionShutter } from '@/components/providers/PageTransitionShutter';
|
||||
import { InitialLoader } from '@/components/providers/InitialLoader';
|
||||
import { TrenchLines } from '@/components/ui/decorations/TrenchLines';
|
||||
|
||||
const inter = Inter({
|
||||
subsets: ['latin'],
|
||||
@@ -180,7 +179,6 @@ export default async function Layout(props: {
|
||||
<TransitionProvider>
|
||||
<InitialLoader shouldShowLoader={!hasSeenLoader} />
|
||||
<PageTransitionShutter />
|
||||
<TrenchLines />
|
||||
<SkipLink />
|
||||
<Header navLinks={navLinks} />
|
||||
|
||||
|
||||
@@ -15,42 +15,6 @@
|
||||
.hide-scrollbar::-webkit-scrollbar {
|
||||
display: none; /* Chrome, Safari and Opera */
|
||||
}
|
||||
|
||||
/* Trassen-Hover Effect for Bento Grids */
|
||||
.trassen-border {
|
||||
position: relative;
|
||||
}
|
||||
.trassen-border::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 200%;
|
||||
height: 200%;
|
||||
background: conic-gradient(from 0deg, transparent 70%, #0e7a5c 100%);
|
||||
transform: translate(-50%, -50%) rotate(0deg);
|
||||
animation: rotate-trasse 3s linear infinite;
|
||||
opacity: 0;
|
||||
transition: opacity 0.4s ease;
|
||||
z-index: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
.trassen-border:hover::before {
|
||||
opacity: 1;
|
||||
}
|
||||
.trassen-content {
|
||||
position: absolute;
|
||||
inset: 1px;
|
||||
z-index: 1;
|
||||
border-radius: inherit;
|
||||
background-color: #050B14;
|
||||
background-clip: padding-box;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes rotate-trasse {
|
||||
from { transform: translate(-50%, -50%) rotate(0deg); }
|
||||
to { transform: translate(-50%, -50%) rotate(360deg); }
|
||||
}
|
||||
|
||||
/* Base Styles */
|
||||
|
||||
@@ -74,8 +74,8 @@ export function CompetenceBentoGrid(props: CompetenceBentoGridProps) {
|
||||
}
|
||||
|
||||
return (
|
||||
<section className="py-24 bg-neutral text-neutral-dark overflow-hidden relative">
|
||||
<div className="container">
|
||||
<section className="py-24 bg-neutral text-neutral-dark relative overflow-hidden">
|
||||
<div className="container relative z-10 px-4">
|
||||
<div className="flex flex-col md:flex-row justify-between items-end mb-12">
|
||||
<div className="max-w-2xl">
|
||||
<h2 className="text-primary font-bold tracking-wider uppercase text-sm mb-3">{badge}</h2>
|
||||
@@ -110,6 +110,8 @@ export function CompetenceBentoGrid(props: CompetenceBentoGridProps) {
|
||||
transition={{ delay: idx * 0.1 }}
|
||||
className={gridClasses}
|
||||
>
|
||||
<div className="absolute top-0 right-0 w-32 h-32 bg-primary/30 blur-3xl rounded-full -mr-10 -mt-10 group-hover:bg-primary/50 transition-colors duration-500" />
|
||||
<HoverShineOverlay shineColor="via-white/30" />
|
||||
<h4 className="font-bold text-xl md:text-2xl relative z-10 leading-snug">{item.title}</h4>
|
||||
{item.description && <p className="text-white/60 text-sm mt-3 relative z-10">{item.description}</p>}
|
||||
</motion.div>
|
||||
@@ -123,15 +125,14 @@ export function CompetenceBentoGrid(props: CompetenceBentoGridProps) {
|
||||
whileInView={{ opacity: 1, scale: 1 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ delay: idx * 0.1 }}
|
||||
className={`${gridClasses} group trassen-border border border-white/5 rounded-3xl overflow-hidden`}
|
||||
className={gridClasses}
|
||||
>
|
||||
<div className="trassen-content" />
|
||||
{!imgSrc && (
|
||||
<div className="absolute inset-[1px] rounded-[inherit] bg-neutral-dark z-[2] transition-colors duration-500 group-hover:bg-primary-dark" />
|
||||
<div className="absolute inset-0 bg-neutral-dark z-0 transition-colors duration-500 group-hover:bg-primary-dark" />
|
||||
)}
|
||||
{imgSrc && (
|
||||
<>
|
||||
<div className="absolute inset-[1px] rounded-[inherit] bg-white z-[2] overflow-hidden">
|
||||
<div className="absolute inset-0 bg-white z-0">
|
||||
<Image
|
||||
src={imgSrc}
|
||||
alt={item.title || ''}
|
||||
|
||||
@@ -54,9 +54,12 @@ export const JobListingBlock = async (props: JobListingBlockProps) => {
|
||||
const isLink = !!messe.url;
|
||||
const innerContent = (
|
||||
<>
|
||||
{/* Minimalist Trassen Content Background */}
|
||||
<div className="trassen-content border border-white/5" />
|
||||
{/* Glass Background Elements */}
|
||||
<div className="absolute inset-0 bg-gradient-to-br from-white/[0.03] to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-700" />
|
||||
<div className="absolute -top-32 -right-32 w-64 h-64 bg-primary/20 blur-[100px] rounded-full group-hover:bg-primary/30 transition-colors duration-700" />
|
||||
|
||||
<HoverShineOverlay shineColor="via-primary/10" />
|
||||
|
||||
<div className="relative z-10 flex-grow flex flex-col">
|
||||
<div className="flex justify-between items-start mb-6">
|
||||
<div className="inline-flex items-center gap-2 px-3 py-1 rounded-full bg-white/[0.05] border border-white/10 text-xs font-bold uppercase tracking-wider text-primary-light backdrop-blur-sm">
|
||||
@@ -113,7 +116,7 @@ export const JobListingBlock = async (props: JobListingBlockProps) => {
|
||||
</>
|
||||
);
|
||||
|
||||
const baseClasses = "group trassen-border rounded-[2rem] p-8 shadow-2xl transition-all duration-500 hover:scale-[1.02] hover:shadow-primary/10 flex flex-col h-full";
|
||||
const baseClasses = "group relative bg-[#050B14] rounded-[2rem] p-8 overflow-hidden border border-white/5 shadow-2xl transition-all duration-500 hover:scale-[1.02] hover:shadow-primary/10 flex flex-col h-full";
|
||||
|
||||
if (isLink) {
|
||||
return (
|
||||
|
||||
@@ -81,7 +81,7 @@ export function ReferencesSlider(props: ReferencesSliderProps) {
|
||||
};
|
||||
|
||||
return (
|
||||
<section className="py-24 bg-neutral-dark text-white overflow-hidden relative select-none">
|
||||
<section className="py-24 bg-neutral-dark text-white relative overflow-hidden">
|
||||
<div className="absolute inset-0 bg-gradient-to-b from-neutral-dark via-neutral-900 to-neutral-dark z-0" />
|
||||
|
||||
<div className="container relative z-10 mb-12 flex flex-col md:flex-row justify-between items-end gap-6">
|
||||
|
||||
@@ -65,7 +65,7 @@ export function SubCompanyTiles(props: SubCompanyTilesProps) {
|
||||
})) || defaultCompanies;
|
||||
|
||||
return (
|
||||
<section id="unternehmen" className="py-24 bg-neutral-dark border-b border-neutral-800">
|
||||
<section id="unternehmen" className="py-24 bg-neutral-dark border-b border-neutral-800 relative overflow-hidden">
|
||||
<div className="container relative z-10 px-4">
|
||||
|
||||
{(badge || title) && (
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
import React from 'react';
|
||||
import { motion, AnimatePresence } from 'framer-motion';
|
||||
import { useTransition } from './TransitionProvider';
|
||||
import Image from 'next/image';
|
||||
|
||||
export function PageTransitionShutter() {
|
||||
const { isTransitioning, transitionMessage } = useTransition();
|
||||
@@ -12,34 +13,20 @@ export function PageTransitionShutter() {
|
||||
{isTransitioning && (
|
||||
<motion.div
|
||||
key="shutter"
|
||||
initial={{ x: '-100%' }}
|
||||
animate={{ x: '0%' }}
|
||||
exit={{ x: '100%' }}
|
||||
transition={{ duration: 0.7, ease: [0.76, 0, 0.24, 1] }}
|
||||
className="fixed inset-0 z-[9998] bg-[#050B14] pointer-events-none flex items-center justify-center overflow-hidden"
|
||||
initial={{ y: '-100%' }}
|
||||
animate={{ y: '0%' }}
|
||||
exit={{ y: '100%' }}
|
||||
transition={{ duration: 0.9, ease: [0.16, 1, 0.3, 1] }}
|
||||
className="fixed left-0 w-full z-[9998] bg-[#050B14] pointer-events-none flex flex-col items-center justify-center overflow-visible"
|
||||
style={{
|
||||
height: '100vh',
|
||||
top: '0',
|
||||
}}
|
||||
>
|
||||
{/* HDD Drill Head (Leading Edge during entrance) */}
|
||||
<motion.div
|
||||
className="absolute top-0 right-0 bottom-0 w-[4px] bg-primary z-50 shadow-[0_0_40px_rgba(var(--color-primary),1)]"
|
||||
initial={{ opacity: 1 }}
|
||||
exit={{ opacity: 0 }} // Fade out drill head when exiting
|
||||
>
|
||||
{/* The glowing drill bit at the center */}
|
||||
<div className="absolute top-1/2 -translate-y-1/2 right-[-2px] w-[10px] h-[60px] bg-white rounded-full shadow-[0_0_30px_rgba(255,255,255,1)]" />
|
||||
<div className="absolute top-1/2 -translate-y-1/2 right-[-4px] w-[14px] h-[20px] bg-primary-light rounded-full" />
|
||||
</motion.div>
|
||||
{/* Subtle grid background */}
|
||||
<div className="absolute inset-0 bg-[linear-gradient(to_right,#8080800a_1px,transparent_1px),linear-gradient(to_bottom,#8080800a_1px,transparent_1px)] bg-[size:32px_32px] [mask-image:radial-gradient(ellipse_60%_50%_at_50%_50%,#000_70%,transparent_100%)]" />
|
||||
|
||||
{/* HDD Exit Trail (Trailing Edge during exit) */}
|
||||
<motion.div
|
||||
className="absolute top-0 left-0 bottom-0 w-[2px] bg-primary/50 z-50 shadow-[0_0_20px_rgba(var(--color-primary),0.5)]"
|
||||
initial={{ opacity: 0 }}
|
||||
exit={{ opacity: 1 }} // Fade in trail when exiting
|
||||
/>
|
||||
|
||||
{/* Subtle underground grid background */}
|
||||
<div className="absolute inset-0 bg-[linear-gradient(to_right,#8080800a_1px,transparent_1px),linear-gradient(to_bottom,#8080800a_1px,transparent_1px)] bg-[size:64px_64px] opacity-30" />
|
||||
|
||||
{/* Deep Glow simulating underground tunnel */}
|
||||
{/* Deep Glow inside the Shutter */}
|
||||
<div className="absolute inset-0 bg-[radial-gradient(circle_at_center,_var(--tw-gradient-stops))] from-primary/10 via-transparent to-transparent opacity-80 mix-blend-screen" />
|
||||
|
||||
<motion.div
|
||||
@@ -49,9 +36,9 @@ export function PageTransitionShutter() {
|
||||
transition={{ duration: 0.4, delay: 0.2 }}
|
||||
className="relative z-10 flex flex-col items-center w-full px-4"
|
||||
>
|
||||
{/* Masked Logo */}
|
||||
{/* Single Masked Logo Container to prevent double-logo offset */}
|
||||
<div
|
||||
className="relative w-48 h-16 sm:w-64 sm:h-20 filter drop-shadow-[0_0_15px_rgba(255,255,255,0.15)] mb-8"
|
||||
className="relative w-48 h-16 sm:w-64 sm:h-20 filter drop-shadow-[0_0_15px_rgba(255,255,255,0.15)]"
|
||||
style={{
|
||||
WebkitMaskImage: 'url(/assets/logo-white.png)',
|
||||
WebkitMaskSize: 'contain',
|
||||
@@ -63,7 +50,10 @@ export function PageTransitionShutter() {
|
||||
maskPosition: 'center'
|
||||
}}
|
||||
>
|
||||
{/* Base logo color (slightly dimmed to make the sweep visible) */}
|
||||
<div className="absolute inset-0 bg-white/70" />
|
||||
|
||||
{/* Sweeping intense white light */}
|
||||
<motion.div
|
||||
className="absolute inset-0 bg-gradient-to-r from-transparent via-white to-transparent skew-x-[-25deg]"
|
||||
initial={{ left: '-150%' }}
|
||||
@@ -72,7 +62,7 @@ export function PageTransitionShutter() {
|
||||
/>
|
||||
</div>
|
||||
|
||||
{/* Status Visualizer */}
|
||||
{/* Transition Message or Graphical Visualizer */}
|
||||
<AnimatePresence>
|
||||
{transitionMessage && (
|
||||
transitionMessage.startsWith('LANG_SWITCH:') ? (
|
||||
@@ -81,24 +71,48 @@ export function PageTransitionShutter() {
|
||||
return (
|
||||
<motion.div
|
||||
key="lang-switch-graphic"
|
||||
initial={{ opacity: 0, x: -20 }}
|
||||
animate={{ opacity: 1, x: 0 }}
|
||||
exit={{ opacity: 0, x: 20 }}
|
||||
className="flex items-center gap-6 drop-shadow-[0_0_30px_rgba(255,255,255,0.1)]"
|
||||
initial={{ opacity: 0, scale: 0.8 }}
|
||||
animate={{ opacity: 1, scale: 1 }}
|
||||
exit={{ opacity: 0, scale: 1.2 }}
|
||||
className="mt-12 mb-4 flex items-center gap-6 sm:gap-10 drop-shadow-[0_0_30px_rgba(255,255,255,0.1)]"
|
||||
>
|
||||
<div className="text-4xl opacity-50 grayscale">{fromLang}</div>
|
||||
{/* Old Language Flag - Fading out */}
|
||||
<div className="w-20 h-20 sm:w-28 sm:h-28 rounded-[2rem] bg-white/5 border border-white/10 backdrop-blur-md flex items-center justify-center text-5xl sm:text-7xl relative overflow-hidden group grayscale opacity-50">
|
||||
<motion.div
|
||||
className="absolute inset-0 bg-white/10"
|
||||
animate={{ scale: [1, 2], opacity: [0.5, 0] }}
|
||||
transition={{ duration: 1.5, repeat: Infinity }}
|
||||
/>
|
||||
<span className="relative z-10 leading-none">{fromLang}</span>
|
||||
</div>
|
||||
|
||||
{/* Connecting Trasse */}
|
||||
<div className="w-16 h-[2px] bg-white/20 relative overflow-hidden">
|
||||
<motion.div
|
||||
className="absolute top-0 bottom-0 w-8 bg-primary shadow-[0_0_10px_rgba(var(--color-primary),1)]"
|
||||
animate={{ left: ['-100%', '200%'] }}
|
||||
transition={{ duration: 1, repeat: Infinity, ease: 'linear' }}
|
||||
/>
|
||||
{/* Animated Arrow connecting them */}
|
||||
<div className="flex flex-col items-center gap-3">
|
||||
<motion.div
|
||||
animate={{ x: [0, 20, 0] }}
|
||||
transition={{ duration: 1.2, repeat: Infinity, ease: "easeInOut" }}
|
||||
className="text-primary drop-shadow-[0_0_15px_rgba(var(--color-primary),0.8)]"
|
||||
>
|
||||
<svg width="40" height="40" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5" strokeLinecap="round" strokeLinejoin="round">
|
||||
<line x1="5" y1="12" x2="19" y2="12"></line>
|
||||
<polyline points="12 5 19 12 12 19"></polyline>
|
||||
</svg>
|
||||
</motion.div>
|
||||
<div className="flex gap-2 opacity-50">
|
||||
<span className="w-2 h-2 rounded-full bg-primary animate-pulse shadow-[0_0_8px_rgba(var(--color-primary),1)]" />
|
||||
<span className="w-2 h-2 rounded-full bg-primary animate-pulse shadow-[0_0_8px_rgba(var(--color-primary),1)]" style={{ animationDelay: '150ms' }} />
|
||||
<span className="w-2 h-2 rounded-full bg-primary animate-pulse shadow-[0_0_8px_rgba(var(--color-primary),1)]" style={{ animationDelay: '300ms' }} />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="text-5xl relative drop-shadow-[0_0_15px_rgba(255,255,255,0.5)]">
|
||||
{toLang}
|
||||
{/* New Language Flag - Intense Glow */}
|
||||
<div className="w-24 h-24 sm:w-32 sm:h-32 rounded-[2.5rem] bg-primary/10 border border-primary/50 shadow-[0_0_80px_rgba(var(--color-primary),0.5)] backdrop-blur-xl flex items-center justify-center text-6xl sm:text-8xl relative overflow-hidden ring-4 ring-primary/30">
|
||||
<span className="relative z-10 drop-shadow-[0_0_15px_rgba(255,255,255,0.6)] leading-none">{toLang}</span>
|
||||
<motion.div
|
||||
className="absolute inset-0 w-[200%] h-full bg-gradient-to-r from-transparent via-white/30 to-transparent skew-x-[-20deg]"
|
||||
animate={{ x: ['-100%', '100%'] }}
|
||||
transition={{ duration: 1.5, repeat: Infinity, ease: "linear" }}
|
||||
/>
|
||||
</div>
|
||||
</motion.div>
|
||||
);
|
||||
@@ -106,17 +120,33 @@ export function PageTransitionShutter() {
|
||||
) : (
|
||||
<motion.div
|
||||
key="text-message"
|
||||
initial={{ opacity: 0, y: 10 }}
|
||||
animate={{ opacity: 1, y: 0 }}
|
||||
exit={{ opacity: 0, y: -10 }}
|
||||
className="px-6 py-2 rounded-full border border-primary/30 bg-primary/10 text-primary-light font-heading tracking-widest uppercase text-xs font-bold shadow-[0_0_20px_rgba(var(--color-primary),0.2)]"
|
||||
initial={{ opacity: 0, y: 15, scale: 0.9 }}
|
||||
animate={{ opacity: 1, y: 0, scale: 1 }}
|
||||
exit={{ opacity: 0, y: -15, scale: 0.9 }}
|
||||
transition={{ type: "spring", stiffness: 300, damping: 25 }}
|
||||
className="mt-10 mb-2 px-6 py-2.5 rounded-full border border-primary/40 bg-primary/10 shadow-[0_0_40px_rgba(var(--color-primary),0.3)] backdrop-blur-xl relative overflow-hidden flex items-center justify-center"
|
||||
>
|
||||
{transitionMessage}
|
||||
<motion.div
|
||||
className="absolute inset-0 w-[200%] h-full bg-gradient-to-r from-transparent via-white/20 to-transparent skew-x-[-20deg]"
|
||||
animate={{ x: ['-100%', '100%'] }}
|
||||
transition={{ duration: 1.5, repeat: Infinity, ease: "linear" }}
|
||||
/>
|
||||
<span className="text-white font-heading tracking-[0.2em] uppercase text-xs sm:text-sm font-extrabold flex items-center gap-3 relative z-10 drop-shadow-[0_0_8px_rgba(255,255,255,0.5)]">
|
||||
<motion.svg
|
||||
animate={{ rotate: 360 }}
|
||||
transition={{ duration: 8, repeat: Infinity, ease: "linear" }}
|
||||
xmlns="http://www.w3.org/2000/svg" className="w-5 h-5 text-primary-light" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5" strokeLinecap="round" strokeLinejoin="round"
|
||||
>
|
||||
<circle cx="12" cy="12" r="10"></circle>
|
||||
<line x1="2" y1="12" x2="22" y2="12"></line>
|
||||
<path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"></path>
|
||||
</motion.svg>
|
||||
{transitionMessage}
|
||||
</span>
|
||||
</motion.div>
|
||||
)
|
||||
)}
|
||||
</AnimatePresence>
|
||||
|
||||
</motion.div>
|
||||
</motion.div>
|
||||
)}
|
||||
|
||||
130
components/ui/decorations/StratumLines.tsx
Normal file
130
components/ui/decorations/StratumLines.tsx
Normal file
@@ -0,0 +1,130 @@
|
||||
'use client';
|
||||
|
||||
import { motion, useInView } from 'framer-motion';
|
||||
import { useRef } from 'react';
|
||||
|
||||
/**
|
||||
* StratumLines
|
||||
*
|
||||
* Abstract horizontal "earth stratum" lines that slide in from opposite sides
|
||||
* and form a downward-tapered open shape — evoking excavated earth layers.
|
||||
*
|
||||
* - On scroll entry: lines slide in with staggered delay, longest at top
|
||||
* - After entry: each line gently breathes (oscillates horizontally) forever
|
||||
*
|
||||
* Place inside any `relative overflow-hidden` section. Zero layout impact.
|
||||
*/
|
||||
|
||||
interface StratumLinesProps {
|
||||
/** Which corner to anchor to */
|
||||
placement?: 'bottom-left' | 'bottom-right' | 'top-left' | 'top-right';
|
||||
/** Invert colors for light backgrounds */
|
||||
invert?: boolean;
|
||||
className?: string;
|
||||
}
|
||||
|
||||
type StratumLine = {
|
||||
width: number; // % of container width
|
||||
fromRight: boolean; // which side it slides in from
|
||||
delay: number;
|
||||
breatheAmp: number; // px oscillation
|
||||
breatheDur: number;
|
||||
};
|
||||
|
||||
// The stratum lines — longest at top, tapering like an open excavation
|
||||
const LINES: StratumLine[] = [
|
||||
{ width: 100, fromRight: false, delay: 0.0, breatheAmp: 4, breatheDur: 5.2 },
|
||||
{ width: 88, fromRight: true, delay: 0.1, breatheAmp: 5, breatheDur: 4.7 },
|
||||
{ width: 74, fromRight: false, delay: 0.2, breatheAmp: 6, breatheDur: 5.8 },
|
||||
{ width: 60, fromRight: true, delay: 0.3, breatheAmp: 5, breatheDur: 4.3 },
|
||||
{ width: 46, fromRight: false, delay: 0.4, breatheAmp: 4, breatheDur: 6.1 },
|
||||
{ width: 32, fromRight: true, delay: 0.5, breatheAmp: 3, breatheDur: 5.5 },
|
||||
{ width: 18, fromRight: false, delay: 0.6, breatheAmp: 2, breatheDur: 4.9 },
|
||||
];
|
||||
|
||||
const PLACEMENT_CLASSES: Record<NonNullable<StratumLinesProps['placement']>, string> = {
|
||||
'bottom-left': 'bottom-0 left-0',
|
||||
'bottom-right': 'bottom-0 right-0',
|
||||
'top-left': 'top-0 left-0',
|
||||
'top-right': 'top-0 right-0',
|
||||
};
|
||||
|
||||
export function StratumLines({
|
||||
placement = 'bottom-left',
|
||||
invert = false,
|
||||
className = '',
|
||||
}: StratumLinesProps) {
|
||||
const ref = useRef<HTMLDivElement>(null);
|
||||
const isInView = useInView(ref, { once: true, margin: '0px 0px -8% 0px' });
|
||||
|
||||
const color = invert ? '#084c39' : '#0e7a5c';
|
||||
|
||||
return (
|
||||
<div
|
||||
ref={ref}
|
||||
className={`absolute pointer-events-none select-none ${PLACEMENT_CLASSES[placement]} ${className}`}
|
||||
style={{
|
||||
width: 'clamp(180px, 24vw, 380px)',
|
||||
height: 'clamp(160px, 20vw, 320px)',
|
||||
}}
|
||||
aria-hidden="true"
|
||||
>
|
||||
<div className="relative w-full h-full flex flex-col justify-end gap-[10%] pb-[8%]">
|
||||
{LINES.map((line, i) => {
|
||||
const isFromRight = placement.includes('right') ? !line.fromRight : line.fromRight;
|
||||
return (
|
||||
<motion.div
|
||||
key={i}
|
||||
style={{
|
||||
width: `${line.width}%`,
|
||||
height: '1.5px',
|
||||
background: color,
|
||||
opacity: 0.12 + (i / LINES.length) * 0.28,
|
||||
alignSelf: isFromRight ? 'flex-end' : 'flex-start',
|
||||
borderRadius: '2px',
|
||||
}}
|
||||
// Slide in from edge on first view
|
||||
initial={{
|
||||
x: isFromRight ? 60 : -60,
|
||||
opacity: 0,
|
||||
}}
|
||||
animate={
|
||||
isInView
|
||||
? {
|
||||
// Settle at natural position, then breathe
|
||||
x: [
|
||||
0,
|
||||
isFromRight ? -line.breatheAmp : line.breatheAmp,
|
||||
0,
|
||||
isFromRight ? -line.breatheAmp * 0.6 : line.breatheAmp * 0.6,
|
||||
0,
|
||||
],
|
||||
opacity: 0.12 + (i / LINES.length) * 0.28,
|
||||
}
|
||||
: { x: isFromRight ? 60 : -60, opacity: 0 }
|
||||
}
|
||||
transition={
|
||||
isInView
|
||||
? {
|
||||
x: {
|
||||
times: [0, 0.25, 0.5, 0.75, 1],
|
||||
duration: line.breatheDur,
|
||||
delay: line.delay,
|
||||
repeat: Infinity,
|
||||
ease: 'easeInOut',
|
||||
},
|
||||
opacity: {
|
||||
duration: 0.7,
|
||||
delay: line.delay,
|
||||
ease: 'easeOut',
|
||||
},
|
||||
}
|
||||
: { duration: 0.3 }
|
||||
}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -1,57 +0,0 @@
|
||||
'use client';
|
||||
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import { motion, useScroll, useSpring, useTransform } from 'framer-motion';
|
||||
|
||||
export function TrenchLines() {
|
||||
const { scrollYProgress } = useScroll();
|
||||
|
||||
// Apply a spring to make the scroll movement feel heavier, industrial
|
||||
const smoothProgress = useSpring(scrollYProgress, {
|
||||
stiffness: 100,
|
||||
damping: 30,
|
||||
restDelta: 0.001
|
||||
});
|
||||
|
||||
// Map progress to vertical position
|
||||
const yPosition = useTransform(smoothProgress, [0, 1], ['-15vh', '100vh']);
|
||||
const yPositionMarker = useTransform(smoothProgress, [0, 1], ['-15vh', '100vh']);
|
||||
|
||||
const [mounted, setMounted] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
setMounted(true);
|
||||
}, []);
|
||||
|
||||
if (!mounted) return null;
|
||||
|
||||
return (
|
||||
<div className="fixed inset-0 pointer-events-none z-0 overflow-hidden hidden sm:block">
|
||||
{/* Left Trench Line */}
|
||||
<div className="absolute top-0 bottom-0 left-6 lg:left-12 w-[1px] bg-white/[0.03]">
|
||||
<motion.div
|
||||
className="absolute top-0 left-[-1px] w-[3px] h-[15vh] bg-gradient-to-b from-transparent via-primary to-transparent shadow-[0_0_15px_rgba(var(--color-primary),0.8)]"
|
||||
style={{ y: yPosition }}
|
||||
/>
|
||||
{/* Subtle digging pulse marker */}
|
||||
<motion.div
|
||||
className="absolute left-[-2px] w-[5px] h-[5px] bg-white rounded-full shadow-[0_0_10px_rgba(255,255,255,1)]"
|
||||
style={{ y: yPositionMarker, marginTop: '7.5vh' }}
|
||||
/>
|
||||
</div>
|
||||
|
||||
{/* Right Trench Line */}
|
||||
<div className="absolute top-0 bottom-0 right-6 lg:right-12 w-[1px] bg-white/[0.03]">
|
||||
<motion.div
|
||||
className="absolute top-0 right-[-1px] w-[3px] h-[15vh] bg-gradient-to-b from-transparent via-primary to-transparent shadow-[0_0_15px_rgba(var(--color-primary),0.8)]"
|
||||
style={{ y: yPosition }}
|
||||
/>
|
||||
{/* Subtle digging pulse marker */}
|
||||
<motion.div
|
||||
className="absolute right-[-2px] w-[5px] h-[5px] bg-white rounded-full shadow-[0_0_10px_rgba(255,255,255,1)]"
|
||||
style={{ y: yPositionMarker, marginTop: '7.5vh' }}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Binary file not shown.
@@ -1 +0,0 @@
|
||||
377e5f87c784cd321d0b2bda4bde5f0b897351af
|
||||
Binary file not shown.
@@ -1 +0,0 @@
|
||||
e5cb25346814562c4654300c1be06738f31e361a
|
||||
Binary file not shown.
@@ -1 +0,0 @@
|
||||
c60f515e78ffa605c9377e0f75c72beca2a39895
|
||||
BIN
node_modules/.pnpm/@rolldown+binding-darwin-arm64@1.0.0-rc.12/node_modules/@rolldown/binding-darwin-arm64/rolldown-binding.darwin-arm64.node
generated
vendored
Normal file
BIN
node_modules/.pnpm/@rolldown+binding-darwin-arm64@1.0.0-rc.12/node_modules/@rolldown/binding-darwin-arm64/rolldown-binding.darwin-arm64.node
generated
vendored
Normal file
Binary file not shown.
@@ -1 +0,0 @@
|
||||
24b9da622907db62d368dc98e4bae2e8bbce98ca
|
||||
BIN
public/assets/videos/Messe_1080p.mp4 → node_modules/.pnpm/@sentry+cli-darwin@2.58.5/node_modules/@sentry/cli-darwin/bin/sentry-cli
generated
vendored
Normal file → Executable file
BIN
public/assets/videos/Messe_1080p.mp4 → node_modules/.pnpm/@sentry+cli-darwin@2.58.5/node_modules/@sentry/cli-darwin/bin/sentry-cli
generated
vendored
Normal file → Executable file
Binary file not shown.
@@ -1 +0,0 @@
|
||||
292106c94de86f75b75496cdc1cb590ac5581638
|
||||
BIN
node_modules/.pnpm/@swc+core-darwin-arm64@1.15.21/node_modules/@swc/core-darwin-arm64/swc.darwin-arm64.node
generated
vendored
Normal file
BIN
node_modules/.pnpm/@swc+core-darwin-arm64@1.15.21/node_modules/@swc/core-darwin-arm64/swc.darwin-arm64.node
generated
vendored
Normal file
Binary file not shown.
@@ -1 +0,0 @@
|
||||
ad21d5dee4148eb1aa4aa34c615d2715cbc8d3c6
|
||||
BIN
node_modules/.pnpm/@turbo+darwin-arm64@2.9.3/node_modules/@turbo/darwin-arm64/bin/turbo
generated
vendored
Executable file
BIN
node_modules/.pnpm/@turbo+darwin-arm64@2.9.3/node_modules/@turbo/darwin-arm64/bin/turbo
generated
vendored
Executable file
Binary file not shown.
@@ -1 +0,0 @@
|
||||
2bcc79d2467a4194d93564f952c6f0217856a940
|
||||
@@ -1 +0,0 @@
|
||||
65fc82e6766945c88e97349b92a1c232623053f4
|
||||
@@ -1 +0,0 @@
|
||||
1d56619f89dca808c86ab1049a49f9a5058abb3d
|
||||
@@ -1 +0,0 @@
|
||||
2914b272e6a7586f1f9faa4346bd4c3a4d422ca4
|
||||
@@ -1 +0,0 @@
|
||||
e6e4761c3da1bd4c7c97ee5d95ed4f20b346cf47
|
||||
Reference in New Issue
Block a user