Changeset 230e446 in Klonkt for src/assets
- Timestamp:
- 06/20/2026 01:38:16 AM (3 months ago)
- Branches:
- main
- Children:
- fa08981
- Parents:
- d188736
- Location:
- src/assets
- Files:
-
- 2 edited
-
css/style.css (modified) (1 diff)
-
js/audio-player.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/assets/css/style.css
rd188736 r230e446 2819 2819 border-color: var(--accent, #c2410c); 2820 2820 background: color-mix(in srgb, var(--accent, #c2410c) 5%, var(--paper-2, transparent)); 2821 } 2822 /* Korte highlight wanneer je via de mini-speler naar deze track springt. */ 2823 .post-audio-track.pat-flash { 2824 animation: patFlash 1.6s ease-out; 2825 } 2826 @keyframes patFlash { 2827 0%, 30% { border-color: var(--accent, #c2410c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent, #c2410c) 35%, transparent); } 2828 100% { box-shadow: 0 0 0 0 transparent; } 2821 2829 } 2822 2830 .post-audio-track .pat-play { -
src/assets/js/audio-player.js
rd188736 r230e446 566 566 // via htmx zodat de audio blijft spelen. Geen post bekend → val terug op de sheet. 567 567 // - MOBIEL: altijd de uitgebreide speler-sheet openen (huidig gedrag). 568 function goToPost(url) { 568 function scrollToTrack(trackId) { 569 if (!trackId) { window.scrollTo(0, 0); return; } 570 const el = document.getElementById('track-' + trackId); 571 if (!el) { window.scrollTo(0, 0); return; } 572 el.scrollIntoView({ block: 'center', behavior: 'smooth' }); 573 el.classList.add('pat-flash'); 574 setTimeout(() => el.classList.remove('pat-flash'), 1600); 575 } 576 function goToPost(url, trackId) { 577 const hash = trackId ? ('#track-' + trackId) : ''; 569 578 if (window.htmx && url.charAt(0) === '/') { 570 579 try { 571 window.htmx.ajax('GET', url, { target: '#pcms-main', swap: 'innerHTML' }); 572 history.pushState({}, '', url); 573 window.scrollTo(0, 0); 580 const p = window.htmx.ajax('GET', url, { target: '#pcms-main', swap: 'innerHTML' }); 581 history.pushState({}, '', url + hash); 582 // Na de swap naar de track scrollen (klein uitstel zodat de globale 583 // afterSwap-top-scroll eerst is geweest); val terug op top als niet gevonden. 584 const go = () => setTimeout(() => scrollToTrack(trackId), 60); 585 if (p && typeof p.then === 'function') p.then(go); else setTimeout(go, 150); 574 586 return; 575 587 } catch (e) { /* val terug op volledige navigatie */ } 576 588 } 577 location.href = url ;589 location.href = url + hash; 578 590 } 579 591 expandTrigger.addEventListener('click', () => { 580 592 const t = queue[currentIndex]; 581 593 const isDesktop = window.matchMedia && window.matchMedia('(min-width: 768px)').matches; 582 if (isDesktop && t && t.postUrl) { goToPost(t.postUrl ); return; }594 if (isDesktop && t && t.postUrl) { goToPost(t.postUrl, t.id); return; } 583 595 openSheet(); 584 596 });
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)