feat: réécriture frontend Alpine.js + HTMX + Swup (branche frontend/alpine)
Remplace Vue 3 / Vite / TypeScript par une stack légère statique : - Alpine.js v3 : réactivité inline, stores auth/ui/i18n, composants par page - HTMX v2 : interactions serveur via attributs HTML - Swup v4 : transitions de page (bundlé via esbuild, IIFE browser-loadable) - xterm.js v5 : terminal PTY (bundlé via esbuild) Structure : HTML statiques + js/app.js + js/terminal.js + css/ + locales/ Build : esbuild (bundle Swup + xterm seulement) → dist/ → Nginx Dockerfile simplifié : node:22-alpine build → nginx:1.27-alpine serve Pages : index, install, login, dashboard, proxmox, updates, terminal, settings, modules URLs propres via nginx try_files $uri.html Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
7ba0ff143c
commit
2098c80ec1
48 changed files with 2446 additions and 5317 deletions
571
frontend/css/neu.css
Normal file
571
frontend/css/neu.css
Normal file
|
|
@ -0,0 +1,571 @@
|
|||
/* =============================================================================
|
||||
ProxmoxPanel — Système de design Neumorphism
|
||||
Définit les classes utilitaires et les variables CSS du thème.
|
||||
Utilisé par tous les composants et les modules.
|
||||
============================================================================= */
|
||||
|
||||
/* ── Variables CSS (surchargées par dark.css et light.css) ─────────────────── */
|
||||
:root {
|
||||
/* Couleurs de base */
|
||||
--neu-bg: #1e2130;
|
||||
--neu-surface: #252838;
|
||||
--neu-text: #e0e4f0;
|
||||
--neu-text-muted: #7f8899;
|
||||
--neu-border: #2e3348;
|
||||
|
||||
/* Ombres Neumorphism */
|
||||
--neu-shadow-dark: #161823;
|
||||
--neu-shadow-light: #2a2f48;
|
||||
|
||||
/* Couleurs d'accent */
|
||||
--neu-primary: #6c8ef4;
|
||||
--neu-primary-dim: #4a6bd4;
|
||||
--neu-success: #4cbb8a;
|
||||
--neu-warning: #f5a623;
|
||||
--neu-danger: #f05c6b;
|
||||
--neu-info: #3dbfcf;
|
||||
|
||||
/* Typographie */
|
||||
--neu-font-xs: 11px;
|
||||
--neu-font-sm: 12px;
|
||||
--neu-font-md: 14px;
|
||||
--neu-font-lg: 16px;
|
||||
--neu-font-xl: 20px;
|
||||
--neu-font-2xl: 24px;
|
||||
|
||||
/* Espacements */
|
||||
--neu-space-xs: 4px;
|
||||
--neu-space-sm: 8px;
|
||||
--neu-space-md: 16px;
|
||||
--neu-space-lg: 24px;
|
||||
--neu-space-xl: 32px;
|
||||
|
||||
/* Rayons */
|
||||
--neu-radius-sm: 8px;
|
||||
--neu-radius-md: 12px;
|
||||
--neu-radius-lg: 16px;
|
||||
--neu-radius-xl: 24px;
|
||||
--neu-radius-full: 9999px;
|
||||
|
||||
/* Transitions */
|
||||
--neu-transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
|
||||
/* Sidebar */
|
||||
--sidebar-width: 240px;
|
||||
--sidebar-width-collapsed: 64px;
|
||||
|
||||
/* Z-index */
|
||||
--z-sidebar: 100;
|
||||
--z-navbar: 200;
|
||||
--z-modal: 300;
|
||||
--z-toast: 400;
|
||||
}
|
||||
|
||||
/* ── Carte Neumorphism (élévation convexe) ─────────────────────────────────── */
|
||||
.neu-card {
|
||||
background: var(--neu-surface);
|
||||
border-radius: var(--neu-radius-lg);
|
||||
box-shadow:
|
||||
6px 6px 12px var(--neu-shadow-dark),
|
||||
-4px -4px 10px var(--neu-shadow-light);
|
||||
border: 1px solid var(--neu-border);
|
||||
padding: var(--neu-space-md);
|
||||
color: var(--neu-text);
|
||||
transition: var(--neu-transition);
|
||||
}
|
||||
|
||||
.neu-card--flat {
|
||||
box-shadow: none;
|
||||
border: 1px solid var(--neu-border);
|
||||
}
|
||||
|
||||
.neu-card--hover:hover {
|
||||
box-shadow:
|
||||
8px 8px 16px var(--neu-shadow-dark),
|
||||
-6px -6px 14px var(--neu-shadow-light);
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
/* ── Surface enfoncée (inputs, zones de saisie) ────────────────────────────── */
|
||||
.neu-inset {
|
||||
background: var(--neu-bg);
|
||||
border-radius: var(--neu-radius-md);
|
||||
box-shadow:
|
||||
inset 3px 3px 7px var(--neu-shadow-dark),
|
||||
inset -2px -2px 5px var(--neu-shadow-light);
|
||||
border: 1px solid var(--neu-border);
|
||||
}
|
||||
|
||||
/* ── Boutons ────────────────────────────────────────────────────────────────── */
|
||||
.neu-btn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: var(--neu-space-xs);
|
||||
padding: var(--neu-space-sm) var(--neu-space-md);
|
||||
border-radius: var(--neu-radius-md);
|
||||
font-size: var(--neu-font-md);
|
||||
font-weight: 500;
|
||||
cursor: pointer;
|
||||
border: none;
|
||||
outline: none;
|
||||
transition: var(--neu-transition);
|
||||
text-decoration: none;
|
||||
white-space: nowrap;
|
||||
user-select: none;
|
||||
color: var(--neu-text);
|
||||
background: var(--neu-surface);
|
||||
box-shadow:
|
||||
4px 4px 8px var(--neu-shadow-dark),
|
||||
-3px -3px 6px var(--neu-shadow-light);
|
||||
}
|
||||
|
||||
.neu-btn:hover:not(:disabled) {
|
||||
box-shadow:
|
||||
6px 6px 12px var(--neu-shadow-dark),
|
||||
-4px -4px 8px var(--neu-shadow-light);
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
.neu-btn:active:not(:disabled) {
|
||||
box-shadow:
|
||||
inset 2px 2px 5px var(--neu-shadow-dark),
|
||||
inset -1px -1px 3px var(--neu-shadow-light);
|
||||
transform: translateY(0);
|
||||
}
|
||||
|
||||
.neu-btn:disabled {
|
||||
opacity: 0.5;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
/* Variantes de boutons */
|
||||
.neu-btn--primary {
|
||||
background: var(--neu-primary);
|
||||
color: #fff;
|
||||
box-shadow:
|
||||
4px 4px 8px rgba(0,0,0,0.3),
|
||||
-2px -2px 6px rgba(255,255,255,0.05);
|
||||
}
|
||||
|
||||
.neu-btn--primary:hover:not(:disabled) {
|
||||
background: var(--neu-primary-dim);
|
||||
box-shadow:
|
||||
6px 6px 12px rgba(0,0,0,0.4),
|
||||
-3px -3px 8px rgba(255,255,255,0.06);
|
||||
}
|
||||
|
||||
.neu-btn--success {
|
||||
background: var(--neu-success);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.neu-btn--danger {
|
||||
background: var(--neu-danger);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.neu-btn--warning {
|
||||
background: var(--neu-warning);
|
||||
color: #1a1a2e;
|
||||
}
|
||||
|
||||
.neu-btn--sm {
|
||||
padding: 4px 10px;
|
||||
font-size: var(--neu-font-sm);
|
||||
border-radius: var(--neu-radius-sm);
|
||||
}
|
||||
|
||||
.neu-btn--lg {
|
||||
padding: 12px 24px;
|
||||
font-size: var(--neu-font-lg);
|
||||
border-radius: var(--neu-radius-lg);
|
||||
}
|
||||
|
||||
.neu-btn--icon {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
padding: 0;
|
||||
border-radius: var(--neu-radius-md);
|
||||
}
|
||||
|
||||
.neu-btn--ghost {
|
||||
background: transparent;
|
||||
box-shadow: none;
|
||||
border: 1px solid var(--neu-border);
|
||||
}
|
||||
|
||||
.neu-btn--ghost:hover:not(:disabled) {
|
||||
background: var(--neu-surface);
|
||||
box-shadow:
|
||||
2px 2px 5px var(--neu-shadow-dark),
|
||||
-1px -1px 3px var(--neu-shadow-light);
|
||||
}
|
||||
|
||||
/* ── Inputs ─────────────────────────────────────────────────────────────────── */
|
||||
.neu-input {
|
||||
width: 100%;
|
||||
padding: var(--neu-space-sm) var(--neu-space-md);
|
||||
background: var(--neu-bg);
|
||||
color: var(--neu-text);
|
||||
border: 1px solid var(--neu-border);
|
||||
border-radius: var(--neu-radius-md);
|
||||
font-size: var(--neu-font-md);
|
||||
outline: none;
|
||||
transition: var(--neu-transition);
|
||||
box-shadow:
|
||||
inset 3px 3px 7px var(--neu-shadow-dark),
|
||||
inset -2px -2px 5px var(--neu-shadow-light);
|
||||
}
|
||||
|
||||
.neu-input:focus {
|
||||
border-color: var(--neu-primary);
|
||||
box-shadow:
|
||||
inset 3px 3px 7px var(--neu-shadow-dark),
|
||||
inset -2px -2px 5px var(--neu-shadow-light),
|
||||
0 0 0 2px rgba(108, 142, 244, 0.25);
|
||||
}
|
||||
|
||||
.neu-input::placeholder {
|
||||
color: var(--neu-text-muted);
|
||||
}
|
||||
|
||||
.neu-input--error {
|
||||
border-color: var(--neu-danger) !important;
|
||||
}
|
||||
|
||||
/* ── Toggle switch ───────────────────────────────────────────────────────────── */
|
||||
.neu-toggle {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 44px;
|
||||
height: 24px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.neu-toggle input {
|
||||
opacity: 0;
|
||||
width: 0;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
.neu-toggle__slider {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
background: var(--neu-bg);
|
||||
border-radius: var(--neu-radius-full);
|
||||
cursor: pointer;
|
||||
transition: var(--neu-transition);
|
||||
box-shadow:
|
||||
inset 2px 2px 5px var(--neu-shadow-dark),
|
||||
inset -1px -1px 3px var(--neu-shadow-light);
|
||||
}
|
||||
|
||||
.neu-toggle__slider::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
left: 3px;
|
||||
bottom: 3px;
|
||||
background: var(--neu-text-muted);
|
||||
border-radius: 50%;
|
||||
transition: var(--neu-transition);
|
||||
box-shadow: 2px 2px 4px var(--neu-shadow-dark);
|
||||
}
|
||||
|
||||
.neu-toggle input:checked + .neu-toggle__slider {
|
||||
background: var(--neu-primary);
|
||||
box-shadow:
|
||||
inset 2px 2px 5px rgba(0,0,0,0.3),
|
||||
inset -1px -1px 3px rgba(255,255,255,0.1);
|
||||
}
|
||||
|
||||
.neu-toggle input:checked + .neu-toggle__slider::before {
|
||||
transform: translateX(20px);
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
/* ── Badges / Tags ───────────────────────────────────────────────────────────── */
|
||||
.neu-badge {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
padding: 2px 8px;
|
||||
border-radius: var(--neu-radius-full);
|
||||
font-size: var(--neu-font-xs);
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
}
|
||||
|
||||
.neu-badge--success { background: rgba(76, 187, 138, 0.15); color: var(--neu-success); }
|
||||
.neu-badge--danger { background: rgba(240, 92, 107, 0.15); color: var(--neu-danger); }
|
||||
.neu-badge--warning { background: rgba(245, 166, 35, 0.15); color: var(--neu-warning); }
|
||||
.neu-badge--info { background: rgba(61, 191, 207, 0.15); color: var(--neu-info); }
|
||||
.neu-badge--primary { background: rgba(108, 142, 244, 0.15); color: var(--neu-primary); }
|
||||
|
||||
/* ── Séparateurs ────────────────────────────────────────────────────────────── */
|
||||
.neu-divider {
|
||||
height: 1px;
|
||||
background: linear-gradient(90deg, transparent, var(--neu-border), transparent);
|
||||
border: none;
|
||||
margin: var(--neu-space-md) 0;
|
||||
}
|
||||
|
||||
/* ── Utilitaires de layout ──────────────────────────────────────────────────── */
|
||||
.flex { display: flex; }
|
||||
.flex-col { flex-direction: column; }
|
||||
.items-center { align-items: center; }
|
||||
.justify-between { justify-content: space-between; }
|
||||
.justify-center { justify-content: center; }
|
||||
.gap-sm { gap: var(--neu-space-sm); }
|
||||
.gap-md { gap: var(--neu-space-md); }
|
||||
.gap-lg { gap: var(--neu-space-lg); }
|
||||
.w-full { width: 100%; }
|
||||
.h-full { height: 100%; }
|
||||
|
||||
/* ── Grid responsive ────────────────────────────────────────────────────────── */
|
||||
.neu-grid {
|
||||
display: grid;
|
||||
gap: var(--neu-space-md);
|
||||
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
|
||||
}
|
||||
|
||||
/* ── Scrollbar personnalisée ────────────────────────────────────────────────── */
|
||||
::-webkit-scrollbar {
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
}
|
||||
::-webkit-scrollbar-track { background: var(--neu-bg); }
|
||||
::-webkit-scrollbar-thumb {
|
||||
background: var(--neu-border);
|
||||
border-radius: 3px;
|
||||
}
|
||||
::-webkit-scrollbar-thumb:hover { background: var(--neu-text-muted); }
|
||||
|
||||
/* ── Animations ─────────────────────────────────────────────────────────────── */
|
||||
@keyframes neu-pulse {
|
||||
0%, 100% { opacity: 1; }
|
||||
50% { opacity: 0.5; }
|
||||
}
|
||||
|
||||
@keyframes neu-spin {
|
||||
to { transform: rotate(360deg); }
|
||||
}
|
||||
|
||||
.neu-loading {
|
||||
animation: neu-spin 1s linear infinite;
|
||||
}
|
||||
|
||||
.neu-pulse {
|
||||
animation: neu-pulse 2s ease-in-out infinite;
|
||||
}
|
||||
|
||||
/* ── Responsive ─────────────────────────────────────────────────────────────── */
|
||||
@media (max-width: 768px) {
|
||||
.neu-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
:root {
|
||||
--sidebar-width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
/* ── 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 {
|
||||
width: var(--sidebar-width);
|
||||
min-height: 100vh;
|
||||
background: var(--bg-secondary);
|
||||
border-right: 1px solid var(--border-color);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
transition: width 0.2s ease;
|
||||
flex-shrink: 0;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 100vh;
|
||||
z-index: 100;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.sidebar.collapsed {
|
||||
width: var(--sidebar-collapsed-width);
|
||||
}
|
||||
|
||||
.sidebar-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.75rem;
|
||||
padding: 1rem;
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
min-height: var(--navbar-height);
|
||||
}
|
||||
|
||||
.sidebar-logo {
|
||||
font-size: 1.5rem;
|
||||
color: var(--accent-primary);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.sidebar-title {
|
||||
font-weight: 700;
|
||||
font-size: 1rem;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.sidebar-toggle {
|
||||
margin-left: auto;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.sidebar-nav {
|
||||
flex: 1;
|
||||
padding: 0.5rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.25rem;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
.sidebar-link {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.75rem;
|
||||
padding: 0.625rem 0.75rem;
|
||||
border-radius: 0.5rem;
|
||||
text-decoration: none;
|
||||
color: var(--text-secondary);
|
||||
font-size: 0.875rem;
|
||||
font-weight: 500;
|
||||
transition: all 0.15s;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.sidebar-link:hover {
|
||||
background: var(--bg-hover, rgba(255,255,255,0.05));
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.sidebar-link.active {
|
||||
background: rgba(99, 102, 241, 0.15);
|
||||
color: var(--accent-primary);
|
||||
}
|
||||
|
||||
.sidebar-icon {
|
||||
font-size: 1.1rem;
|
||||
flex-shrink: 0;
|
||||
width: 1.25rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.sidebar-label {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.sidebar-footer {
|
||||
padding: 0.75rem;
|
||||
border-top: 1px solid var(--border-color);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.sidebar-user {
|
||||
flex: 1;
|
||||
font-size: 0.8rem;
|
||||
color: var(--text-secondary);
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* Main layout */
|
||||
.main-layout {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
margin-left: var(--sidebar-width);
|
||||
min-height: 100vh;
|
||||
transition: margin-left 0.2s ease;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.sidebar.collapsed ~ .main-layout,
|
||||
body:has(.sidebar.collapsed) .main-layout {
|
||||
margin-left: var(--sidebar-collapsed-width);
|
||||
}
|
||||
|
||||
/* Navbar */
|
||||
.navbar {
|
||||
height: var(--navbar-height);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0 1.5rem;
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
background: var(--bg-primary);
|
||||
flex-shrink: 0;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 50;
|
||||
}
|
||||
|
||||
.navbar-title {
|
||||
font-size: 1rem;
|
||||
font-weight: 700;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.navbar-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
/* Page content */
|
||||
.page-content {
|
||||
flex: 1;
|
||||
padding: 1.5rem;
|
||||
overflow-y: auto;
|
||||
height: calc(100vh - var(--navbar-height));
|
||||
}
|
||||
|
||||
/* Swup fade transition */
|
||||
.transition-fade {
|
||||
transition: opacity 0.2s ease;
|
||||
}
|
||||
|
||||
html.is-animating .transition-fade {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
/* Responsive */
|
||||
@media (max-width: 768px) {
|
||||
.sidebar {
|
||||
width: var(--sidebar-collapsed-width);
|
||||
}
|
||||
.main-layout {
|
||||
margin-left: var(--sidebar-collapsed-width);
|
||||
}
|
||||
}
|
||||
|
||||
[x-cloak] { display: none !important; }
|
||||
Loading…
Add table
Add a link
Reference in a new issue