mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-20 07:43:12 +09:00
Add top bar and overlay nav drawer on mobile
Reintroduce a slim top bar to host the menu toggle, branding and the account menu, which gives the hamburger a natural home now that the header is gone. The bar is more compact than the original header and uses the dark sider colour for better contrast. On phone screens the sider becomes an overlay Drawer (opening below the bar and closing on navigation), following normal hamburger conventions instead of shifting the content across. On desktop the same toggle collapses the sider, with its width animation disabled to avoid the content reflow glitch while resizing. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
262357acef
commit
ed84a476c6
2 files changed
+125
-74
No files matched your search
@@ -33,17 +33,13 @@ body {
|
||||
}
|
||||
|
||||
.site-breadcrumb {
|
||||
margin: 16px 0 16px 52px;
|
||||
margin: 16px 0;
|
||||
}
|
||||
|
||||
@media (min-width: 576px) {
|
||||
.site-layout-content-container {
|
||||
padding: 0 24px 24px;
|
||||
}
|
||||
|
||||
.site-breadcrumb {
|
||||
margin-left: 28px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
@@ -56,14 +52,32 @@ body {
|
||||
}
|
||||
}
|
||||
|
||||
/* Keep the sidebar fixed in place while the page content scrolls */
|
||||
.site-layout-sider {
|
||||
/* Top bar hosting the menu toggle and branding, sticky above the content. */
|
||||
.site-layout-header {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
height: 100vh;
|
||||
z-index: 100;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 16px;
|
||||
padding-inline: 16px;
|
||||
background: #001529;
|
||||
}
|
||||
|
||||
/* Keep the sidebar fixed in place (below the header) while content scrolls. */
|
||||
.site-layout-sider {
|
||||
position: sticky;
|
||||
top: 64px;
|
||||
height: calc(100vh - 64px);
|
||||
align-self: flex-start;
|
||||
}
|
||||
|
||||
/* Snap the sider open/closed instead of animating its width — the width
|
||||
transition reflowed the content area and caused styling glitches. */
|
||||
.ant-layout-sider.site-layout-sider {
|
||||
transition: none;
|
||||
}
|
||||
|
||||
.page-header {
|
||||
padding: 0 0 16px;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user