feat(diagnostic): Knopf nach oben — schwebt unten rechts beim Scrollen

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-01 12:41:29 +01:00
co-authored by Claude Opus 5.5
parent 68686de9dc
commit ca35f5f1e0
+19
View File
@@ -10870,5 +10870,24 @@
<div id="versions-body" style="overflow-y:auto;padding:4px 12px;"></div>
</div>
</div>
<!-- Nach oben: schwebt unten rechts, sobald man ein Stueck gescrollt hat -->
<button id="to-top" type="button" title="Nach oben" aria-label="Nach oben"
onclick="window.scrollTo({ top: 0, behavior: 'smooth' })"
style="position:fixed;right:20px;bottom:20px;z-index:900;width:42px;height:42px;border-radius:50%;
border:1px solid #2A2A3E;background:#1E1E2E;color:#E0E0F0;font-size:20px;line-height:1;
cursor:pointer;box-shadow:0 2px 8px rgba(0,0,0,.5);opacity:0;pointer-events:none;transition:opacity .2s;">↑</button>
<script>
(function () {
const b = document.getElementById('to-top');
const upd = () => {
const on = window.scrollY > 400;
b.style.opacity = on ? '0.85' : '0';
b.style.pointerEvents = on ? 'auto' : 'none';
};
window.addEventListener('scroll', upd, { passive: true });
upd();
})();
</script>
</body>
</html>