fix: CSS variables neu-*, WebSocket token, thème initial
- CSS: remplace var(--bg-*)/var(--text-*)/var(--accent-*)/var(--color-*)
par les vraies variables --neu-* (neu-bg, neu-surface, neu-text, neu-primary…)
- CSS: supprime body{overflow:hidden} qui bloquait le scroll
- CSS: .auth-layout déplacé dans neu.css pour login/install
- WS: ajoute ?token= aux connexions /ws/proxmox (dashboardPage + proxmoxPage)
- HTML: script inline pour appliquer data-theme avant Alpine (évite FOUC)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
2098c80ec1
commit
562eff8863
10 changed files with 142 additions and 133 deletions
|
|
@ -374,37 +374,27 @@
|
|||
/* ── Layout Alpine (sidebar + navbar + page-content) ───────────────────────── */
|
||||
|
||||
:root {
|
||||
--sidebar-width: 240px;
|
||||
--sidebar-collapsed-width: 64px;
|
||||
--navbar-height: 56px;
|
||||
}
|
||||
|
||||
body {
|
||||
display: flex;
|
||||
min-height: 100vh;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Sidebar */
|
||||
/* Sidebar (position:fixed, hors flux) */
|
||||
.sidebar {
|
||||
width: var(--sidebar-width);
|
||||
min-height: 100vh;
|
||||
background: var(--bg-secondary);
|
||||
border-right: 1px solid var(--border-color);
|
||||
height: 100vh;
|
||||
background: var(--neu-surface);
|
||||
border-right: 1px solid var(--neu-border);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
transition: width 0.2s ease;
|
||||
flex-shrink: 0;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 100vh;
|
||||
z-index: 100;
|
||||
z-index: var(--z-sidebar);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.sidebar.collapsed {
|
||||
width: var(--sidebar-collapsed-width);
|
||||
width: var(--sidebar-width-collapsed);
|
||||
}
|
||||
|
||||
.sidebar-header {
|
||||
|
|
@ -412,13 +402,14 @@ body {
|
|||
align-items: center;
|
||||
gap: 0.75rem;
|
||||
padding: 1rem;
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
border-bottom: 1px solid var(--neu-border);
|
||||
min-height: var(--navbar-height);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.sidebar-logo {
|
||||
font-size: 1.5rem;
|
||||
color: var(--accent-primary);
|
||||
color: var(--neu-primary);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
|
|
@ -427,6 +418,7 @@ body {
|
|||
font-size: 1rem;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
color: var(--neu-text);
|
||||
}
|
||||
|
||||
.sidebar-toggle {
|
||||
|
|
@ -449,9 +441,9 @@ body {
|
|||
align-items: center;
|
||||
gap: 0.75rem;
|
||||
padding: 0.625rem 0.75rem;
|
||||
border-radius: 0.5rem;
|
||||
border-radius: var(--neu-radius-sm);
|
||||
text-decoration: none;
|
||||
color: var(--text-secondary);
|
||||
color: var(--neu-text-muted);
|
||||
font-size: 0.875rem;
|
||||
font-weight: 500;
|
||||
transition: all 0.15s;
|
||||
|
|
@ -460,13 +452,13 @@ body {
|
|||
}
|
||||
|
||||
.sidebar-link:hover {
|
||||
background: var(--bg-hover, rgba(255,255,255,0.05));
|
||||
color: var(--text-primary);
|
||||
background: rgba(108, 142, 244, 0.08);
|
||||
color: var(--neu-text);
|
||||
}
|
||||
|
||||
.sidebar-link.active {
|
||||
background: rgba(99, 102, 241, 0.15);
|
||||
color: var(--accent-primary);
|
||||
background: rgba(108, 142, 244, 0.15);
|
||||
color: var(--neu-primary);
|
||||
}
|
||||
|
||||
.sidebar-icon {
|
||||
|
|
@ -483,35 +475,33 @@ body {
|
|||
|
||||
.sidebar-footer {
|
||||
padding: 0.75rem;
|
||||
border-top: 1px solid var(--border-color);
|
||||
border-top: 1px solid var(--neu-border);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.sidebar-user {
|
||||
flex: 1;
|
||||
font-size: 0.8rem;
|
||||
color: var(--text-secondary);
|
||||
color: var(--neu-text-muted);
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* Main layout */
|
||||
/* Main layout (marge pour compenser le sidebar fixe) */
|
||||
.main-layout {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
margin-left: var(--sidebar-width);
|
||||
min-height: 100vh;
|
||||
margin-left: var(--sidebar-width);
|
||||
transition: margin-left 0.2s ease;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.sidebar.collapsed ~ .main-layout,
|
||||
body:has(.sidebar.collapsed) .main-layout {
|
||||
margin-left: var(--sidebar-collapsed-width);
|
||||
.sidebar.collapsed ~ .main-layout {
|
||||
margin-left: var(--sidebar-width-collapsed);
|
||||
}
|
||||
|
||||
/* Navbar */
|
||||
|
|
@ -521,18 +511,19 @@ body:has(.sidebar.collapsed) .main-layout {
|
|||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0 1.5rem;
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
background: var(--bg-primary);
|
||||
border-bottom: 1px solid var(--neu-border);
|
||||
background: var(--neu-bg);
|
||||
flex-shrink: 0;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 50;
|
||||
z-index: var(--z-navbar);
|
||||
}
|
||||
|
||||
.navbar-title {
|
||||
font-size: 1rem;
|
||||
font-weight: 700;
|
||||
margin: 0;
|
||||
color: var(--neu-text);
|
||||
}
|
||||
|
||||
.navbar-actions {
|
||||
|
|
@ -546,7 +537,19 @@ body:has(.sidebar.collapsed) .main-layout {
|
|||
flex: 1;
|
||||
padding: 1.5rem;
|
||||
overflow-y: auto;
|
||||
height: calc(100vh - var(--navbar-height));
|
||||
background: var(--neu-bg);
|
||||
color: var(--neu-text);
|
||||
}
|
||||
|
||||
/* Auth layout (login, install) */
|
||||
.auth-layout {
|
||||
min-height: 100vh;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 1rem;
|
||||
background: var(--neu-bg);
|
||||
}
|
||||
|
||||
/* Swup fade transition */
|
||||
|
|
@ -560,12 +563,8 @@ html.is-animating .transition-fade {
|
|||
|
||||
/* Responsive */
|
||||
@media (max-width: 768px) {
|
||||
.sidebar {
|
||||
width: var(--sidebar-collapsed-width);
|
||||
}
|
||||
.main-layout {
|
||||
margin-left: var(--sidebar-collapsed-width);
|
||||
}
|
||||
.sidebar { width: var(--sidebar-width-collapsed); }
|
||||
.main-layout { margin-left: var(--sidebar-width-collapsed); }
|
||||
}
|
||||
|
||||
[x-cloak] { display: none !important; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue