global: implement scroll to top
This commit is contained in:
parent
23f48215c3
commit
e04a9c93d2
1 changed files with 4 additions and 0 deletions
|
|
@ -10,6 +10,9 @@
|
||||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=DotGothic16&family=VT323&display=swap">
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=DotGothic16&family=VT323&display=swap">
|
||||||
<link rel="stylesheet" href="/static/style.css" />
|
<link rel="stylesheet" href="/static/style.css" />
|
||||||
<script src="/static/vendor/htmx.min.js"></script>
|
<script src="/static/vendor/htmx.min.js"></script>
|
||||||
|
<script>
|
||||||
|
htmx.config.scrollIntoViewOnBoost = false;
|
||||||
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body hx-boost="true" hx-target="#content">
|
<body hx-boost="true" hx-target="#content">
|
||||||
|
|
@ -56,6 +59,7 @@
|
||||||
document.body.addEventListener('htmx:afterSwap', () => {
|
document.body.addEventListener('htmx:afterSwap', () => {
|
||||||
updateMiniplayerVisibility();
|
updateMiniplayerVisibility();
|
||||||
updateNavState();
|
updateNavState();
|
||||||
|
window.scrollTo(0, 0);
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue