feat: 添加返回顶部悬浮控制器并调整管理后台容器宽度
continuous-integration/drone/push Build is passing

This commit is contained in:
seahi committed 2026-09-27 21:32:12 +08:00
1 parent 94e76bbcd2
commit 0306f22911
1 file changed
+32 -1
+32 -1
View File
@@ -32,6 +32,9 @@
function handleOverlayClick() { function handleOverlayClick() {
isMobileSidebarOpen = false; isMobileSidebarOpen = false;
} }
function scrollToTop() {
window.scrollTo({ top: 0, behavior: 'smooth' });
}
</script> </script>
<svelte:head> <svelte:head>
@@ -177,6 +180,34 @@
<Toast /> <Toast />
<ConfirmDialog /> <ConfirmDialog />
<!-- Floating Controllers (VOID style) -->
<aside id="ctrler-panel">
<div class="ctrler-item" title="返回顶部">
<a
href="#top"
aria-label="返回顶部"
onclick={(e) => {
e.preventDefault();
scrollToTop();
}}
>
<svg
aria-hidden="true"
focusable="false"
role="img"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 448 512"
width="16"
height="16"
><path
fill="currentColor"
d="M34.9 289.5l-22.2-22.2c-9.4-9.4-9.4-24.6 0-33.9L207 39c9.4-9.4 24.6-9.4 33.9 0l194.3 194.3c9.4 9.4 9.4 24.6 0 33.9L413 289.4c-9.5 9.5-25 9.3-34.3-.4L264 168.6V456c0 13.3-10.7 24-24 24h-32c-13.3 0-24-10.7-24-24V168.6L69.2 289.1c-9.3 9.8-24.8 10-34.3.4z"
></path></svg
>
</a>
</div>
</aside>
<style> <style>
:global(body) { :global(body) {
margin: 0; margin: 0;
@@ -363,7 +394,7 @@
} }
.admin-container { .admin-container {
max-width: 1440px; max-width: 1280px;
margin: 0 auto; margin: 0 auto;
} }