Add theme manager with selectable themes and profiles: - classic: Professional SOC-style dark theme (default) - cards: Modern card-based UI with gradients - cyberpunk: Neon glow effects with terminal aesthetics Profiles extend themes with custom options: - default, soc, modern, hacker Theme selection available in Settings > Appearance with live preview. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
354 lines
8.2 KiB
CSS
354 lines
8.2 KiB
CSS
/* CrowdSec Dashboard - Cards Theme */
|
|
/* Modern card-based UI with rounded corners and shadows */
|
|
|
|
/* Theme-specific variables */
|
|
.cs-dashboard.theme-cards {
|
|
--cs-bg-primary: #0f0f0f;
|
|
--cs-bg-secondary: #1a1a1a;
|
|
--cs-bg-tertiary: #252525;
|
|
--cs-border: #333333;
|
|
--cs-accent: #6366f1;
|
|
--cs-radius-md: 12px;
|
|
--cs-radius-lg: 16px;
|
|
--cs-radius-xl: 20px;
|
|
}
|
|
|
|
.theme-cards {
|
|
padding: var(--cs-space-lg);
|
|
}
|
|
|
|
/* Header - Minimal centered */
|
|
.theme-cards .cs-header {
|
|
text-align: center;
|
|
padding: var(--cs-space-xl) 0;
|
|
margin-bottom: var(--cs-space-xl);
|
|
}
|
|
|
|
.theme-cards .cs-title {
|
|
font-size: 28px;
|
|
font-weight: 700;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: var(--cs-space-sm);
|
|
background: linear-gradient(135deg, var(--cs-accent), #a855f7);
|
|
-webkit-background-clip: text;
|
|
-webkit-text-fill-color: transparent;
|
|
background-clip: text;
|
|
}
|
|
|
|
.theme-cards .cs-title svg {
|
|
width: 32px;
|
|
height: 32px;
|
|
fill: var(--cs-accent);
|
|
}
|
|
|
|
.theme-cards .cs-status {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: var(--cs-space-sm);
|
|
margin-top: var(--cs-space-sm);
|
|
padding: var(--cs-space-xs) var(--cs-space-md);
|
|
background: var(--cs-bg-secondary);
|
|
border-radius: 20px;
|
|
font-size: var(--cs-font-size-xs);
|
|
}
|
|
|
|
.theme-cards .cs-status-dot {
|
|
width: 8px;
|
|
height: 8px;
|
|
border-radius: 50%;
|
|
animation: cs-pulse 2s infinite;
|
|
}
|
|
|
|
.theme-cards .cs-status-dot.online { background: var(--cs-success); box-shadow: 0 0 10px var(--cs-success); }
|
|
.theme-cards .cs-status-dot.offline { background: var(--cs-danger); animation: none; }
|
|
|
|
/* Navigation - Pill style */
|
|
.theme-cards .cs-nav {
|
|
display: flex;
|
|
justify-content: center;
|
|
gap: var(--cs-space-xs);
|
|
margin-bottom: var(--cs-space-xl);
|
|
padding: var(--cs-space-xs);
|
|
background: var(--cs-bg-secondary);
|
|
border-radius: 24px;
|
|
width: fit-content;
|
|
margin-left: auto;
|
|
margin-right: auto;
|
|
}
|
|
|
|
.theme-cards .cs-nav a {
|
|
color: var(--cs-text-muted);
|
|
text-decoration: none;
|
|
padding: var(--cs-space-sm) var(--cs-space-lg);
|
|
border-radius: 20px;
|
|
font-size: var(--cs-font-size-sm);
|
|
font-weight: 500;
|
|
transition: all var(--cs-transition-normal);
|
|
}
|
|
|
|
.theme-cards .cs-nav a:hover {
|
|
color: var(--cs-text);
|
|
}
|
|
|
|
.theme-cards .cs-nav a.active {
|
|
color: #fff;
|
|
background: linear-gradient(135deg, var(--cs-accent), #a855f7);
|
|
}
|
|
|
|
/* Stats - Large cards with icons */
|
|
.theme-cards .cs-stats {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
|
|
gap: var(--cs-space-md);
|
|
margin-bottom: var(--cs-space-xl);
|
|
}
|
|
|
|
.theme-cards .cs-stat {
|
|
background: var(--cs-bg-secondary);
|
|
border: 1px solid var(--cs-border);
|
|
border-radius: var(--cs-radius-lg);
|
|
padding: var(--cs-space-lg);
|
|
text-align: left;
|
|
position: relative;
|
|
overflow: hidden;
|
|
transition: all var(--cs-transition-normal);
|
|
}
|
|
|
|
.theme-cards .cs-stat:hover {
|
|
transform: translateY(-2px);
|
|
box-shadow: var(--cs-shadow-lg);
|
|
border-color: var(--cs-accent);
|
|
}
|
|
|
|
.theme-cards .cs-stat::before {
|
|
content: '';
|
|
position: absolute;
|
|
top: 0;
|
|
right: 0;
|
|
width: 80px;
|
|
height: 80px;
|
|
background: linear-gradient(135deg, transparent 50%, rgba(99, 102, 241, 0.1));
|
|
border-radius: 0 var(--cs-radius-lg) 0 80px;
|
|
}
|
|
|
|
.theme-cards .cs-stat-value {
|
|
font-size: 36px;
|
|
font-weight: 800;
|
|
font-family: var(--cs-font-mono);
|
|
background: linear-gradient(135deg, var(--cs-accent), #a855f7);
|
|
-webkit-background-clip: text;
|
|
-webkit-text-fill-color: transparent;
|
|
background-clip: text;
|
|
}
|
|
|
|
.theme-cards .cs-stat-label {
|
|
font-size: var(--cs-font-size-sm);
|
|
color: var(--cs-text-muted);
|
|
margin-top: var(--cs-space-xs);
|
|
font-weight: 500;
|
|
}
|
|
|
|
.theme-cards .cs-stat.danger .cs-stat-value {
|
|
background: linear-gradient(135deg, var(--cs-danger), #ff6b6b);
|
|
-webkit-background-clip: text;
|
|
background-clip: text;
|
|
}
|
|
|
|
.theme-cards .cs-stat.warning .cs-stat-value {
|
|
background: linear-gradient(135deg, var(--cs-warning), #fbbf24);
|
|
-webkit-background-clip: text;
|
|
background-clip: text;
|
|
}
|
|
|
|
.theme-cards .cs-stat.success .cs-stat-value {
|
|
background: linear-gradient(135deg, var(--cs-success), #34d399);
|
|
-webkit-background-clip: text;
|
|
background-clip: text;
|
|
}
|
|
|
|
/* Cards - Elevated with glow */
|
|
.theme-cards .cs-card {
|
|
background: var(--cs-bg-secondary);
|
|
border: 1px solid var(--cs-border);
|
|
border-radius: var(--cs-radius-xl);
|
|
margin-bottom: var(--cs-space-lg);
|
|
overflow: hidden;
|
|
transition: all var(--cs-transition-normal);
|
|
}
|
|
|
|
.theme-cards .cs-card:hover {
|
|
border-color: rgba(99, 102, 241, 0.3);
|
|
box-shadow: 0 0 30px rgba(99, 102, 241, 0.1);
|
|
}
|
|
|
|
.theme-cards .cs-card-header {
|
|
padding: var(--cs-space-md) var(--cs-space-lg);
|
|
background: linear-gradient(135deg, var(--cs-bg-tertiary), var(--cs-bg-secondary));
|
|
font-size: var(--cs-font-size-md);
|
|
font-weight: 600;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
}
|
|
|
|
.theme-cards .cs-card-body {
|
|
padding: var(--cs-space-lg);
|
|
}
|
|
|
|
/* Tables - Clean minimal */
|
|
.theme-cards .cs-table {
|
|
width: 100%;
|
|
border-collapse: separate;
|
|
border-spacing: 0 var(--cs-space-xs);
|
|
font-size: var(--cs-font-size-sm);
|
|
}
|
|
|
|
.theme-cards .cs-table th {
|
|
text-align: left;
|
|
padding: var(--cs-space-sm) var(--cs-space-md);
|
|
color: var(--cs-text-muted);
|
|
font-weight: 500;
|
|
font-size: var(--cs-font-size-xs);
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
}
|
|
|
|
.theme-cards .cs-table td {
|
|
padding: var(--cs-space-md);
|
|
background: var(--cs-bg-tertiary);
|
|
}
|
|
|
|
.theme-cards .cs-table tr td:first-child { border-radius: var(--cs-radius-md) 0 0 var(--cs-radius-md); }
|
|
.theme-cards .cs-table tr td:last-child { border-radius: 0 var(--cs-radius-md) var(--cs-radius-md) 0; }
|
|
|
|
.theme-cards .cs-table tr:hover td { background: rgba(99, 102, 241, 0.1); }
|
|
|
|
/* Grid layouts */
|
|
.theme-cards .cs-grid-2 {
|
|
display: grid;
|
|
grid-template-columns: 1fr 1fr;
|
|
gap: var(--cs-space-lg);
|
|
}
|
|
|
|
@media (max-width: 900px) {
|
|
.theme-cards .cs-grid-2 { grid-template-columns: 1fr; }
|
|
}
|
|
|
|
/* Health Check - Icon cards */
|
|
.theme-cards .cs-health {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
|
|
gap: var(--cs-space-md);
|
|
}
|
|
|
|
.theme-cards .cs-health-item {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
text-align: center;
|
|
gap: var(--cs-space-sm);
|
|
padding: var(--cs-space-lg);
|
|
background: var(--cs-bg-tertiary);
|
|
border-radius: var(--cs-radius-lg);
|
|
transition: all var(--cs-transition-normal);
|
|
}
|
|
|
|
.theme-cards .cs-health-item:hover {
|
|
transform: translateY(-2px);
|
|
}
|
|
|
|
.theme-cards .cs-health-icon {
|
|
width: 48px;
|
|
height: 48px;
|
|
border-radius: 50%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 20px;
|
|
}
|
|
|
|
.theme-cards .cs-health-icon.ok {
|
|
background: linear-gradient(135deg, rgba(63, 185, 80, 0.2), rgba(52, 211, 153, 0.2));
|
|
color: var(--cs-success);
|
|
}
|
|
.theme-cards .cs-health-icon.error {
|
|
background: linear-gradient(135deg, rgba(248, 81, 73, 0.2), rgba(255, 107, 107, 0.2));
|
|
color: var(--cs-danger);
|
|
}
|
|
|
|
.theme-cards .cs-health-label {
|
|
font-size: var(--cs-font-size-xs);
|
|
color: var(--cs-text-muted);
|
|
}
|
|
|
|
.theme-cards .cs-health-value {
|
|
font-size: var(--cs-font-size-md);
|
|
font-weight: 600;
|
|
}
|
|
|
|
/* Empty state */
|
|
.theme-cards .cs-empty {
|
|
text-align: center;
|
|
padding: var(--cs-space-xl);
|
|
color: var(--cs-text-muted);
|
|
}
|
|
|
|
.theme-cards .cs-empty-icon {
|
|
font-size: 48px;
|
|
margin-bottom: var(--cs-space-md);
|
|
opacity: 0.5;
|
|
}
|
|
|
|
/* Buttons - Pill style */
|
|
.theme-cards .cs-btn {
|
|
background: var(--cs-bg-tertiary);
|
|
border: 1px solid var(--cs-border);
|
|
color: var(--cs-text);
|
|
padding: 8px 16px;
|
|
border-radius: 20px;
|
|
font-size: var(--cs-font-size-sm);
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
transition: all var(--cs-transition-normal);
|
|
}
|
|
|
|
.theme-cards .cs-btn:hover {
|
|
background: var(--cs-accent);
|
|
border-color: var(--cs-accent);
|
|
color: #fff;
|
|
}
|
|
|
|
.theme-cards .cs-btn-sm {
|
|
padding: 4px 12px;
|
|
font-size: var(--cs-font-size-xs);
|
|
}
|
|
|
|
/* Geo grid */
|
|
.theme-cards .cs-geo-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
|
|
gap: var(--cs-space-sm);
|
|
}
|
|
|
|
.theme-cards .cs-geo-item {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
padding: var(--cs-space-md);
|
|
background: var(--cs-bg-tertiary);
|
|
border-radius: var(--cs-radius-md);
|
|
transition: all var(--cs-transition-fast);
|
|
}
|
|
|
|
.theme-cards .cs-geo-item:hover {
|
|
background: rgba(99, 102, 241, 0.1);
|
|
}
|
|
|
|
.theme-cards .cs-flag { font-size: 24px; }
|
|
.theme-cards .cs-geo-count {
|
|
font-weight: 700;
|
|
font-family: var(--cs-font-mono);
|
|
margin-top: var(--cs-space-xs);
|
|
}
|