scroll to top button for mobile
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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'));
|
||||
|
||||
Reference in New Issue
Block a user