Files
pulsenode/app/globals.css
T
valknar 4308169608
CI / Static checks (push) Successful in 34s
CI / Build and push image (push) Skipped
feat: brand icons for widgets, fix stale accent color
Two separate issues, both real bugs:

- Dark mode was showing light blue instead of green: config.yml still
  had a leftover --pn-accent: #38bdf8 override from before the design
  redesign, which won via the runtime theme injector regardless of
  what app/globals.css defaulted to. Removed the override and pushed
  the dark-mode default from a soft mint (#5ee08c) to an actual neon
  green (#39ff88) - closer to what "neon" means and closer to the real
  phosphor-green a cardiac monitor trace uses, which fits the pulse
  metaphor better than the pastel version did.

- No per-service brand icons anywhere. Added an optional `icon` field
  to docker/bookmark widgets (a key into lib/brand-icons.ts) rather
  than guessing from containerName, since a heuristic would silently
  misfire for anyone's own container naming. database widgets derive
  their icon automatically from `engine` (postgres/redis) since that's
  already required and unambiguous. Icon path data comes from the CC0
  simple-icons package via scripts/extract-brand-icons.py, extracted
  and committed as plain TS data (lib/brand-icons.ts) rather than
  imported live - keeps it self-hosted (no unpkg.com/CDN calls at
  runtime, matching the fonts) and pinned regardless of dependency
  updates. Rendered monochrome (currentColor, not each brand's own
  hex) to stay consistent with the single-accent design rather than a
  dozen competing colors - only the shape carries the identity.

Wired real icons into config.yml for every service that has one:
traefik, coolify, gitea (+ gitea_runner), immich (+ immich_ml), n8n,
passbolt, umami, headscale, plus postgresql/redis on every database
widget. code and mailpit have no brand match in the curated set, so
they render without one rather than a wrong/generic substitute.

Verified in the actual rendered page: compiled CSS confirms
--pn-accent is #39ff88 (dark) / #339a5a (light) with no trace of the
old #38bdf8, and all 18 expected icon instances (10 docker + 8
database widgets) are present.
2026-08-17 17:55:27 +02:00

161 lines
3.5 KiB
CSS

@import "tailwindcss";
:root {
--pn-bg: #1a1d1f;
--pn-surface: #24282b;
--pn-surface-raised: #2b3033;
--pn-fg: #f2f4f5;
--pn-fg-muted: color-mix(in srgb, var(--pn-fg) 55%, transparent);
--pn-border: color-mix(in srgb, var(--pn-fg) 14%, transparent);
--pn-accent: #39ff88;
--pn-status-up: #39ff88;
--pn-status-down: #ff5f6d;
--pn-status-degraded: #ffb84c;
--pn-shadow-sm: 0 0 0 1px var(--pn-border);
--pn-shadow-md: 0 0 0 1px var(--pn-border), 0 6px 18px rgba(0, 0, 0, 0.45);
}
:root[data-theme="light"] {
--pn-bg: #e9ebec;
--pn-surface: #f6f7f7;
--pn-surface-raised: #eceded;
--pn-fg: #1e2224;
--pn-accent: #339a5a;
--pn-status-up: #339a5a;
--pn-status-down: #dc2626;
--pn-status-degraded: #d97706;
--pn-shadow-md: 0 0 0 1px var(--pn-border), 0 6px 18px rgba(30, 32, 45, 0.1);
}
@media (prefers-color-scheme: light) {
:root:not([data-theme]) {
--pn-bg: #e9ebec;
--pn-surface: #f6f7f7;
--pn-surface-raised: #eceded;
--pn-fg: #1e2224;
--pn-accent: #339a5a;
--pn-status-up: #339a5a;
--pn-status-down: #dc2626;
--pn-status-degraded: #d97706;
--pn-shadow-md: 0 0 0 1px var(--pn-border), 0 6px 18px rgba(30, 32, 45, 0.1);
}
}
@theme inline {
--color-bg: var(--pn-bg);
--color-surface: var(--pn-surface);
--color-surface-raised: var(--pn-surface-raised);
--color-border: var(--pn-border);
--color-fg: var(--pn-fg);
--color-fg-muted: var(--pn-fg-muted);
--color-accent: var(--pn-accent);
--color-status-up: var(--pn-status-up);
--color-status-down: var(--pn-status-down);
--color-status-degraded: var(--pn-status-degraded);
--radius-md: 0.625rem;
--radius-lg: 1rem;
--font-sans: var(--font-plex-sans);
--font-mono: var(--font-plex-mono);
--font-display: var(--font-space-grotesk);
}
body {
background: var(--pn-bg);
color: var(--pn-fg);
}
/* Rules fade to transparent at both ends instead of stopping cleanly. */
.pn-hr {
height: 1px;
flex: 1;
background: linear-gradient(
to right,
transparent,
var(--pn-border) 32px,
var(--pn-border) calc(100% - 32px),
transparent
);
}
.pn-card {
transition:
box-shadow 0.18s ease,
transform 0.18s ease,
background 0.3s ease,
border-color 0.3s ease;
box-shadow: var(--pn-shadow-sm);
}
.pn-card:hover {
transform: translateY(-2px);
box-shadow:
var(--pn-shadow-md),
0 0 0 1px color-mix(in srgb, var(--pn-accent) 35%, transparent);
}
@keyframes pn-toast-in {
from {
transform: translateY(12px);
opacity: 0;
}
to {
transform: translateY(0);
opacity: 1;
}
}
.pn-toast {
animation: pn-toast-in 0.28s ease;
}
@keyframes pn-spin-in {
from {
transform: rotate(-60deg) scale(0.6);
opacity: 0;
}
to {
transform: rotate(0) scale(1);
opacity: 1;
}
}
.pn-spin-in {
animation: pn-spin-in 0.35s ease;
}
@keyframes pulse-glow {
0%,
100% {
box-shadow: 0 0 0 0 color-mix(in srgb, var(--pn-status-up) 55%, transparent);
}
50% {
box-shadow: 0 0 0 4px color-mix(in srgb, var(--pn-status-up) 0%, transparent);
}
}
.status-pulse {
animation: pulse-glow 2s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
.status-pulse,
.pn-toast,
.pn-spin-in {
animation: none;
}
}
.pn-bento {
display: grid;
grid-template-columns: repeat(12, 1fr);
}
@media (max-width: 860px) {
.pn-bento {
grid-template-columns: repeat(6, 1fr) !important;
}
.pn-bento > * {
grid-column: 1 / -1 !important;
grid-row: auto !important;
}
.pn-live-label {
display: none !important;
}
}