Add themed widgets, calendar, and Open WebUI chat to the dashboard

- Apply GTK-like color scheme (dark greys, #f76b2f accent) across
  cards, buttons, glows and category colors
- Service cards use the official logo icons; Netbird card shows live
  reachability + latency instead of a separate top widget
- Top widgets: Today (calendar events with in-progress highlighting),
  Git activity (3 rows visible, scrollable), GPU with live ROCm stats
  and loaded Ollama models incl. GPU/CPU split
- Open WebUI card: inline prompt line with model selection
- Calendar section grouping events by day below the services
- data.json fetch with boot retry; GPU/Ollama poll every 5 s
- Today entries wrap long titles; README documents widgets,
  environment variables and the .env secrets pattern
This commit is contained in:
2026-09-04 14:07:22 +02:00
parent 55e871bd4f
commit e766fcd95c
4 changed files with 1158 additions and 46 deletions
+620 -19
View File
@@ -1,16 +1,16 @@
:root {
--bg: #070b14;
--bg-soft: #0b1220;
--bg: #161719;
--bg-soft: #1b1c1e;
--surface: rgba(255, 255, 255, 0.035);
--surface-hover: rgba(255, 255, 255, 0.06);
--surface-hover: #232527;
--border: rgba(255, 255, 255, 0.09);
--border-hover: rgba(255, 255, 255, 0.18);
--text: #e7ecf5;
--muted: #8a94a8;
--muted-2: #636e84;
--accent: #22d3ee;
--accent-2: #a855f7;
--online: #34d399;
--text: #d6d8da;
--muted: #8c8f94;
--muted-2: #6b6e73;
--accent: #f76b2f;
--accent-2: #5c8ad8;
--online: #8ab06a;
--radius: 18px;
--radius-sm: 12px;
--shadow: 0 18px 50px -20px rgba(0, 0, 0, 0.7);
@@ -43,9 +43,9 @@ body {
z-index: 0;
pointer-events: none;
background:
radial-gradient(60% 50% at 12% -5%, rgba(34, 211, 238, 0.14), transparent 60%),
radial-gradient(55% 45% at 95% 0%, rgba(168, 85, 247, 0.14), transparent 60%),
radial-gradient(70% 60% at 50% 120%, rgba(52, 211, 153, 0.08), transparent 60%);
radial-gradient(60% 50% at 12% -5%, rgba(247, 107, 47, 0.12), transparent 60%),
radial-gradient(55% 45% at 95% 0%, rgba(92, 138, 216, 0.12), transparent 60%),
radial-gradient(70% 60% at 50% 120%, rgba(138, 176, 106, 0.07), transparent 60%);
}
.shell {
@@ -77,7 +77,7 @@ body {
height: 46px;
border-radius: 14px;
background: linear-gradient(135deg, var(--accent), var(--accent-2));
box-shadow: 0 10px 30px -8px rgba(34, 211, 238, 0.6);
box-shadow: 0 10px 30px -8px rgba(247, 107, 47, 0.5);
position: relative;
flex: none;
}
@@ -277,6 +277,12 @@ main#app {
flex: none;
}
.card-icon img {
width: 28px;
height: 28px;
display: block;
}
.status {
display: inline-flex;
align-items: center;
@@ -296,17 +302,17 @@ main#app {
height: 8px;
border-radius: 50%;
background: var(--online);
box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.18);
box-shadow: 0 0 0 3px color-mix(in srgb, var(--online) 18%, transparent);
animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
0%,
100% {
box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.18);
box-shadow: 0 0 0 3px color-mix(in srgb, var(--online) 18%, transparent);
}
50% {
box-shadow: 0 0 0 5px rgba(52, 211, 153, 0.05);
box-shadow: 0 0 0 5px color-mix(in srgb, var(--online) 5%, transparent);
}
}
@@ -379,13 +385,13 @@ main#app {
}
.btn-primary {
background: linear-gradient(135deg, var(--accent), var(--accent-2));
background: linear-gradient(135deg, var(--accent), #c8531f);
border-color: transparent;
color: #05070d;
color: #1b1c1e;
}
.btn-primary:hover {
background: linear-gradient(135deg, #38dbf2, #b56bff);
background: linear-gradient(135deg, #ff8a52, #f76b2f);
}
.btn-ghost {
@@ -405,6 +411,103 @@ main#app {
font-size: 14px;
}
.card-chat {
margin-top: 10px;
padding-top: 12px;
border-top: 1px solid var(--border);
display: grid;
gap: 8px;
}
.chat-row {
display: flex;
gap: 8px;
}
.chat-model {
flex: 1 1 0;
min-width: 0;
background: var(--bg-soft);
color: var(--text);
border: 1px solid var(--border);
border-radius: var(--radius-sm);
padding: 8px 10px;
font: inherit;
font-size: 12.5px;
outline: none;
}
.chat-model:focus {
border-color: var(--border-hover);
}
.chat-prompt {
flex: 2 1 0;
min-width: 0;
background: var(--bg-soft);
color: var(--text);
border: 1px solid var(--border);
border-radius: var(--radius-sm);
padding: 8px 10px;
font: inherit;
font-size: 13px;
outline: none;
}
.chat-prompt::placeholder {
color: var(--muted-2);
}
.chat-prompt:focus {
border-color: var(--border-hover);
}
.chat-send {
flex: none;
width: 36px;
height: 36px;
display: grid;
place-items: center;
border: 1px solid var(--border);
border-radius: var(--radius-sm);
background: linear-gradient(135deg, var(--accent), #c8531f);
color: #1b1c1e;
cursor: pointer;
transition: filter 0.15s ease;
}
.chat-send:hover {
filter: brightness(1.1);
}
.chat-send:disabled {
opacity: 0.5;
cursor: not-allowed;
}
.chat-response {
font-size: 13px;
line-height: 1.4;
color: var(--text);
background: var(--bg-soft);
border: 1px solid var(--border);
border-radius: var(--radius-sm);
padding: 10px 12px;
max-height: 180px;
overflow-y: auto;
white-space: pre-wrap;
}
.chat-response:empty {
display: none;
}
.chat-response.error {
color: var(--error_color, #e0554a);
border-color: color-mix(in srgb, var(--error_color, #e0554a) 40%, transparent);
}
/* ---------- footer ---------- */
.footer {
margin-top: 40px;
text-align: center;
@@ -412,6 +515,494 @@ main#app {
font-size: 13px;
}
/* ---------- calendar ---------- */
.calendar-section {
margin-top: 34px;
}
.calendar {
display: grid;
gap: 18px;
}
.calendar-day {
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--radius);
overflow: hidden;
}
.calendar-day-header {
padding: 12px 16px;
font-size: 13px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.08em;
color: var(--muted);
background: rgba(255, 255, 255, 0.03);
border-bottom: 1px solid var(--border);
}
.calendar-events {
display: grid;
padding: 12px;
gap: 10px;
}
.calendar-event {
display: flex;
gap: 14px;
padding: 12px 14px;
border-radius: var(--radius-sm);
background: rgba(255, 255, 255, 0.03);
border: 1px solid var(--border);
transition:
background 0.18s ease,
border-color 0.18s ease,
transform 0.12s ease;
}
.calendar-event:hover {
background: var(--surface-hover);
border-color: var(--border-hover);
transform: translateX(4px);
}
.event-dot {
width: 10px;
height: 10px;
border-radius: 50%;
margin-top: 5px;
flex: none;
background: var(--cal, var(--accent));
box-shadow: 0 0 0 4px color-mix(in srgb, var(--cal, var(--accent)) 22%, transparent);
}
.event-body {
display: grid;
gap: 4px;
min-width: 0;
}
.event-time {
font-size: 12px;
font-weight: 600;
color: color-mix(in srgb, var(--cal, var(--accent)) 80%, white);
}
.event-title {
font-size: 14.5px;
font-weight: 600;
color: var(--text);
word-break: break-word;
}
.event-location,
.event-description {
font-size: 12px;
color: var(--muted);
line-height: 1.35;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}
/* ---------- empty / footer ---------- */
.calendar-loading,
.calendar-empty,
.calendar-error {
color: var(--muted);
font-size: 14px;
padding: 16px;
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--radius);
}
.calendar-error {
color: var(--error_color, #e0554a);
}
/* ---------- widgets ---------- */
.widgets {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: 16px;
margin-bottom: 34px;
}
.widget {
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 16px;
display: flex;
flex-direction: column;
gap: 12px;
transition:
transform 0.18s ease,
border-color 0.2s ease,
background 0.2s ease;
}
.widget:hover {
background: var(--surface-hover);
border-color: var(--border-hover);
}
.widget-head {
display: flex;
align-items: center;
gap: 10px;
font-weight: 700;
font-size: 14px;
color: var(--muted);
text-transform: uppercase;
letter-spacing: 0.08em;
}
.widget-icon {
width: 30px;
height: 30px;
border-radius: 8px;
display: grid;
place-items: center;
background: var(--surface-hover);
border: 1px solid var(--border);
font-size: 15px;
}
.widget-body {
display: grid;
gap: 8px;
}
.widget-empty,
.widget-error,
.widget-loading {
color: var(--muted);
font-size: 13px;
margin: 0;
}
.widget-error {
color: var(--error_color, #e0554a);
}
/* today widget */
.today-event {
display: flex;
align-items: flex-start;
gap: 10px;
font-size: 13.5px;
padding: 6px 8px;
border-radius: 8px;
background: rgba(255, 255, 255, 0.03);
}
.today-dot {
width: 8px;
height: 8px;
border-radius: 50%;
flex: none;
/* align with the first text line when summaries wrap */
margin-top: 6px;
background: var(--cal, var(--accent));
}
.today-time {
flex: none;
font-weight: 600;
color: var(--muted-2);
min-width: 48px;
}
.today-summary {
color: var(--text);
overflow-wrap: anywhere;
}
.today-event.past {
opacity: 0.45;
}
.today-event.now .today-time {
color: var(--accent);
}
.today-event.now .today-summary::after {
content: " · now";
color: var(--accent);
font-size: 11px;
font-weight: 700;
}
/* netbird live status (inside the Netbird service card) */
.card-live-status {
display: flex;
align-items: center;
gap: 9px;
font-size: 12.5px;
color: var(--muted);
padding-top: 2px;
}
.netbird-dot {
width: 9px;
height: 9px;
border-radius: 50%;
flex: none;
background: var(--warning_color, #f2a944);
}
.netbird-dot.online {
background: var(--success_color, #8ab06a);
box-shadow: 0 0 0 3px color-mix(in srgb, var(--success_color, #8ab06a) 18%, transparent);
animation: pulse 2.4s ease-in-out infinite;
}
.netbird-dot.offline {
background: var(--error_color, #e0554a);
}
.netbird-text {
color: var(--text);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.netbird-latency {
color: var(--muted-2);
font-variant-numeric: tabular-nums;
}
/* git widget */
.git-summary {
display: flex;
gap: 8px;
flex-wrap: wrap;
}
.git-badge {
font-size: 11px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.05em;
padding: 4px 8px;
border-radius: 6px;
background: var(--surface-hover);
border: 1px solid var(--border);
color: var(--muted);
}
.git-badge.gitea {
color: var(--link_color, #5c8ad8);
border-color: color-mix(in srgb, var(--link_color, #5c8ad8) 40%, transparent);
}
.git-badge.gitlab {
color: var(--warning_color, #f2a944);
border-color: color-mix(in srgb, var(--warning_color, #f2a944) 40%, transparent);
}
.git-badge.total {
color: var(--success_color, #8ab06a);
border-color: color-mix(in srgb, var(--success_color, #8ab06a) 40%, transparent);
}
.git-error {
font-size: 12px;
color: var(--error_color, #e0554a);
}
.git-commits {
list-style: none;
margin: 0;
padding: 0 4px 0 0;
display: grid;
gap: 8px;
/* show ~3 commit rows, scroll for the rest */
max-height: 216px;
overflow-y: auto;
scrollbar-width: thin;
scrollbar-color: #4c4f54 transparent;
}
.git-commits::-webkit-scrollbar {
width: 6px;
}
.git-commits::-webkit-scrollbar-thumb {
background: #4c4f54;
border-radius: 3px;
}
.git-commits::-webkit-scrollbar-track {
background: transparent;
}
.git-commit {
display: grid;
gap: 2px;
padding: 8px 10px;
border-radius: 8px;
background: rgba(255, 255, 255, 0.03);
border: 1px solid var(--border);
font-size: 12.5px;
}
.git-repo {
font-weight: 700;
color: var(--accent);
font-size: 11px;
text-transform: uppercase;
letter-spacing: 0.04em;
}
.git-msg {
color: var(--text);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.git-meta {
color: var(--muted-2);
font-size: 11px;
}
/* gpu widget */
.gpu-name {
font-size: 13px;
font-weight: 700;
color: var(--text);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.gpu-row {
display: flex;
justify-content: space-between;
align-items: baseline;
font-size: 12px;
color: var(--muted);
}
.gpu-val {
color: var(--text);
font-weight: 600;
font-variant-numeric: tabular-nums;
}
.gpu-bar {
height: 6px;
border-radius: 3px;
background: rgba(255, 255, 255, 0.06);
overflow: hidden;
}
.gpu-bar-fill {
height: 100%;
border-radius: 3px;
transition: width 0.6s ease;
}
.gpu-bar-fill.util {
background: linear-gradient(90deg, var(--accent), #c8531f);
}
.gpu-bar-fill.mem {
background: linear-gradient(90deg, var(--accent-2), #3a6db8);
}
.gpu-meta {
display: flex;
gap: 14px;
font-size: 12px;
color: var(--muted);
font-variant-numeric: tabular-nums;
}
.gpu-temp {
color: var(--success_color, #8ab06a);
}
.gpu-temp.warm {
color: var(--warning_color, #f2a944);
}
.gpu-temp.hot {
color: var(--error_color, #e0554a);
}
/* ollama block inside the gpu widget */
.ollama-block {
margin-top: 4px;
padding-top: 10px;
border-top: 1px solid var(--border);
display: grid;
gap: 8px;
}
.ollama-label {
font-size: 11px;
font-weight: 700;
letter-spacing: 0.08em;
text-transform: uppercase;
color: var(--muted-2);
}
.ollama-model {
display: grid;
gap: 3px;
padding: 7px 9px;
border-radius: 8px;
background: rgba(255, 255, 255, 0.03);
}
.ollama-model-head {
display: flex;
justify-content: space-between;
align-items: baseline;
gap: 8px;
font-size: 12.5px;
}
.ollama-name {
color: var(--text);
font-weight: 600;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.ollama-size {
color: var(--muted-2);
font-variant-numeric: tabular-nums;
flex: none;
}
.ollama-split {
font-size: 11.5px;
color: var(--muted-2);
font-variant-numeric: tabular-nums;
}
.ollama-gpu {
color: var(--accent);
font-weight: 700;
}
.ollama-cpu {
color: var(--accent-2);
font-weight: 700;
}
/* ---------- empty / footer ---------- */
/* ---------- responsive ---------- */
@media (max-width: 640px) {
.topbar {
@@ -431,6 +1022,16 @@ main#app {
#clock-time {
font-size: 18px;
}
.widgets {
grid-template-columns: 1fr;
}
.chat-row {
flex-wrap: wrap;
}
.chat-model,
.chat-prompt {
flex: 1 1 100%;
}
}
@media (prefers-reduced-motion: reduce) {