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:56] – 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: | ||
| - | /* When any card is hovered, fade out siblings with film artifact look */ | + | /* VHS chromatic aberration — JS controlled |
| - | .js-wrap: | + | .js-card |
| - | | + | position: relative; |
| - | transition: filter 0.4s ease !important; | + | display: block; |
| + | overflow: hidden; | ||
| + | | ||
| + | transition: filter 0.25s ease !important; | ||
| } | } | ||
| - | .js-wrap: | + | .js-card.js-fading |
| - | filter: | + | filter: |
| - | transition: filter 0.4s ease !important; | + | |
| } | } | ||
| - | /* Film scratch | + | /* Scanline |
| - | .js-wrap: | + | .js-card.js-fading::after { |
| - | content: ''; | + | content: '' |
| + | position: absolute !important; | ||
| + | inset: 0 !important; | ||
| + | z-index: 12 !important; | ||
| + | pointer-events: | ||
| + | background: repeating-linear-gradient( | ||
| + | 0deg, | ||
| + | transparent 0px, | ||
| + | transparent 3px, | ||
| + | rgba(0, 0, 0, 0.08) 3px, | ||
| + | rgba(0, 0, 0, 0.08) 4px | ||
| + | ) !important; | ||
| + | } | ||
| + | |||
| + | /* RGB canvas overlay */ | ||
| + | .js-rgb-canvas { | ||
| position: absolute; | position: absolute; | ||
| inset: 0; | inset: 0; | ||
| - | z-index: | + | z-index: |
| pointer-events: | pointer-events: | ||
| - | | + | |
| - | repeating-linear-gradient( | + | |
| - | 0deg, | + | } |
| - | transparent, | + | .js-card.js-fading |
| - | transparent 3px, | + | |
| - | rgba(0,0,0,0.12) 3px, | + | |
| - | | + | |
| - | ), | + | |
| - | | + | |
| - | 90deg, | + | |
| - | transparent, | + | |
| - | transparent 40px, | + | |
| - | rgba(255, | + | |
| - | rgba(255, | + | |
| - | ); | + | |
| - | | + | |
| } | } | ||
| - | @keyframes filmFlicker | + | /* Block card hover effects when title zone is active */ |
| - | | + | .js-wrap.js-title-active .js-card: |
| - | | + | |
| - | | + | filter: brightness(0.6) saturate(0.8) !important; |
| + | } | ||
| + | .js-wrap.js-title-active .js-card: | ||
| + | | ||
| + | } | ||
| + | .js-wrap.js-title-active .js-card: | ||
| + | top: 50% !important; | ||
| + | | ||
| + | letter-spacing: | ||
| + | color: #EDE8F5 !important; | ||
| + | text-shadow: | ||
| + | opacity: | ||
| + | } | ||
| + | .js-wrap.js-title-active .js-card: | ||
| + | | ||
| + | } | ||
| + | .js-wrap.js-title-active .js-card: | ||
| + | opacity: 0 !important; | ||
| } | } | ||
| Line 306: | 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, | ||
| + | }); | ||
| + | })(); | ||
| </ | </ | ||
| </ | </ | ||