style(webui): refine UI polish and enhance component interactions
This commit is contained in:
@@ -1,18 +1,34 @@
|
||||
:root {
|
||||
/* === Background Layers === */
|
||||
--color-space-950: #09090b;
|
||||
--color-space-900: #0f0f11;
|
||||
--color-space-850: #121214;
|
||||
--color-space-800: #18181b;
|
||||
--color-space-border: #27272a;
|
||||
|
||||
/* === Neon Accents (Full Saturation) === */
|
||||
--color-neon-purple: #a855f7;
|
||||
--color-neon-green: #22c55e;
|
||||
--color-neon-cyan: #06b6d4;
|
||||
--color-neon-yellow: #eab308;
|
||||
--color-neon-red: #ef4444;
|
||||
--color-text-main: #d1d5db; /* gray-300 */
|
||||
--color-text-dim: #71717a; /* zinc-400 */
|
||||
--color-text-muted: #6b7280; /* gray-500 */
|
||||
--color-text-bright: #ffffff;
|
||||
|
||||
/* === Soft Neon (Reduced Saturation for Fills) === */
|
||||
--color-neon-purple-soft: #9333ea;
|
||||
--color-neon-green-soft: #16a34a;
|
||||
--color-neon-cyan-soft: #0891b2;
|
||||
|
||||
/* === Text Hierarchy (WCAG AA Compliant) === */
|
||||
--color-text-primary: #ffffff; /* Emphasis: Titles, Key Numbers */
|
||||
--color-text-secondary: #d4d4d8; /* Content: Body Text (zinc-300) */
|
||||
--color-text-tertiary: #a1a1aa; /* Metadata: Timestamps, Labels (zinc-400) */
|
||||
--color-text-quaternary: #71717a; /* Subtle: Decorative (zinc-500) */
|
||||
|
||||
/* === Legacy Aliases (Backward Compatibility) === */
|
||||
--color-text-main: var(--color-text-secondary);
|
||||
--color-text-dim: var(--color-text-tertiary);
|
||||
--color-text-muted: var(--color-text-tertiary);
|
||||
--color-text-bright: var(--color-text-primary);
|
||||
|
||||
/* Gradient Accents */
|
||||
--color-green-400: #4ade80;
|
||||
@@ -44,20 +60,25 @@
|
||||
|
||||
/* Custom Scrollbar */
|
||||
::-webkit-scrollbar {
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-track {
|
||||
background: transparent;
|
||||
background: rgba(9, 9, 11, 0.3);
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
@apply bg-space-800 rounded-full;
|
||||
background: linear-gradient(180deg, #27272a 0%, #18181b 100%);
|
||||
border-radius: 4px;
|
||||
border: 1px solid rgba(255, 255, 255, 0.05);
|
||||
transition: background 0.2s ease;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb:hover {
|
||||
@apply bg-space-border;
|
||||
background: linear-gradient(180deg, #3f3f46 0%, #27272a 100%);
|
||||
border-color: rgba(168, 85, 247, 0.3);
|
||||
}
|
||||
|
||||
/* Animations */
|
||||
@@ -82,9 +103,23 @@
|
||||
|
||||
/* Utility */
|
||||
.glass-panel {
|
||||
background: theme('colors.space.900 / 70%');
|
||||
background: linear-gradient(135deg,
|
||||
rgba(15, 15, 17, 0.75) 0%,
|
||||
rgba(18, 18, 20, 0.70) 100%
|
||||
);
|
||||
backdrop-filter: blur(12px);
|
||||
border: 1px solid theme('colors.white / 8%');
|
||||
border: 1px solid rgba(255, 255, 255, 0.08);
|
||||
box-shadow:
|
||||
0 0 0 1px rgba(255, 255, 255, 0.02) inset,
|
||||
0 4px 24px rgba(0, 0, 0, 0.4);
|
||||
transition: border-color 0.3s ease, box-shadow 0.3s ease;
|
||||
}
|
||||
|
||||
.glass-panel:hover {
|
||||
border-color: rgba(255, 255, 255, 0.12);
|
||||
box-shadow:
|
||||
0 0 0 1px rgba(255, 255, 255, 0.04) inset,
|
||||
0 8px 32px rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
.nav-item.active {
|
||||
@@ -128,23 +163,77 @@
|
||||
/* Refactored Global Utilities */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
/* View Containers */
|
||||
.view-container {
|
||||
@apply mx-auto p-6 space-y-6 animate-fade-in;
|
||||
/* Responsive max-width: use most of screen on small displays,
|
||||
but cap at 1600px on large displays for reading comfort */
|
||||
max-width: min(95%, 1600px);
|
||||
/* Standard Layout Constants */
|
||||
:root {
|
||||
--view-padding: 2rem; /* 32px - Standard Padding */
|
||||
--view-gap: 1.5rem; /* 24px - Standard component gap */
|
||||
--card-radius: 0.75rem; /* 12px */
|
||||
}
|
||||
|
||||
/* Section Headers */
|
||||
.section-header {
|
||||
@apply flex justify-between items-center mb-6;
|
||||
@media (max-width: 768px) {
|
||||
:root {
|
||||
--view-padding: 1rem;
|
||||
--view-gap: 1rem;
|
||||
}
|
||||
}
|
||||
.section-title {
|
||||
|
||||
/* Base View Container */
|
||||
.view-container {
|
||||
@apply mx-auto w-full animate-fade-in flex flex-col;
|
||||
padding: var(--view-padding);
|
||||
gap: var(--view-gap);
|
||||
min-height: calc(100vh - 56px); /* Align with navbar height */
|
||||
max-width: 1400px;
|
||||
scrollbar-gutter: stable;
|
||||
}
|
||||
|
||||
/* Specialized container for data-heavy pages (Logs) */
|
||||
.view-container-full {
|
||||
@apply w-full animate-fade-in flex flex-col;
|
||||
padding: var(--view-padding);
|
||||
gap: var(--view-gap);
|
||||
min-height: calc(100vh - 56px);
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
/* Centered container for form-heavy pages (Settings/Accounts) */
|
||||
.view-container-centered {
|
||||
@apply mx-auto w-full animate-fade-in flex flex-col;
|
||||
padding: var(--view-padding);
|
||||
gap: var(--view-gap);
|
||||
min-height: calc(100vh - 56px);
|
||||
max-width: 900px; /* Comfortable reading width for forms */
|
||||
}
|
||||
|
||||
/* Standard Section Header */
|
||||
.view-header {
|
||||
@apply flex flex-col md:flex-row md:items-end justify-between mb-2;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.view-header-title {
|
||||
@apply flex flex-col;
|
||||
}
|
||||
|
||||
.view-header-title h2 {
|
||||
@apply text-2xl font-bold text-white tracking-tight;
|
||||
}
|
||||
.section-desc {
|
||||
@apply text-gray-500 text-sm;
|
||||
|
||||
.view-header-title p {
|
||||
@apply text-sm text-gray-500 mt-1;
|
||||
}
|
||||
|
||||
.view-header-actions {
|
||||
@apply flex items-center gap-3;
|
||||
}
|
||||
|
||||
/* Standard Card Panel */
|
||||
.view-card {
|
||||
@apply glass-panel rounded-xl p-6 border border-space-border/50 relative overflow-hidden;
|
||||
}
|
||||
|
||||
.view-card-header {
|
||||
@apply flex items-center justify-between mb-4 pb-4 border-b border-space-border/30;
|
||||
}
|
||||
|
||||
/* Component Unification */
|
||||
@@ -155,77 +244,73 @@
|
||||
@apply bg-space-900/50 text-gray-500 font-mono text-xs uppercase border-b border-space-border;
|
||||
}
|
||||
.standard-table tbody tr {
|
||||
@apply hover:bg-white/5 transition-colors border-b border-space-border/30 last:border-0;
|
||||
@apply transition-all duration-200 border-b border-space-border/30 last:border-0;
|
||||
}
|
||||
|
||||
/* Custom Range Slider */
|
||||
.standard-table tbody tr:hover {
|
||||
background: linear-gradient(90deg,
|
||||
rgba(255, 255, 255, 0.03) 0%,
|
||||
rgba(255, 255, 255, 0.05) 50%,
|
||||
rgba(255, 255, 255, 0.03) 100%
|
||||
);
|
||||
border-color: rgba(255, 255, 255, 0.08);
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
/* Custom Range Slider - Simplified */
|
||||
.custom-range {
|
||||
-webkit-appearance: none;
|
||||
appearance: none;
|
||||
width: 100%;
|
||||
height: 6px;
|
||||
height: 4px;
|
||||
background: var(--color-space-800);
|
||||
border-radius: 999px;
|
||||
outline: none;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
background-image: linear-gradient(to right, var(--range-color) 0%, var(--range-color) 100%);
|
||||
background-repeat: no-repeat;
|
||||
background-size: 0% 100%;
|
||||
}
|
||||
|
||||
.custom-range::-webkit-slider-thumb {
|
||||
-webkit-appearance: none;
|
||||
appearance: none;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
border-radius: 50%;
|
||||
background: #ffffff;
|
||||
box-shadow: 0 0 10px var(--range-color-glow);
|
||||
background: var(--range-color, var(--color-neon-purple));
|
||||
cursor: pointer;
|
||||
margin-top: -6px;
|
||||
transition: transform 0.1s ease, box-shadow 0.2s ease;
|
||||
transition: transform 0.1s ease;
|
||||
}
|
||||
|
||||
.custom-range::-webkit-slider-thumb:hover {
|
||||
transform: scale(1.1);
|
||||
box-shadow: 0 0 15px var(--range-color-glow);
|
||||
transform: scale(1.15);
|
||||
}
|
||||
|
||||
.custom-range::-moz-range-thumb {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
border: none;
|
||||
border-radius: 50%;
|
||||
background: #ffffff;
|
||||
box-shadow: 0 0 10px var(--range-color-glow);
|
||||
background: var(--range-color, var(--color-neon-purple));
|
||||
cursor: pointer;
|
||||
transition: transform 0.1s ease, box-shadow 0.2s ease;
|
||||
transition: transform 0.1s ease;
|
||||
}
|
||||
|
||||
.custom-range::-moz-range-thumb:hover {
|
||||
transform: scale(1.1);
|
||||
box-shadow: 0 0 15px var(--range-color-glow);
|
||||
transform: scale(1.15);
|
||||
}
|
||||
|
||||
/* Color Variants */
|
||||
.custom-range-purple {
|
||||
--range-color: var(--color-neon-purple);
|
||||
--range-color-glow: rgba(168, 85, 247, 0.5);
|
||||
}
|
||||
.custom-range-green {
|
||||
--range-color: var(--color-neon-green);
|
||||
--range-color-glow: rgba(34, 197, 94, 0.5);
|
||||
}
|
||||
.custom-range-cyan {
|
||||
--range-color: var(--color-neon-cyan);
|
||||
--range-color-glow: rgba(6, 182, 212, 0.5);
|
||||
}
|
||||
.custom-range-yellow {
|
||||
--range-color: var(--color-neon-yellow);
|
||||
--range-color-glow: rgba(234, 179, 8, 0.5);
|
||||
}
|
||||
.custom-range-accent {
|
||||
--range-color: var(--color-neon-cyan); /* Default accent to cyan if needed, or match DaisyUI */
|
||||
--range-color-glow: rgba(6, 182, 212, 0.5);
|
||||
--range-color: var(--color-neon-cyan);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user