diff --git a/assets/css/base.css b/assets/css/base.css index d3c5c9b..11363b2 100644 --- a/assets/css/base.css +++ b/assets/css/base.css @@ -4490,8 +4490,19 @@ body.lt-is-offline .lt-main { margin-top: 2rem; transition: margin-top 0.25s eas overflow: hidden; flex-shrink: 0; user-select: none; + position: relative; /* needed so img can overlay initials absolutely */ } -.lt-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; } +/* Image overlays initials — hidden by JS (.lt-avatar-img-err) when broken */ +.lt-avatar img { + position: absolute; + inset: 0; + width: 100%; + height: 100%; + object-fit: cover; + display: block; +} +/* When the image fails, JS adds .lt-avatar-img-err to hide it, revealing initials */ +.lt-avatar img.lt-avatar-img-err { display: none; } /* Sizes */ .lt-avatar--xs { width: 1.5rem; height: 1.5rem; font-size: 0.55rem; } .lt-avatar--sm { width: 2rem; height: 2rem; font-size: 0.65rem; } diff --git a/views/DashboardView.php b/views/DashboardView.php index 7cdc52a..ca91942 100644 --- a/views/DashboardView.php +++ b/views/DashboardView.php @@ -177,25 +177,31 @@ include __DIR__ . '/layout_header.php'; CHARTS ROW (Chart.js — loaded from CDN on this page only) ═══════════════════════════════════════════════════════════ -->