diff --git a/webui/static/video/video-discover.js b/webui/static/video/video-discover.js index 6060d3d8..858d0a2e 100644 --- a/webui/static/video/video-discover.js +++ b/webui/static/video/video-discover.js @@ -376,18 +376,6 @@ var all = box.querySelectorAll(selector); for (var i = 0; i < all.length; i++) all[i].classList.toggle(onClass, all[i] === el); } - // Slide the segmented-control highlight under the active button. - function moveSeg(box) { - if (!box) return; - var on = box.querySelector('.vdsc-seg-btn--on'); - if (!on || !on.offsetWidth) return; // hidden / not laid out yet - box.style.setProperty('--seg-x', on.offsetLeft + 'px'); - box.style.setProperty('--seg-w', on.offsetWidth + 'px'); - } - function positionSegs() { - var segs = document.querySelectorAll('[data-video-subpage="' + PAGE_ID + '"] .vdsc-seg'); - for (var i = 0; i < segs.length; i++) moveSeg(segs[i]); - } // ── wiring ──────────────────────────────────────────────────────────────── function wire() { @@ -424,7 +412,6 @@ var sbox = seg.closest('[data-vdsc-seg]'); var which = sbox.getAttribute('data-vdsc-seg'); setActive(sbox, seg, '.vdsc-seg-btn', 'vdsc-seg-btn--on'); - moveSeg(sbox); state.sel[which] = seg.getAttribute('data-val'); if (which === 'kind') renderGenreChips(); // genres differ by kind return; @@ -462,8 +449,6 @@ try { localStorage.setItem('vdsc_hideowned', hide.checked ? '1' : '0'); } catch (e) { /* ignore */ } }); } - window.addEventListener('resize', positionSegs); - // Infinite scroll: a sentinel near the grid bottom pulls the next page. var sentinel = $('[data-vdsc-sentinel]'); if (sentinel && AUTO) { @@ -500,7 +485,6 @@ renderGenreChips(); renderShelves(); loadMoreLike(); // prepend personalized 'More like…' rails when ready - requestAnimationFrame(positionSegs); }); } function showEmpty() { @@ -518,7 +502,7 @@ function onShown(e) { if (!e) return; - if (e.detail === PAGE_ID) { wire(); load(); startHeroTimer(); requestAnimationFrame(positionSegs); } + if (e.detail === PAGE_ID) { wire(); load(); startHeroTimer(); } else stopHeroTimer(); // left the page → stop the slideshow } function init() { document.addEventListener('soulsync:video-page-shown', onShown); } diff --git a/webui/static/video/video-side.css b/webui/static/video/video-side.css index 07ebaf11..40576c76 100644 --- a/webui/static/video/video-side.css +++ b/webui/static/video/video-side.css @@ -2294,38 +2294,43 @@ body[data-side="video"] #soulsync-toggle { display: none; } box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 18px 50px -30px rgba(var(--accent-rgb, 88 101 242), 0.5); } .vdsc-browse-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; } -/* segmented control — a highlight "thumb" slides under the active button */ -.vdsc-seg { position: relative; display: inline-flex; padding: 4px; gap: 2px; border-radius: 12px; - background: rgba(0, 0, 0, 0.32); border: 1px solid rgba(255, 255, 255, 0.07); - box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4); } -.vdsc-seg::before { content: ''; position: absolute; top: 4px; bottom: 4px; left: 0; z-index: 0; - width: var(--seg-w, 0); transform: translateX(var(--seg-x, 0)); border-radius: 9px; - background: linear-gradient(135deg, rgba(var(--accent-rgb, 88 101 242), 0.98), rgba(var(--accent-rgb, 88 101 242), 0.72)); - box-shadow: 0 7px 20px -7px rgba(var(--accent-rgb, 88 101 242), 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.3); - transition: transform 0.32s cubic-bezier(0.34, 1.35, 0.5, 1), width 0.32s cubic-bezier(0.34, 1.35, 0.5, 1); } -.vdsc-seg-btn { position: relative; z-index: 1; padding: 8px 17px; border: none; background: none; cursor: pointer; - border-radius: 9px; font-size: 13px; font-weight: 700; color: rgba(255, 255, 255, 0.55); white-space: nowrap; - transition: color 0.18s ease; } -.vdsc-seg-btn:hover { color: rgba(255, 255, 255, 0.92); } -.vdsc-seg-btn--on { color: #fff; } +/* segments are now just a row of the same buttons (no sliding pill) */ +.vdsc-seg { display: inline-flex; gap: 6px; } +.vdsc-seg::before { display: none; } -/* chip rows (genres, eras) — horizontally scrollable, edge-faded */ -.vdsc-chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 6px; margin-top: 14px; +/* chip rows (genres, providers, eras) — horizontally scrollable, edge-faded */ +.vdsc-chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 1px 7px; margin-top: 13px; scrollbar-width: thin; -webkit-mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 14px), transparent); mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 14px), transparent); } .vdsc-chips::-webkit-scrollbar { height: 6px; } .vdsc-chips::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.13); border-radius: 3px; } .vdsc-chips--era { margin-top: 0; } -.vdsc-chip { flex: 0 0 auto; padding: 7px 15px; border-radius: 999px; cursor: pointer; white-space: nowrap; - font-size: 12.5px; font-weight: 700; color: rgba(255, 255, 255, 0.66); - background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); + +/* Filter buttons (chips + segment buttons) — rounded-rect, each tinted from a + vibey palette (mirrors the music album-detail action buttons); active = filled. */ +.vdsc-chip, .vdsc-seg-btn { flex: 0 0 auto; padding: 8px 15px; border-radius: 9px; cursor: pointer; + white-space: nowrap; font-size: 12.5px; font-weight: 700; letter-spacing: -0.01em; + color: rgba(var(--c, 200 205 230), 0.64); + background: rgba(var(--c, 200 205 230), 0.07); + border: 1px solid rgba(var(--c, 200 205 230), 0.18); transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.2s ease, transform 0.18s cubic-bezier(0.34, 1.4, 0.5, 1); } -.vdsc-chip:hover { color: #fff; background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.22); transform: translateY(-1px); } -.vdsc-chip--on { color: #fff; border-color: transparent; transform: translateY(-1px); - background: linear-gradient(135deg, rgba(var(--accent-rgb, 88 101 242), 0.98), rgba(var(--accent-rgb, 88 101 242), 0.68)); - box-shadow: 0 9px 22px -8px rgba(var(--accent-rgb, 88 101 242), 0.85), - 0 0 0 1px rgba(var(--accent-rgb, 88 101 242), 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.28); } +.vdsc-chip:hover, .vdsc-seg-btn:hover { color: rgba(var(--c, 200 205 230), 0.96); + background: rgba(var(--c, 200 205 230), 0.14); border-color: rgba(var(--c, 200 205 230), 0.4); transform: translateY(-1px); } +.vdsc-chip--on, .vdsc-seg-btn--on { color: #fff; border-color: transparent; transform: translateY(-1px); + background: linear-gradient(135deg, rgba(var(--c, 120 130 240), 0.96), rgba(var(--c, 120 130 240), 0.6)); + box-shadow: 0 9px 22px -9px rgba(var(--c, 120 130 240), 0.9), + 0 0 0 1px rgba(var(--c, 120 130 240), 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.25); } + +/* the palette — cycles across each row so a filter row reads colorful */ +.vdsc-chip:nth-child(8n+1), .vdsc-seg-btn:nth-child(8n+1) { --c: 29 185 84; } /* green */ +.vdsc-chip:nth-child(8n+2), .vdsc-seg-btn:nth-child(8n+2) { --c: 147 112 219; } /* purple */ +.vdsc-chip:nth-child(8n+3), .vdsc-seg-btn:nth-child(8n+3) { --c: 100 149 237; } /* blue */ +.vdsc-chip:nth-child(8n+4), .vdsc-seg-btn:nth-child(8n+4) { --c: 245 158 11; } /* amber */ +.vdsc-chip:nth-child(8n+5), .vdsc-seg-btn:nth-child(8n+5) { --c: 236 72 153; } /* pink */ +.vdsc-chip:nth-child(8n+6), .vdsc-seg-btn:nth-child(8n+6) { --c: 34 211 238; } /* cyan */ +.vdsc-chip:nth-child(8n+7), .vdsc-seg-btn:nth-child(8n+7) { --c: 248 113 113; } /* coral */ +.vdsc-chip:nth-child(8n), .vdsc-seg-btn:nth-child(8n) { --c: 168 85 247; } /* violet */ .vdsc-browse-bottom { display: flex; align-items: center; gap: 16px; margin-top: 12px; } .vdsc-browse-bottom .vdsc-chips { flex: 1; min-width: 0; margin-top: 0; }