Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| start [2026/06/11 20:59] – jumpstartadmin | start [2026/06/11 21:28] (current) – jumpstartadmin | ||
|---|---|---|---|
| Line 57: | Line 57: | ||
| .js-card: | .js-card: | ||
| - | .js-label { position: absolute; left: 0; width: 100%; z-index: 3; padding: 16px; font-family: | + | .js-label { position: absolute; left: 0; width: 100%; z-index: 3; padding: 16px; font-family: |
| .js-card: | .js-card: | ||
| Line 97: | Line 97: | ||
| } | } | ||
| - | .js-title-sub { font-family: | + | .js-title-sub { font-family: |
| - | .js-title-main { font-family: | + | .js-title-main { font-family: |
| .js-title-divider { display: flex; align-items: | .js-title-divider { display: flex; align-items: | ||
| Line 121: | Line 121: | ||
| .js-card: | .js-card: | ||
| - | /* Non-hovered cards — analog TV signal losing reception | + | /* VHS chromatic aberration |
| - | .js-wrap: | + | .js-card |
| - | | + | position: relative; |
| - | transition: filter 0.7s ease !important; | + | display: block; |
| + | overflow: hidden; | ||
| + | | ||
| + | transition: filter 0.25s ease !important; | ||
| } | } | ||
| - | /* Slow rolling scanline — like a dying analog signal */ | + | .js-card.js-fading { |
| - | .js-wrap:has(.js-card:hover) .js-card: | + | filter: saturate(0.55) brightness(0.92) !important; |
| + | } | ||
| + | |||
| + | /* Scanline overlay on fading cards */ | ||
| + | .js-card.js-fading::after { | ||
| content: '' | content: '' | ||
| position: absolute !important; | position: absolute !important; | ||
| inset: 0 !important; | inset: 0 !important; | ||
| - | z-index: | + | z-index: |
| pointer-events: | pointer-events: | ||
| background: repeating-linear-gradient( | background: repeating-linear-gradient( | ||
| Line 138: | Line 145: | ||
| transparent 0px, | transparent 0px, | ||
| transparent 3px, | transparent 3px, | ||
| - | rgba(255,255,255,0.018) 3px, | + | rgba(0, 0, 0, 0.08) 3px, |
| - | rgba(255,255,255,0.018) 4px | + | rgba(0, 0, 0, 0.08) 4px |
| ) !important; | ) !important; | ||
| - | animation: analogRoll 4s linear infinite !important; | ||
| } | } | ||
| - | @keyframes analogRoll | + | /* RGB canvas overlay */ |
| - | | + | .js-rgb-canvas |
| - | | + | position: |
| + | inset: | ||
| + | | ||
| + | pointer-events: | ||
| + | opacity: 0; | ||
| + | transition: opacity 0.6s ease; | ||
| + | } | ||
| + | .js-card.js-fading .js-rgb-canvas { | ||
| + | opacity: 1; | ||
| } | } | ||
| - | /* Hovered | + | /* Block card hover effects when title zone is active |
| - | .js-wrap:has(.js-card: | + | .js-wrap.js-title-active .js-card: |
| - | | + | transform: scale(1) !important; |
| - | | + | filter: brightness(0.6) saturate(0.8) !important; |
| + | } | ||
| + | .js-wrap.js-title-active | ||
| + | opacity: 1 !important; | ||
| + | } | ||
| + | .js-wrap.js-title-active | ||
| + | | ||
| + | | ||
| + | letter-spacing: | ||
| + | color: #EDE8F5 !important; | ||
| + | text-shadow: 0 1px 0 rgba(0,0,0,0.9), 0 -1px 0 rgba(255, | ||
| + | opacity: 0.7 !important; | ||
| + | } | ||
| + | .js-wrap.js-title-active .js-card: | ||
| + | transform: translateX(-50%) scaleX(0) !important; | ||
| + | } | ||
| + | .js-wrap.js-title-active .js-card: | ||
| + | opacity: 0 !important; | ||
| } | } | ||
| Line 298: | Line 329: | ||
| canvas.height = window.innerHeight; | canvas.height = window.innerHeight; | ||
| }); | }); | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | // VHS RGB chromatic aberration using canvas | ||
| + | (function() { | ||
| + | const cards = document.querySelectorAll(' | ||
| + | const wrap = document.querySelector(' | ||
| + | const titleEl = document.querySelector(' | ||
| + | let activeCard = null; | ||
| + | let fadeTimeout = null; | ||
| + | const canvases = new Map(); | ||
| + | const animFrames = new Map(); | ||
| + | |||
| + | // Create a canvas overlay for each card | ||
| + | cards.forEach(card => { | ||
| + | const canvas = document.createElement(' | ||
| + | canvas.className = ' | ||
| + | card.appendChild(canvas); | ||
| + | canvases.set(card, | ||
| + | }); | ||
| + | |||
| + | function drawRGB(card) { | ||
| + | const canvas = canvases.get(card); | ||
| + | const video = card.querySelector(' | ||
| + | if (!video || !canvas) return; | ||
| + | |||
| + | const w = card.offsetWidth; | ||
| + | const h = card.offsetHeight; | ||
| + | canvas.width = w; | ||
| + | canvas.height = h; | ||
| + | const ctx = canvas.getContext(' | ||
| + | |||
| + | function frame() { | ||
| + | if (!card.classList.contains(' | ||
| + | ctx.clearRect(0, | ||
| + | animFrames.delete(card); | ||
| + | return; | ||
| + | } | ||
| + | ctx.clearRect(0, | ||
| + | |||
| + | ctx.save(); | ||
| + | ctx.globalCompositeOperation = ' | ||
| + | ctx.globalAlpha = 0.18; | ||
| + | ctx.filter = ' | ||
| + | ctx.drawImage(video, | ||
| + | ctx.restore(); | ||
| + | |||
| + | ctx.save(); | ||
| + | ctx.globalCompositeOperation = ' | ||
| + | ctx.globalAlpha = 0.14; | ||
| + | ctx.filter = ' | ||
| + | ctx.drawImage(video, | ||
| + | ctx.restore(); | ||
| + | |||
| + | animFrames.set(card, | ||
| + | } | ||
| + | |||
| + | if (!animFrames.has(card)) { | ||
| + | animFrames.set(card, | ||
| + | } | ||
| + | } | ||
| + | |||
| + | function isTitleZone(e) { | ||
| + | const sub = document.querySelector(' | ||
| + | const main = document.querySelector(' | ||
| + | const divider = document.querySelector(' | ||
| + | if (!sub || !main) return false; | ||
| + | const top = sub.getBoundingClientRect().top - 20; | ||
| + | const bottom = (divider || main).getBoundingClientRect().bottom + 20; | ||
| + | const left = main.getBoundingClientRect().left - 40; | ||
| + | const right = main.getBoundingClientRect().right + 40; | ||
| + | return e.clientX >= left && e.clientX <= right && | ||
| + | | ||
| + | } | ||
| + | |||
| + | function setTitleGlow(on) { | ||
| + | if (!titleEl) return; | ||
| + | if (on) { | ||
| + | titleEl.style.transition = ' | ||
| + | titleEl.style.textShadow = '0 0 120px rgba(184, | ||
| + | titleEl.style.color = '# | ||
| + | } else { | ||
| + | titleEl.style.transition = ' | ||
| + | titleEl.style.textShadow = ''; | ||
| + | titleEl.style.color = ''; | ||
| + | } | ||
| + | } | ||
| + | |||
| + | function setFading(hoveredCard) { | ||
| + | if (activeCard === hoveredCard) return; | ||
| + | activeCard = hoveredCard; | ||
| + | setTitleGlow(false); | ||
| + | wrap.classList.remove(' | ||
| + | cards.forEach(card => { | ||
| + | if (card !== hoveredCard) { | ||
| + | card.classList.add(' | ||
| + | drawRGB(card); | ||
| + | } else { | ||
| + | card.classList.remove(' | ||
| + | } | ||
| + | }); | ||
| + | } | ||
| + | |||
| + | function clearFading() { | ||
| + | activeCard = null; | ||
| + | setTitleGlow(false); | ||
| + | wrap.classList.remove(' | ||
| + | cards.forEach(card => card.classList.remove(' | ||
| + | } | ||
| + | |||
| + | function enterTitleZone() { | ||
| + | activeCard = ' | ||
| + | setTitleGlow(true); | ||
| + | wrap.classList.add(' | ||
| + | cards.forEach(card => card.classList.remove(' | ||
| + | } | ||
| + | |||
| + | wrap.addEventListener(' | ||
| + | if (isTitleZone(e)) { | ||
| + | clearTimeout(fadeTimeout); | ||
| + | if (activeCard !== ' | ||
| + | return; | ||
| + | } | ||
| + | |||
| + | // Find which card the mouse is over | ||
| + | let overCard = null; | ||
| + | cards.forEach(card => { | ||
| + | const rect = card.getBoundingClientRect(); | ||
| + | if (e.clientX >= rect.left && e.clientX <= rect.right && | ||
| + | e.clientY >= rect.top && e.clientY <= rect.bottom) { | ||
| + | overCard = card; | ||
| + | } | ||
| + | }); | ||
| + | |||
| + | if (overCard) { | ||
| + | clearTimeout(fadeTimeout); | ||
| + | setFading(overCard); | ||
| + | } | ||
| + | }); | ||
| + | |||
| + | wrap.addEventListener(' | ||
| + | clearTimeout(fadeTimeout); | ||
| + | fadeTimeout = setTimeout(clearFading, | ||
| + | }); | ||
| + | })(); | ||
| </ | </ | ||
| </ | </ | ||