diff --git a/public/s/css/f0ckm.css b/public/s/css/f0ckm.css index 530b133..2f83aeb 100644 --- a/public/s/css/f0ckm.css +++ b/public/s/css/f0ckm.css @@ -2192,7 +2192,7 @@ body.sidebar-right-hidden .global-sidebar-right { } } -/* Common sizing for the Legacy content area */ + .item-layout-container .item-main-content>._204863, .item-layout-container .item-main-content>.item_title, .item-layout-container .item-main-content>.content, @@ -9132,6 +9132,15 @@ html[theme="f0ck95d"] .badge-dark { color: var(--accent); } +.mobile-scroll-to-top { + background: none; + border: none; + color: var(--white); + position: absolute; + bottom: 20px; + cursor: pointer; +} + .steuerung.steuerung-icon .fa-solid { font-size: 0.85em; } diff --git a/public/s/js/f0ckm.js b/public/s/js/f0ckm.js index 11ced8c..669a722 100644 --- a/public/s/js/f0ckm.js +++ b/public/s/js/f0ckm.js @@ -9183,6 +9183,16 @@ document.addEventListener('click', (e) => { window.scrollTo({ top: document.body.scrollHeight, behavior: 'smooth' }); }); +// ── Mobile scroll-to-top button ─────────────────────────────────────────────── +// Visible only on mobile (≤999px), appears below #comments-container so users +// can easily get back to the top after reading comments. +document.addEventListener('click', (e) => { + if (!e.target.closest('.mobile-scroll-to-top')) return; + e.preventDefault(); + window.scrollTo({ top: 0, behavior: 'smooth' }); + if (navigator.vibrate) navigator.vibrate(20); +}); + // ── Spoiler Tags Event Delegation ───────────────────────────────────────────── (function() { const isHidden = (el) => el && el.classList && (el.classList.contains('spoiler') || el.classList.contains('blur-text')); diff --git a/views/item-partial-legacy.html b/views/item-partial-legacy.html index 0bff769..4b8b9cf 100644 --- a/views/item-partial-legacy.html +++ b/views/item-partial-legacy.html @@ -205,6 +205,7 @@ @endif + diff --git a/views/item-partial-modern.html b/views/item-partial-modern.html index 94d4ab1..d9c6b23 100644 --- a/views/item-partial-modern.html +++ b/views/item-partial-modern.html @@ -51,6 +51,8 @@ + + {{-- MAIN CONTENT: media + navigation + metadata --}}