mirror of
https://github.com/Dvorinka/Dash.git
synced 2026-10-28 07:41:27 +00:00
docs: lock bento-mono as primary theme, add ROADMAP.md
Primary renderer is D (bento grid, mono palette). A/E/F kept as alternate view themes on shared tokens. B and C deleted. Roadmap now maps phases to releases v0.1.0 -> v1.0.0. Generated with [Devin](https://devin.ai) Authored By: TDvorak <[email protected]> Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
564a39b0e8
commit
3edadb613d
4 files changed
+135
-955
No files matched your search
+123
@@ -0,0 +1,123 @@
|
|||||||
|
# Dash — Roadmap
|
||||||
|
|
||||||
|
A self-hosted homelab dashboard. CasaOS-grade ease of use, Vercel-grade design.
|
||||||
|
Single container, UI-managed, no YAML, no auth required.
|
||||||
|
|
||||||
|
Stack: **Go + Gin + SQLite** (single static binary, embeds frontend) · **React 18 + Vite + TS strict + Tailwind + shadcn/ui + dnd-kit** · OpenAPI-generated client.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Design system
|
||||||
|
|
||||||
|
Primary renderer: **Bento Mono** (`mockups/d-bento-mono.html`) — bento grid on a
|
||||||
|
monochrome zinc palette, Geist + Geist Mono, hairline borders, semantic status
|
||||||
|
color only.
|
||||||
|
|
||||||
|
Alternate view themes ship post-MVP on the same data model (Phase 3.5):
|
||||||
|
|
||||||
|
| Theme | Source mockup | Character |
|
||||||
|
|---|---|---|
|
||||||
|
| Bento Mono (default) | `d-bento-mono.html` | mixed-size grid, widgets inline |
|
||||||
|
| Mono Cards | `a-vercel-mono.html` | uniform card grid, quietest |
|
||||||
|
| Index | `e-editorial.html` | serif headers, list rows, stat strip |
|
||||||
|
| Console | `f-console.html` | terminal panels, `[ up ]` tags |
|
||||||
|
|
||||||
|
Rule: themes change the renderer, never the data or the interactions.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Releases
|
||||||
|
|
||||||
|
| Version | Contents | Gate |
|
||||||
|
|---|---|---|
|
||||||
|
| `v0.1.0` | Phase 0 + 1 — working MVP, single image | manual smoke test |
|
||||||
|
| `v0.2.0` | Phase 2 — widget layer + first integrations | Pi-hole widget live |
|
||||||
|
| `v0.3.0` | Phase 3 — alternate themes, search, icon packs | theme switcher works |
|
||||||
|
| `v1.0.0` | Phase 4 — OSS polish, docs, importers, CI releases | public repo launch |
|
||||||
|
| `v1.x` | Phase 5 — demand-driven extras only | per-feature |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Phase 0 — Foundation → part of v0.1.0
|
||||||
|
|
||||||
|
Repo hygiene and pipelines before features.
|
||||||
|
|
||||||
|
- [ ] Monorepo scaffold (`apps/frontend`, `apps/backend`, `packages/api-client`, `infra/`, `data/`)
|
||||||
|
- [ ] MIT `LICENSE`, `README.md`, `.gitignore`, `AGENTS.md`
|
||||||
|
- [ ] `openapi.yaml` stub → generated TS client (`packages/api-client`)
|
||||||
|
- [ ] Backend skeleton: Gin router, `zap` logging, `/api/healthz`, SQLite open + goose migrations runner
|
||||||
|
- [ ] Frontend skeleton: Vite + TS strict + Tailwind + shadcn/ui, theme tokens matching `d-bento-mono.html` CSS vars
|
||||||
|
- [ ] CI (GitHub Actions): `go build ./...`, `go vet ./...`, `go test ./...`, `tsc --noEmit`, `oxlint` + vendored anti-slop rules, `npm run build`
|
||||||
|
- [ ] Multi-stage `Dockerfile` (frontend build → Go build → `FROM scratch`/distroless, `embed.FS` serves UI)
|
||||||
|
- [ ] `docker-compose.yml` — one service, `./data:/data` volume
|
||||||
|
|
||||||
|
**Exit:** `docker compose up` serves a blank board. CI green on `main`.
|
||||||
|
|
||||||
|
## Phase 1 — MVP → v0.1.0
|
||||||
|
|
||||||
|
The product's spine: sections, services, drag-drop, multi-URL.
|
||||||
|
|
||||||
|
- [ ] Schema: `sections`, `items`, `urls`, `settings` (fractional `position REAL` ordering)
|
||||||
|
- [ ] REST API: CRUD for sections/items/urls, `reorder` endpoints, icon upload, `settings`, `export`/`import` JSON
|
||||||
|
- [ ] Board UI (Bento Mono): section headers (label, count, hairline, chevron), service tiles (icon, name, host, status chip)
|
||||||
|
- [ ] dnd-kit: reorder items in a section, move items between sections, reorder sections; persist on drop
|
||||||
|
- [ ] Collapse/expand sections (persisted)
|
||||||
|
- [ ] `UrlPopover`: 1 URL → direct open, 2+ → chooser (`local`/`external`/custom tags)
|
||||||
|
- [ ] `AddServiceDialog` / `EditServiceDialog` (name, URLs+labels, icon URL or file upload)
|
||||||
|
- [ ] Icon handling: upload to `data/icons/`, remote URL passthrough, letter-tile fallback
|
||||||
|
- [ ] Dark/light toggle (persisted), responsive to ~360px
|
||||||
|
- [ ] Status ping: server-side HEAD request per service URL, cached ~60s → `up`/`down` chip
|
||||||
|
|
||||||
|
**Exit:** create sections, add services with icons and dual URLs, drag everything, reload — state persists. `docker run` single image works. Export/import round-trips.
|
||||||
|
|
||||||
|
## Phase 2 — Widgets → v0.2.0
|
||||||
|
|
||||||
|
- [ ] Go widget registry: `Widget` interface (`Type()`, `Fetch(cfg)`), `GET /api/widgets/:id/data` with ~30s in-process TTL cache
|
||||||
|
- [ ] `GET /api/widgets/types` → registry metadata drives the add-widget dialog
|
||||||
|
- [ ] `WidgetHost` component: maps `config.type` → React component, polls with backoff
|
||||||
|
- [ ] Widgets as grid items (same `items` table, `kind = 'widget'`, `config JSON`)
|
||||||
|
- [ ] Clock/timezone widget (frontend-only)
|
||||||
|
- [ ] Pi-hole fetcher (blocked %, queries today, per-day bar series)
|
||||||
|
- [ ] AdGuard Home fetcher (blocked %, clients)
|
||||||
|
- [ ] Immich fetcher (photo count, library size)
|
||||||
|
- [ ] Per-widget config UI (endpoint URL, API key — stored in `config`, never logged)
|
||||||
|
|
||||||
|
**Exit:** Pi-hole widget shows real data; adding a new integration = one Go file + one React component.
|
||||||
|
|
||||||
|
## Phase 3 — Themes & ergonomics → v0.3.0
|
||||||
|
|
||||||
|
- [ ] Theme token layer finalized; view-theme switcher in settings
|
||||||
|
- [ ] Alternate renderers: Mono Cards, Index, Console
|
||||||
|
- [ ] ⌘K command palette: jump to service, add service, toggle theme
|
||||||
|
- [ ] dashboard-icons auto-suggest in icon picker (name → icon URL)
|
||||||
|
- [ ] User services list → prioritized widget backlog (owner-supplied list pending)
|
||||||
|
|
||||||
|
**Exit:** all four renderers work off the same board state; palette navigates everything.
|
||||||
|
|
||||||
|
## Phase 4 — Open-source launch → v1.0.0
|
||||||
|
|
||||||
|
- [ ] Docs: install, configuration, widget development guide (`docs/`)
|
||||||
|
- [ ] Importers: Homepage `services.yml`, Homarr JSON, Dashy `conf.yml` → sections/items/urls
|
||||||
|
- [ ] `README.md` hero: screenshots (4 themes), demo GIF, `docker run` one-liner
|
||||||
|
- [ ] goreleaser → binaries; GHCR image on tag; semver + `CHANGELOG.md`
|
||||||
|
- [ ] `CONTRIBUTING.md`, issue/PR templates, code of conduct, security policy
|
||||||
|
- [ ] i18n scaffolding (en default)
|
||||||
|
- [ ] Public repo flip + announcement assets
|
||||||
|
|
||||||
|
**Exit:** a stranger can `docker run`, import their Homepage config, and have a working board in under two minutes.
|
||||||
|
|
||||||
|
## Phase 5 — Post-1.0 (demand-driven only)
|
||||||
|
|
||||||
|
Build only what users actually ask for. Candidates, unordered:
|
||||||
|
|
||||||
|
- Optional auth (local password + OIDC) — most-requested, likely first
|
||||||
|
- Health-check history + uptime graphs
|
||||||
|
- Custom CSS / accent color / wallpaper
|
||||||
|
- Iframe/embed widgets, API-status widgets (generic JSON path)
|
||||||
|
- PWA install, mobile layout polish
|
||||||
|
- Multiple boards
|
||||||
|
|
||||||
|
## Non-goals (v1)
|
||||||
|
|
||||||
|
Auth, Postgres/external DB, multi-user, mobile app, container lifecycle
|
||||||
|
management, YAML-as-source-of-truth. Revisit only with evidence of demand.
|
||||||
@@ -86,53 +86,25 @@ Frontend never hand-writes API types — generated client from `openapi.yaml`.
|
|||||||
- `CommandPalette` (⌘K) — Phase 3
|
- `CommandPalette` (⌘K) — Phase 3
|
||||||
- dnd-kit `DndContext` at board level; sections and items both sortable
|
- dnd-kit `DndContext` at board level; sections and items both sortable
|
||||||
|
|
||||||
## 7. UI direction — pending
|
## 7. UI direction — DECIDED 2026-09-16
|
||||||
|
|
||||||
Static mockups in `mockups/` — open each, compare. Round 1 shortlist: A + B. C rejected (glass/wallpaper is not the target look).
|
**Primary: `d-bento-mono.html`** — bento grid on the monochrome zinc palette. Geist + Geist Mono, hairline borders, no glow, status chips carry the only color (green/amber semantic).
|
||||||
|
|
||||||
| File | Direction | Character |
|
**Alternate view themes** (same data model, different renderers — post-MVP theme system):
|
||||||
|
|
||||||
|
| Mockup | Theme | Character |
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
| `a-vercel-mono.html` | Flat monochrome | Geist, hairlines, no shadows, quietest |
|
| `a-vercel-mono.html` | Mono Cards | uniform card grid, quietest |
|
||||||
| `b-command-bento.html` | Bento grid | mixed tile sizes, widgets inline, densest; bg glow disliked |
|
| `e-editorial.html` | Index | serif headers, full-width rows, stat strip |
|
||||||
| ~~`c-casa-glass.html`~~ | ~~Glass + wallpaper~~ | rejected |
|
| `f-console.html` | Console | JetBrains Mono, bordered panels, `[ up ]` tags |
|
||||||
| `d-bento-mono.html` | Bento + mono palette | B's grid on A's zinc palette, no glow — direct merge of the two favorites |
|
|
||||||
| `e-editorial.html` | List paradigm | serif index headers, full-width rows, stat strip — no cards |
|
|
||||||
| `f-console.html` | Terminal | JetBrains Mono, bordered panels, `[ up ]` tags, prompt glyphs |
|
|
||||||
|
|
||||||
Decision recorded here once picked.
|
Rejected and deleted: bento-with-glow (B), casa glass (C).
|
||||||
|
|
||||||
|
Implementation note: design tokens (CSS vars → Tailwind theme) shared across all themes; layout renderer is the only per-theme component. Token structure must be decided in Phase 0 so alternates stay cheap.
|
||||||
|
|
||||||
## 8. Roadmap
|
## 8. Roadmap
|
||||||
|
|
||||||
### Phase 0 — Foundation
|
Canonical roadmap lives in [`ROADMAP.md`](../../ROADMAP.md) at repo root — single source of truth, kept versioned with the code.
|
||||||
- [ ] Monorepo scaffold, LICENSE (MIT), README, .gitignore, AGENTS.md
|
|
||||||
- [ ] `openapi.yaml` stub → generated TS client pipeline
|
|
||||||
- [ ] CI: `go build`, `go vet`, `tsc --noEmit`, oxlint + vendored anti-slop rules
|
|
||||||
- [ ] `docker compose up` runs the app
|
|
||||||
|
|
||||||
### Phase 1 — MVP
|
|
||||||
- [ ] Schema + goose migrations; section/item/URL CRUD
|
|
||||||
- [ ] Board UI: sections, cards, collapse, drag-drop ordering (persist position)
|
|
||||||
- [ ] Multi-URL popover; icon URL + upload
|
|
||||||
- [ ] Add/Edit dialogs; delete with confirm
|
|
||||||
- [ ] Dark/light; responsive to phone width
|
|
||||||
- [ ] Single-image Dockerfile; JSON export/import
|
|
||||||
|
|
||||||
### Phase 2 — Widgets
|
|
||||||
- [ ] Widget registry (Go) + `WidgetHost` (React)
|
|
||||||
- [ ] Clock/timezone widget (frontend-only)
|
|
||||||
- [ ] Pi-hole, AdGuard Home, Immich fetchers + per-widget config UI
|
|
||||||
- [ ] Service up/down ping (server-side HEAD, cached)
|
|
||||||
|
|
||||||
### Phase 3 — Open-source readiness
|
|
||||||
- [ ] Docs (install, config, widget dev guide), screenshots, demo GIF
|
|
||||||
- [ ] dashboard-icons auto-suggest in icon picker
|
|
||||||
- [ ] Importers: Homepage `services.yml`, Homarr JSON, Dashy `conf.yml`
|
|
||||||
- [ ] ⌘K search palette; i18n scaffolding
|
|
||||||
- [ ] goreleaser (binaries) + GHCR image + semver tags + CHANGELOG
|
|
||||||
- [ ] Issue/PR templates, CONTRIBUTING.md, code of conduct
|
|
||||||
|
|
||||||
### Phase 4 — Post-1.0 (demand-driven only)
|
|
||||||
- Optional auth (local + OIDC), health-history graphs, custom CSS/themes, iframe widgets, PWA, wallpaper support for direction A
|
|
||||||
|
|
||||||
### Explicit non-goals for v1
|
### Explicit non-goals for v1
|
||||||
Auth, Postgres, multi-user, mobile app, container management, YAML-as-source-of-truth.
|
Auth, Postgres, multi-user, mobile app, container management, YAML-as-source-of-truth.
|
||||||
|
|||||||
@@ -1,449 +0,0 @@
|
|||||||
<!doctype html>
|
|
||||||
<html lang="en" data-theme="dark">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
||||||
<title>Dash — B · Command Bento</title>
|
|
||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/fontsource/css/space-grotesk@latest/index.css">
|
|
||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/fontsource/css/jetbrains-mono@latest/index.css">
|
|
||||||
<style>
|
|
||||||
:root { --ease: cubic-bezier(0.2, 0, 0, 1); }
|
|
||||||
[data-theme="dark"] {
|
|
||||||
--bg: #0e0e11;
|
|
||||||
--bg-tint: radial-gradient(1200px 500px at 70% -10%, rgba(59,130,246,0.07), transparent 60%);
|
|
||||||
--surface: #16161a;
|
|
||||||
--surface-2: #1c1c21;
|
|
||||||
--border: rgba(255,255,255,0.07);
|
|
||||||
--border-strong: rgba(255,255,255,0.15);
|
|
||||||
--text: #f4f4f5;
|
|
||||||
--text-dim: #a1a1aa;
|
|
||||||
--text-faint: #5b5b64;
|
|
||||||
--up: #34d399;
|
|
||||||
--down: #fbbf24;
|
|
||||||
--acc-net: #60a5fa;
|
|
||||||
--acc-med: #c084fc;
|
|
||||||
--acc-inf: #f59e0b;
|
|
||||||
--acc-wdg: #34d399;
|
|
||||||
--icon-bg: #202024;
|
|
||||||
--popover: #1a1a1f;
|
|
||||||
}
|
|
||||||
[data-theme="light"] {
|
|
||||||
--bg: #f4f4f6;
|
|
||||||
--bg-tint: radial-gradient(1200px 500px at 70% -10%, rgba(59,130,246,0.08), transparent 60%);
|
|
||||||
--surface: #ffffff;
|
|
||||||
--surface-2: #f7f7f9;
|
|
||||||
--border: rgba(0,0,0,0.08);
|
|
||||||
--border-strong: rgba(0,0,0,0.16);
|
|
||||||
--text: #18181b;
|
|
||||||
--text-dim: #52525b;
|
|
||||||
--text-faint: #9d9da6;
|
|
||||||
--up: #059669;
|
|
||||||
--down: #d97706;
|
|
||||||
--acc-net: #2563eb;
|
|
||||||
--acc-med: #9333ea;
|
|
||||||
--acc-inf: #d97706;
|
|
||||||
--acc-wdg: #059669;
|
|
||||||
--icon-bg: #eef0f2;
|
|
||||||
--popover: #ffffff;
|
|
||||||
}
|
|
||||||
* { box-sizing: border-box; margin: 0; }
|
|
||||||
html { -webkit-font-smoothing: antialiased; }
|
|
||||||
body {
|
|
||||||
font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
|
|
||||||
background: var(--bg); background-image: var(--bg-tint); background-attachment: fixed;
|
|
||||||
color: var(--text); min-height: 100dvh;
|
|
||||||
transition: background 200ms var(--ease), color 200ms var(--ease);
|
|
||||||
}
|
|
||||||
.mono { font-family: "JetBrains Mono", ui-monospace, monospace; }
|
|
||||||
|
|
||||||
/* ---------- top bar ---------- */
|
|
||||||
.topbar {
|
|
||||||
position: sticky; top: 0; z-index: 10;
|
|
||||||
display: flex; align-items: center; gap: 14px;
|
|
||||||
padding: 12px 28px;
|
|
||||||
background: color-mix(in srgb, var(--bg) 78%, transparent);
|
|
||||||
backdrop-filter: blur(14px);
|
|
||||||
border-bottom: 1px solid var(--border);
|
|
||||||
}
|
|
||||||
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; letter-spacing: -0.02em; }
|
|
||||||
.brand .mark { width: 22px; height: 22px; border-radius: 6px; background: linear-gradient(135deg, var(--acc-net), var(--acc-med)); display: grid; place-items: center; color: #fff; }
|
|
||||||
.brand .mark svg { display: block; }
|
|
||||||
.crumb { font-size: 12px; color: var(--text-faint); }
|
|
||||||
.crumb b { color: var(--text-dim); font-weight: 500; }
|
|
||||||
.search {
|
|
||||||
margin-left: auto; display: flex; align-items: center; gap: 8px;
|
|
||||||
width: 220px; padding: 7px 12px;
|
|
||||||
background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
|
|
||||||
color: var(--text-faint); font-size: 12.5px;
|
|
||||||
}
|
|
||||||
.search kbd { margin-left: auto; font-family: "JetBrains Mono", monospace; font-size: 10.5px; padding: 1px 5px; border: 1px solid var(--border); border-radius: 4px; }
|
|
||||||
.iconbtn, .addbtn {
|
|
||||||
display: flex; align-items: center; justify-content: center; gap: 7px;
|
|
||||||
height: 34px; border-radius: 8px; border: 1px solid var(--border);
|
|
||||||
background: var(--surface); color: var(--text-dim);
|
|
||||||
font-family: inherit; font-size: 12.5px; font-weight: 600;
|
|
||||||
cursor: pointer; padding: 0 10px;
|
|
||||||
transition: color 150ms var(--ease), border-color 150ms var(--ease), transform 100ms var(--ease);
|
|
||||||
}
|
|
||||||
.iconbtn { width: 34px; padding: 0; }
|
|
||||||
.iconbtn:hover, .addbtn:hover { color: var(--text); border-color: var(--border-strong); }
|
|
||||||
.iconbtn:active, .addbtn:active { transform: scale(0.96); }
|
|
||||||
.addbtn.primary { background: var(--text); color: var(--bg); border: none; padding: 0 14px; }
|
|
||||||
|
|
||||||
/* ---------- bento grid ---------- */
|
|
||||||
main { max-width: 1180px; margin: 0 auto; padding: 32px 28px 90px; }
|
|
||||||
|
|
||||||
.section-label {
|
|
||||||
grid-column: 1 / -1;
|
|
||||||
display: flex; align-items: center; gap: 12px;
|
|
||||||
padding: 4px 2px; margin-top: 18px;
|
|
||||||
cursor: pointer; user-select: none;
|
|
||||||
}
|
|
||||||
.section-label:first-child { margin-top: 0; }
|
|
||||||
.section-label .swatch { width: 8px; height: 8px; border-radius: 3px; }
|
|
||||||
.section-label h2 { font-size: 13px; font-weight: 700; letter-spacing: 0.02em; }
|
|
||||||
.section-label .count { font-family: "JetBrains Mono", monospace; font-size: 11px; color: var(--text-faint); }
|
|
||||||
.section-label .line { flex: 1; height: 1px; background: var(--border); }
|
|
||||||
.section-label .chev { color: var(--text-faint); transition: transform 200ms var(--ease); }
|
|
||||||
.collapsed-icon { transform: rotate(-90deg); }
|
|
||||||
|
|
||||||
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
|
|
||||||
.bento.hide > *:not(.section-label) { display: none; }
|
|
||||||
|
|
||||||
/* ---------- service tile ---------- */
|
|
||||||
.tile {
|
|
||||||
grid-column: span 2;
|
|
||||||
position: relative;
|
|
||||||
display: flex; align-items: center; gap: 12px;
|
|
||||||
padding: 14px 16px; min-height: 72px;
|
|
||||||
background: var(--surface);
|
|
||||||
border: 1px solid var(--border);
|
|
||||||
border-radius: 14px;
|
|
||||||
cursor: grab;
|
|
||||||
transition: border-color 150ms var(--ease), background 150ms var(--ease), transform 100ms var(--ease);
|
|
||||||
}
|
|
||||||
.tile:hover { border-color: var(--border-strong); background: var(--surface-2); }
|
|
||||||
.tile:active { transform: scale(0.98); }
|
|
||||||
.tile.dragging { opacity: 0.35; }
|
|
||||||
|
|
||||||
.icon {
|
|
||||||
position: relative; flex: none;
|
|
||||||
width: 42px; height: 42px; border-radius: 11px;
|
|
||||||
background: var(--icon-bg);
|
|
||||||
display: flex; align-items: center; justify-content: center;
|
|
||||||
font-size: 16px; font-weight: 700; color: var(--text-dim);
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
.icon::before { content: attr(data-letter); }
|
|
||||||
.icon img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 6px; background: var(--icon-bg); }
|
|
||||||
|
|
||||||
.tile .txt { min-width: 0; }
|
|
||||||
.tile .name { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
||||||
.tile .host { font-family: "JetBrains Mono", monospace; font-size: 10.5px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
||||||
.chip {
|
|
||||||
margin-left: auto; flex: none;
|
|
||||||
font-family: "JetBrains Mono", monospace; font-size: 9.5px; font-weight: 500;
|
|
||||||
padding: 3px 7px; border-radius: 5px; letter-spacing: 0.04em;
|
|
||||||
}
|
|
||||||
.chip.up { color: var(--up); background: color-mix(in srgb, var(--up) 12%, transparent); }
|
|
||||||
.chip.down { color: var(--down); background: color-mix(in srgb, var(--down) 12%, transparent); }
|
|
||||||
|
|
||||||
/* ---------- widget tiles ---------- */
|
|
||||||
.widget {
|
|
||||||
grid-column: span 3; grid-row: span 2;
|
|
||||||
padding: 18px; border-radius: 14px;
|
|
||||||
background: var(--surface); border: 1px solid var(--border);
|
|
||||||
display: flex; flex-direction: column; min-height: 154px;
|
|
||||||
}
|
|
||||||
.widget.s2 { grid-column: span 2; }
|
|
||||||
.wlabel { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-faint); display: flex; align-items: center; gap: 7px; }
|
|
||||||
.wlabel img { width: 14px; height: 14px; }
|
|
||||||
.wlabel .live { margin-left: auto; color: var(--up); font-family: "JetBrains Mono", monospace; font-size: 9px; letter-spacing: 0.1em; text-transform: none; }
|
|
||||||
.clock { font-family: "JetBrains Mono", monospace; font-size: 34px; font-weight: 500; letter-spacing: -0.03em; margin-top: auto; font-variant-numeric: tabular-nums; }
|
|
||||||
.zones { display: flex; gap: 16px; margin-top: 8px; font-family: "JetBrains Mono", monospace; font-size: 10.5px; color: var(--text-faint); font-variant-numeric: tabular-nums; }
|
|
||||||
.zones b { color: var(--text-dim); font-weight: 500; }
|
|
||||||
.bigstat { font-family: "JetBrains Mono", monospace; font-size: 30px; font-weight: 500; letter-spacing: -0.03em; margin-top: auto; font-variant-numeric: tabular-nums; }
|
|
||||||
.statsub { font-size: 11px; color: var(--text-faint); margin-top: 6px; }
|
|
||||||
.bars { display: flex; align-items: flex-end; gap: 3px; height: 34px; margin-top: 12px; }
|
|
||||||
.bars i { flex: 1; border-radius: 2px; background: color-mix(in srgb, var(--acc-wdg) 55%, transparent); }
|
|
||||||
.bars i.dim { background: var(--border-strong); }
|
|
||||||
|
|
||||||
/* ---------- url popover ---------- */
|
|
||||||
.urlpop {
|
|
||||||
position: absolute; top: calc(100% + 6px); left: 14px; z-index: 20;
|
|
||||||
min-width: 240px; padding: 5px;
|
|
||||||
background: var(--popover); border: 1px solid var(--border-strong);
|
|
||||||
border-radius: 12px;
|
|
||||||
box-shadow: 0 12px 40px rgba(0,0,0,0.4), 0 2px 6px rgba(0,0,0,0.2);
|
|
||||||
opacity: 0; transform: translateY(-4px) scale(0.98); pointer-events: none;
|
|
||||||
transition: opacity 150ms var(--ease), transform 150ms var(--ease);
|
|
||||||
}
|
|
||||||
.tile.open .urlpop { opacity: 1; transform: none; pointer-events: auto; }
|
|
||||||
.urlpop a {
|
|
||||||
display: flex; align-items: center; gap: 10px;
|
|
||||||
padding: 8px 10px; border-radius: 8px;
|
|
||||||
color: var(--text); text-decoration: none; font-size: 13px;
|
|
||||||
}
|
|
||||||
.urlpop a:hover { background: var(--surface-2); }
|
|
||||||
.urlpop .tag {
|
|
||||||
flex: none; font-family: "JetBrains Mono", monospace; font-size: 9px; font-weight: 500;
|
|
||||||
text-transform: uppercase; letter-spacing: 0.08em;
|
|
||||||
padding: 3px 6px; border-radius: 5px;
|
|
||||||
background: var(--icon-bg); color: var(--text-dim);
|
|
||||||
}
|
|
||||||
.urlpop .u { font-family: "JetBrains Mono", monospace; font-size: 10.5px; color: var(--text-faint); margin-left: auto; }
|
|
||||||
|
|
||||||
.edit-hint { color: var(--text-faint); font-size: 12px; text-align: center; margin-top: 32px; }
|
|
||||||
|
|
||||||
@media (max-width: 900px) { .bento { grid-template-columns: repeat(4, 1fr); } .widget { grid-column: span 4; } .widget.s2 { grid-column: span 2; } }
|
|
||||||
@media (max-width: 620px) {
|
|
||||||
.topbar { padding: 10px 16px; } .search { display: none; }
|
|
||||||
main { padding: 20px 14px 70px; }
|
|
||||||
.bento { grid-template-columns: 1fr 1fr; }
|
|
||||||
.tile { grid-column: span 1; } .widget, .widget.s2 { grid-column: 1 / -1; }
|
|
||||||
}
|
|
||||||
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
|
|
||||||
:focus-visible { outline: 2px solid var(--acc-net); outline-offset: 2px; }
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<header class="topbar">
|
|
||||||
<div class="brand">
|
|
||||||
<span class="mark"><svg width="12" height="12" viewBox="0 0 18 18" fill="none"><rect x="1" y="1" width="7" height="7" rx="1.5" fill="#fff"/><rect x="10" y="1" width="7" height="7" rx="1.5" fill="#fff" opacity=".5"/><rect x="1" y="10" width="7" height="7" rx="1.5" fill="#fff" opacity=".5"/><rect x="10" y="10" width="7" height="7" rx="1.5" fill="#fff"/></svg></span>
|
|
||||||
Dash
|
|
||||||
</div>
|
|
||||||
<span class="crumb">home / <b>main board</b></span>
|
|
||||||
<div class="search">
|
|
||||||
<svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="11" cy="11" r="7"/><path d="m20 20-3.5-3.5"/></svg>
|
|
||||||
Search
|
|
||||||
<kbd>⌘K</kbd>
|
|
||||||
</div>
|
|
||||||
<button class="iconbtn" id="theme" aria-label="Toggle theme">
|
|
||||||
<svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8"><path d="M21 12.8A9 9 0 1 1 11.2 3 7 7 0 0 0 21 12.8Z"/></svg>
|
|
||||||
</button>
|
|
||||||
<button class="addbtn primary">
|
|
||||||
<svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.4"><path d="M12 5v14M5 12h14"/></svg>
|
|
||||||
Add
|
|
||||||
</button>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<main>
|
|
||||||
<div class="bento">
|
|
||||||
|
|
||||||
<!-- widgets row -->
|
|
||||||
<div class="section-label" data-sec>
|
|
||||||
<span class="swatch" style="background:var(--acc-wdg)"></span>
|
|
||||||
<h2>Status</h2><span class="count">04</span><span class="line"></span>
|
|
||||||
<svg class="chev" width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="m6 9 6 6 6-6"/></svg>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="widget">
|
|
||||||
<div class="wlabel">Local time <span class="live">● LIVE</span></div>
|
|
||||||
<div class="clock" id="clock">--:--:--</div>
|
|
||||||
<div class="zones"><span><b>PRG</b> <span id="tz1"></span></span><span><b>NYC</b> <span id="tz2"></span></span><span><b>TYO</b> <span id="tz3"></span></span></div>
|
|
||||||
</div>
|
|
||||||
<div class="widget">
|
|
||||||
<div class="wlabel"><img src="https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/pi-hole.png" alt="" onerror="this.remove()">Pi-hole · today</div>
|
|
||||||
<div class="bigstat">24.6%</div>
|
|
||||||
<div class="statsub">20,721 ads blocked · 84,213 queries</div>
|
|
||||||
<div class="bars"><i class="dim" style="height:30%"></i><i style="height:45%"></i><i class="dim" style="height:35%"></i><i style="height:60%"></i><i style="height:52%"></i><i class="dim" style="height:40%"></i><i style="height:75%"></i><i style="height:64%"></i><i class="dim" style="height:48%"></i><i style="height:82%"></i><i style="height:70%"></i><i style="height:90%"></i></div>
|
|
||||||
</div>
|
|
||||||
<div class="widget s2">
|
|
||||||
<div class="wlabel"><img src="https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/adguard-home.png" alt="" onerror="this.remove()">AdGuard</div>
|
|
||||||
<div class="bigstat">11.2%</div>
|
|
||||||
<div class="statsub">blocked · 31 clients</div>
|
|
||||||
</div>
|
|
||||||
<div class="widget s2">
|
|
||||||
<div class="wlabel"><img src="https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/immich.png" alt="" onerror="this.remove()">Immich</div>
|
|
||||||
<div class="bigstat">12,483</div>
|
|
||||||
<div class="statsub">photos · 96.4 GB</div>
|
|
||||||
</div>
|
|
||||||
<div class="widget s2">
|
|
||||||
<div class="wlabel">Uptime · 30d</div>
|
|
||||||
<div class="bigstat">99.7%</div>
|
|
||||||
<div class="statsub">1 incident · Radarr</div>
|
|
||||||
</div>
|
|
||||||
<div class="widget s2">
|
|
||||||
<div class="wlabel"><img src="https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/truenas.png" alt="" onerror="this.remove()">Storage</div>
|
|
||||||
<div class="bigstat">61%</div>
|
|
||||||
<div class="statsub">14.2 / 23.2 TB</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- network -->
|
|
||||||
<div class="section-label" data-sec>
|
|
||||||
<span class="swatch" style="background:var(--acc-net)"></span>
|
|
||||||
<h2>Network</h2><span class="count">04</span><span class="line"></span>
|
|
||||||
<svg class="chev" width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="m6 9 6 6 6-6"/></svg>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="tile" draggable="true" data-urls='[{"tag":"Local","u":"http://10.0.0.2/admin"},{"tag":"External","u":"https://pihole.tdvorak.dev"}]'>
|
|
||||||
<div class="icon" data-letter="P"><img src="https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/pi-hole.png" alt="" onerror="this.remove()"></div>
|
|
||||||
<div class="txt"><div class="name">Pi-hole</div><div class="host">10.0.0.2</div></div>
|
|
||||||
<span class="chip up">UP</span>
|
|
||||||
<div class="urlpop"></div>
|
|
||||||
</div>
|
|
||||||
<div class="tile" draggable="true" data-urls='[{"tag":"Local","u":"http://10.0.0.3:3000"}]'>
|
|
||||||
<div class="icon" data-letter="A"><img src="https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/adguard-home.png" alt="" onerror="this.remove()"></div>
|
|
||||||
<div class="txt"><div class="name">AdGuard Home</div><div class="host">10.0.0.3:3000</div></div>
|
|
||||||
<span class="chip up">UP</span>
|
|
||||||
</div>
|
|
||||||
<div class="tile" draggable="true" data-urls='[{"tag":"Local","u":"http://10.0.0.2:81"},{"tag":"External","u":"https://npm.tdvorak.dev"}]'>
|
|
||||||
<div class="icon" data-letter="N"><img src="https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/nginx-proxy-manager.png" alt="" onerror="this.remove()"></div>
|
|
||||||
<div class="txt"><div class="name">Nginx Proxy Mgr</div><div class="host">10.0.0.2:81</div></div>
|
|
||||||
<span class="chip up">UP</span>
|
|
||||||
<div class="urlpop"></div>
|
|
||||||
</div>
|
|
||||||
<div class="tile" draggable="true" data-urls='[{"tag":"Local","u":"http://10.0.0.5:3001"},{"tag":"External","u":"https://status.tdvorak.dev"}]'>
|
|
||||||
<div class="icon" data-letter="U"><img src="https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/uptime-kuma.png" alt="" onerror="this.remove()"></div>
|
|
||||||
<div class="txt"><div class="name">Uptime Kuma</div><div class="host">status.tdvorak.dev</div></div>
|
|
||||||
<span class="chip up">UP</span>
|
|
||||||
<div class="urlpop"></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- media -->
|
|
||||||
<div class="section-label" data-sec>
|
|
||||||
<span class="swatch" style="background:var(--acc-med)"></span>
|
|
||||||
<h2>Media</h2><span class="count">06</span><span class="line"></span>
|
|
||||||
<svg class="chev" width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="m6 9 6 6 6-6"/></svg>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="tile" draggable="true" data-urls='[{"tag":"Local","u":"http://10.0.0.10:8096"},{"tag":"External","u":"https://watch.tdvorak.dev"}]'>
|
|
||||||
<div class="icon" data-letter="J"><img src="https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/jellyfin.png" alt="" onerror="this.remove()"></div>
|
|
||||||
<div class="txt"><div class="name">Jellyfin</div><div class="host">watch.tdvorak.dev</div></div>
|
|
||||||
<span class="chip up">UP</span>
|
|
||||||
<div class="urlpop"></div>
|
|
||||||
</div>
|
|
||||||
<div class="tile" draggable="true" data-urls='[{"tag":"Local","u":"http://10.0.0.10:2283"},{"tag":"External","u":"https://photos.tdvorak.dev"}]'>
|
|
||||||
<div class="icon" data-letter="I"><img src="https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/immich.png" alt="" onerror="this.remove()"></div>
|
|
||||||
<div class="txt"><div class="name">Immich</div><div class="host">photos.tdvorak.dev</div></div>
|
|
||||||
<span class="chip up">UP</span>
|
|
||||||
<div class="urlpop"></div>
|
|
||||||
</div>
|
|
||||||
<div class="tile" draggable="true" data-urls='[{"tag":"Local","u":"http://10.0.0.10:4533"}]'>
|
|
||||||
<div class="icon" data-letter="N"><img src="https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/navidrome.png" alt="" onerror="this.remove()"></div>
|
|
||||||
<div class="txt"><div class="name">Navidrome</div><div class="host">10.0.0.10:4533</div></div>
|
|
||||||
<span class="chip up">UP</span>
|
|
||||||
</div>
|
|
||||||
<div class="tile" draggable="true" data-urls='[{"tag":"Local","u":"http://10.0.0.10:8080"}]'>
|
|
||||||
<div class="icon" data-letter="q"><img src="https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/qbittorrent.png" alt="" onerror="this.remove()"></div>
|
|
||||||
<div class="txt"><div class="name">qBittorrent</div><div class="host">10.0.0.10:8080</div></div>
|
|
||||||
<span class="chip up">UP</span>
|
|
||||||
</div>
|
|
||||||
<div class="tile" draggable="true" data-urls='[{"tag":"Local","u":"http://10.0.0.10:8989"}]'>
|
|
||||||
<div class="icon" data-letter="S"><img src="https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/sonarr.png" alt="" onerror="this.remove()"></div>
|
|
||||||
<div class="txt"><div class="name">Sonarr</div><div class="host">10.0.0.10:8989</div></div>
|
|
||||||
<span class="chip up">UP</span>
|
|
||||||
</div>
|
|
||||||
<div class="tile" draggable="true" data-urls='[{"tag":"Local","u":"http://10.0.0.10:7878"}]'>
|
|
||||||
<div class="icon" data-letter="R"><img src="https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/radarr.png" alt="" onerror="this.remove()"></div>
|
|
||||||
<div class="txt"><div class="name">Radarr</div><div class="host">10.0.0.10:7878</div></div>
|
|
||||||
<span class="chip down">DOWN</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- infra -->
|
|
||||||
<div class="section-label" data-sec>
|
|
||||||
<span class="swatch" style="background:var(--acc-inf)"></span>
|
|
||||||
<h2>Infrastructure</h2><span class="count">07</span><span class="line"></span>
|
|
||||||
<svg class="chev" width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="m6 9 6 6 6-6"/></svg>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="tile" draggable="true" data-urls='[{"tag":"Local","u":"https://10.0.0.4:8006"}]'>
|
|
||||||
<div class="icon" data-letter="P"><img src="https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/proxmox.png" alt="" onerror="this.remove()"></div>
|
|
||||||
<div class="txt"><div class="name">Proxmox</div><div class="host">10.0.0.4:8006</div></div>
|
|
||||||
<span class="chip up">UP</span>
|
|
||||||
</div>
|
|
||||||
<div class="tile" draggable="true" data-urls='[{"tag":"Local","u":"http://10.0.0.4:9000"}]'>
|
|
||||||
<div class="icon" data-letter="P"><img src="https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/portainer.png" alt="" onerror="this.remove()"></div>
|
|
||||||
<div class="txt"><div class="name">Portainer</div><div class="host">10.0.0.4:9000</div></div>
|
|
||||||
<span class="chip up">UP</span>
|
|
||||||
</div>
|
|
||||||
<div class="tile" draggable="true" data-urls='[{"tag":"Local","u":"http://10.0.0.6"},{"tag":"External","u":"https://nas.tdvorak.dev"}]'>
|
|
||||||
<div class="icon" data-letter="T"><img src="https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/truenas.png" alt="" onerror="this.remove()"></div>
|
|
||||||
<div class="txt"><div class="name">TrueNAS</div><div class="host">nas.tdvorak.dev</div></div>
|
|
||||||
<span class="chip up">UP</span>
|
|
||||||
<div class="urlpop"></div>
|
|
||||||
</div>
|
|
||||||
<div class="tile" draggable="true" data-urls='[{"tag":"Local","u":"http://10.0.0.4:3100"}]'>
|
|
||||||
<div class="icon" data-letter="G"><img src="https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/grafana.png" alt="" onerror="this.remove()"></div>
|
|
||||||
<div class="txt"><div class="name">Grafana</div><div class="host">10.0.0.4:3100</div></div>
|
|
||||||
<span class="chip up">UP</span>
|
|
||||||
</div>
|
|
||||||
<div class="tile" draggable="true" data-urls='[{"tag":"External","u":"https://vault.tdvorak.dev"}]'>
|
|
||||||
<div class="icon" data-letter="V"><img src="https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/vaultwarden.png" alt="" onerror="this.remove()"></div>
|
|
||||||
<div class="txt"><div class="name">Vaultwarden</div><div class="host">vault.tdvorak.dev</div></div>
|
|
||||||
<span class="chip up">UP</span>
|
|
||||||
</div>
|
|
||||||
<div class="tile" draggable="true" data-urls='[{"tag":"Local","u":"http://10.0.0.7:8123"},{"tag":"External","u":"https://home.tdvorak.dev"}]'>
|
|
||||||
<div class="icon" data-letter="H"><img src="https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/home-assistant.png" alt="" onerror="this.remove()"></div>
|
|
||||||
<div class="txt"><div class="name">Home Assistant</div><div class="host">home.tdvorak.dev</div></div>
|
|
||||||
<span class="chip up">UP</span>
|
|
||||||
<div class="urlpop"></div>
|
|
||||||
</div>
|
|
||||||
<div class="tile" draggable="true" data-urls='[{"tag":"External","u":"https://cloud.tdvorak.dev"}]'>
|
|
||||||
<div class="icon" data-letter="N"><img src="https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/nextcloud.png" alt="" onerror="this.remove()"></div>
|
|
||||||
<div class="txt"><div class="name">Nextcloud</div><div class="host">cloud.tdvorak.dev</div></div>
|
|
||||||
<span class="chip up">UP</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p class="edit-hint">Mockup B — Command Bento. Widgets and services share one grid. Click a multi-URL tile (Jellyfin, Immich…) for the chooser. Section headers collapse.</p>
|
|
||||||
</main>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
document.getElementById('theme').onclick = () => {
|
|
||||||
const h = document.documentElement;
|
|
||||||
h.dataset.theme = h.dataset.theme === 'dark' ? 'light' : 'dark';
|
|
||||||
};
|
|
||||||
|
|
||||||
const fmt = (tz, s) => new Intl.DateTimeFormat('en-GB', { hour: '2-digit', minute: '2-digit', second: s ? '2-digit' : undefined, timeZone: tz });
|
|
||||||
function tick() {
|
|
||||||
const n = new Date();
|
|
||||||
document.getElementById('clock').textContent = fmt(undefined, true).format(n);
|
|
||||||
document.getElementById('tz1').textContent = fmt('Europe/Prague').format(n);
|
|
||||||
document.getElementById('tz2').textContent = fmt('America/New_York').format(n);
|
|
||||||
document.getElementById('tz3').textContent = fmt('Asia/Tokyo').format(n);
|
|
||||||
}
|
|
||||||
tick(); setInterval(tick, 1000);
|
|
||||||
|
|
||||||
// collapse: hide siblings until next section-label
|
|
||||||
document.querySelectorAll('[data-sec]').forEach(h => h.addEventListener('click', () => {
|
|
||||||
h.querySelector('.chev').classList.toggle('collapsed-icon');
|
|
||||||
let el = h.nextElementSibling;
|
|
||||||
const hide = h.dataset.closed !== '1';
|
|
||||||
while (el && !el.hasAttribute('data-sec')) { el.style.display = hide ? 'none' : ''; el = el.nextElementSibling; }
|
|
||||||
h.dataset.closed = hide ? '1' : '';
|
|
||||||
}));
|
|
||||||
|
|
||||||
// multi-URL popover
|
|
||||||
document.querySelectorAll('.tile[data-urls]').forEach(card => {
|
|
||||||
const urls = JSON.parse(card.dataset.urls);
|
|
||||||
if (urls.length < 2) return;
|
|
||||||
const pop = card.querySelector('.urlpop');
|
|
||||||
pop.innerHTML = urls.map(x => `<a href="#" onclick="return false"><span class="tag">${x.tag}</span>${new URL(x.u).hostname}<span class="u">↗</span></a>`).join('');
|
|
||||||
card.addEventListener('click', e => {
|
|
||||||
if (card.classList.contains('dragging')) return;
|
|
||||||
document.querySelectorAll('.tile.open').forEach(c => c !== card && c.classList.remove('open'));
|
|
||||||
card.classList.toggle('open');
|
|
||||||
e.stopPropagation();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
document.addEventListener('click', () => document.querySelectorAll('.tile.open').forEach(c => c.classList.remove('open')));
|
|
||||||
|
|
||||||
// drag reorder
|
|
||||||
let dragEl = null;
|
|
||||||
document.querySelectorAll('.tile').forEach(card => {
|
|
||||||
card.addEventListener('dragstart', () => { dragEl = card; setTimeout(() => card.classList.add('dragging')); });
|
|
||||||
card.addEventListener('dragend', () => card.classList.remove('dragging'));
|
|
||||||
card.addEventListener('dragover', e => {
|
|
||||||
e.preventDefault();
|
|
||||||
if (card === dragEl) return;
|
|
||||||
const r = card.getBoundingClientRect();
|
|
||||||
const before = e.clientX < r.left + r.width / 2;
|
|
||||||
card.parentElement.insertBefore(dragEl, before ? card : card.nextSibling);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,466 +0,0 @@
|
|||||||
<!doctype html>
|
|
||||||
<html lang="en" data-theme="dark">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
||||||
<title>Dash — C · Casa Glass</title>
|
|
||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/fontsource/css/plus-jakarta-sans@latest/index.css">
|
|
||||||
<style>
|
|
||||||
:root { --spring: cubic-bezier(0.32, 0.72, 0, 1); }
|
|
||||||
[data-theme="dark"] {
|
|
||||||
--wall:
|
|
||||||
radial-gradient(1000px 700px at 15% -10%, rgba(99,102,241,0.55), transparent 60%),
|
|
||||||
radial-gradient(900px 600px at 85% 10%, rgba(16,185,129,0.35), transparent 55%),
|
|
||||||
radial-gradient(800px 900px at 50% 110%, rgba(168,85,247,0.4), transparent 60%),
|
|
||||||
linear-gradient(180deg, #0b0d1a, #101223);
|
|
||||||
--glass: rgba(255,255,255,0.07);
|
|
||||||
--glass-strong: rgba(255,255,255,0.11);
|
|
||||||
--glass-border: rgba(255,255,255,0.13);
|
|
||||||
--glass-border-hi: rgba(255,255,255,0.25);
|
|
||||||
--inner-hi: inset 0 1px 0 rgba(255,255,255,0.12);
|
|
||||||
--text: #f4f5fa;
|
|
||||||
--text-dim: rgba(235,238,250,0.72);
|
|
||||||
--text-faint: rgba(235,238,250,0.45);
|
|
||||||
--up: #4ade80;
|
|
||||||
--down: #fbbf24;
|
|
||||||
--icon-bg: rgba(255,255,255,0.12);
|
|
||||||
--popover: rgba(22,24,40,0.82);
|
|
||||||
--shadow: 0 12px 40px rgba(0,0,0,0.35);
|
|
||||||
}
|
|
||||||
[data-theme="light"] {
|
|
||||||
--wall:
|
|
||||||
radial-gradient(1000px 700px at 15% -10%, rgba(147,197,253,0.7), transparent 60%),
|
|
||||||
radial-gradient(900px 600px at 85% 10%, rgba(167,243,208,0.7), transparent 55%),
|
|
||||||
radial-gradient(800px 900px at 50% 110%, rgba(216,180,254,0.7), transparent 60%),
|
|
||||||
linear-gradient(180deg, #eef1fb, #f6f3fc);
|
|
||||||
--glass: rgba(255,255,255,0.45);
|
|
||||||
--glass-strong: rgba(255,255,255,0.62);
|
|
||||||
--glass-border: rgba(255,255,255,0.65);
|
|
||||||
--glass-border-hi: rgba(255,255,255,0.9);
|
|
||||||
--inner-hi: inset 0 1px 0 rgba(255,255,255,0.7);
|
|
||||||
--text: #1a1c2e;
|
|
||||||
--text-dim: rgba(26,28,46,0.7);
|
|
||||||
--text-faint: rgba(26,28,46,0.45);
|
|
||||||
--up: #16a34a;
|
|
||||||
--down: #d97706;
|
|
||||||
--icon-bg: rgba(255,255,255,0.55);
|
|
||||||
--popover: rgba(255,255,255,0.85);
|
|
||||||
--shadow: 0 12px 40px rgba(60,60,120,0.15);
|
|
||||||
}
|
|
||||||
* { box-sizing: border-box; margin: 0; }
|
|
||||||
html { -webkit-font-smoothing: antialiased; }
|
|
||||||
body {
|
|
||||||
font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
|
|
||||||
color: var(--text); min-height: 100dvh;
|
|
||||||
transition: color 200ms var(--spring);
|
|
||||||
}
|
|
||||||
.wall { position: fixed; inset: 0; z-index: -1; background: var(--wall); }
|
|
||||||
.wall::after { /* subtle grain */
|
|
||||||
content: ""; position: absolute; inset: 0; opacity: 0.04; pointer-events: none;
|
|
||||||
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ---------- floating glass bar ---------- */
|
|
||||||
.topbar {
|
|
||||||
position: sticky; top: 14px; z-index: 10;
|
|
||||||
display: flex; align-items: center; gap: 12px;
|
|
||||||
margin: 14px auto 0; max-width: 1080px;
|
|
||||||
padding: 10px 16px;
|
|
||||||
background: var(--glass);
|
|
||||||
backdrop-filter: blur(24px) saturate(1.5);
|
|
||||||
-webkit-backdrop-filter: blur(24px) saturate(1.5);
|
|
||||||
border: 1px solid var(--glass-border);
|
|
||||||
border-radius: 18px;
|
|
||||||
box-shadow: var(--inner-hi), var(--shadow);
|
|
||||||
}
|
|
||||||
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; letter-spacing: -0.01em; }
|
|
||||||
.brand .mark { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--glass-strong); border: 1px solid var(--glass-border); box-shadow: var(--inner-hi); }
|
|
||||||
.search {
|
|
||||||
margin-left: auto; display: flex; align-items: center; gap: 8px;
|
|
||||||
width: 210px; padding: 8px 12px;
|
|
||||||
background: var(--glass); border: 1px solid var(--glass-border);
|
|
||||||
border-radius: 999px; color: var(--text-faint); font-size: 13px;
|
|
||||||
box-shadow: var(--inner-hi);
|
|
||||||
}
|
|
||||||
.pillbtn {
|
|
||||||
display: flex; align-items: center; justify-content: center; gap: 7px;
|
|
||||||
height: 36px; border-radius: 999px; border: 1px solid var(--glass-border);
|
|
||||||
background: var(--glass); color: var(--text-dim);
|
|
||||||
font-family: inherit; font-size: 13px; font-weight: 600;
|
|
||||||
cursor: pointer; padding: 0 12px; box-shadow: var(--inner-hi);
|
|
||||||
transition: background 200ms var(--spring), color 200ms var(--spring), transform 120ms var(--spring);
|
|
||||||
}
|
|
||||||
.pillbtn.icon { width: 36px; padding: 0; }
|
|
||||||
.pillbtn:hover { background: var(--glass-strong); color: var(--text); }
|
|
||||||
.pillbtn:active { transform: scale(0.96); }
|
|
||||||
.pillbtn.primary { background: var(--text); color: var(--popover); border: none; padding: 0 16px; }
|
|
||||||
|
|
||||||
/* ---------- hero ---------- */
|
|
||||||
main { max-width: 1080px; margin: 0 auto; padding: 40px 24px 100px; }
|
|
||||||
.hero {
|
|
||||||
padding: 34px 38px; margin-bottom: 34px;
|
|
||||||
background: var(--glass); border: 1px solid var(--glass-border);
|
|
||||||
border-radius: 28px; box-shadow: var(--inner-hi), var(--shadow);
|
|
||||||
display: flex; align-items: flex-end; gap: 24px; flex-wrap: wrap;
|
|
||||||
}
|
|
||||||
.hero .greet { font-size: 15px; font-weight: 600; color: var(--text-dim); margin-bottom: 6px; }
|
|
||||||
.hero .clock { font-size: 58px; font-weight: 800; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
|
|
||||||
.hero .date { font-size: 14px; color: var(--text-faint); margin-top: 8px; font-weight: 500; }
|
|
||||||
.hero .zones { margin-left: auto; display: flex; gap: 10px; }
|
|
||||||
.zone {
|
|
||||||
padding: 10px 16px; border-radius: 16px; text-align: center;
|
|
||||||
background: var(--glass); border: 1px solid var(--glass-border); box-shadow: var(--inner-hi);
|
|
||||||
}
|
|
||||||
.zone .zname { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; color: var(--text-faint); }
|
|
||||||
.zone .ztime { font-size: 17px; font-weight: 700; margin-top: 3px; font-variant-numeric: tabular-nums; }
|
|
||||||
|
|
||||||
/* ---------- section trays (double bezel) ---------- */
|
|
||||||
.tray {
|
|
||||||
padding: 10px; margin-bottom: 26px;
|
|
||||||
background: var(--glass); border: 1px solid var(--glass-border);
|
|
||||||
border-radius: 26px; box-shadow: var(--inner-hi), var(--shadow);
|
|
||||||
}
|
|
||||||
.tray-head {
|
|
||||||
display: flex; align-items: center; gap: 10px;
|
|
||||||
padding: 10px 14px 12px; cursor: pointer; user-select: none;
|
|
||||||
}
|
|
||||||
.tray-head h2 { font-size: 13px; font-weight: 700; letter-spacing: -0.01em; }
|
|
||||||
.tray-head .count { font-size: 11px; font-weight: 600; color: var(--text-faint); background: var(--glass); border: 1px solid var(--glass-border); padding: 2px 8px; border-radius: 999px; }
|
|
||||||
.tray-head .chev { margin-left: auto; color: var(--text-faint); transition: transform 250ms var(--spring); }
|
|
||||||
.tray.closed .chev { transform: rotate(-90deg); }
|
|
||||||
.tray-body {
|
|
||||||
display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 8px;
|
|
||||||
background: rgba(0,0,0,0.12);
|
|
||||||
border-radius: 18px; padding: 12px;
|
|
||||||
}
|
|
||||||
[data-theme="light"] .tray-body { background: rgba(255,255,255,0.4); }
|
|
||||||
.tray.closed .tray-body { display: none; }
|
|
||||||
|
|
||||||
/* ---------- app tile (homescreen) ---------- */
|
|
||||||
.tile {
|
|
||||||
position: relative;
|
|
||||||
display: flex; flex-direction: column; align-items: center; gap: 10px;
|
|
||||||
padding: 18px 10px 14px;
|
|
||||||
border-radius: 16px;
|
|
||||||
border: 1px solid transparent;
|
|
||||||
cursor: grab; text-align: center;
|
|
||||||
transition: background 250ms var(--spring), border-color 250ms var(--spring), transform 250ms var(--spring);
|
|
||||||
}
|
|
||||||
.tile:hover { background: var(--glass); border-color: var(--glass-border); transform: translateY(-3px); }
|
|
||||||
.tile:active { transform: scale(0.96); }
|
|
||||||
.tile.dragging { opacity: 0.35; }
|
|
||||||
|
|
||||||
.icon {
|
|
||||||
position: relative;
|
|
||||||
width: 56px; height: 56px; border-radius: 16px;
|
|
||||||
background: var(--icon-bg); border: 1px solid var(--glass-border);
|
|
||||||
box-shadow: var(--inner-hi), 0 6px 18px rgba(0,0,0,0.18);
|
|
||||||
display: flex; align-items: center; justify-content: center;
|
|
||||||
font-size: 20px; font-weight: 800; color: var(--text-dim);
|
|
||||||
overflow: hidden;
|
|
||||||
transition: transform 250ms var(--spring);
|
|
||||||
}
|
|
||||||
.tile:hover .icon { transform: scale(1.06); }
|
|
||||||
.icon::before { content: attr(data-letter); }
|
|
||||||
.icon img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 8px; background: var(--icon-bg); }
|
|
||||||
|
|
||||||
.tile .name { font-size: 12.5px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
|
|
||||||
.tile .meta { display: flex; align-items: center; gap: 6px; margin-top: -4px; }
|
|
||||||
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--up); box-shadow: 0 0 8px var(--up); }
|
|
||||||
.dot.down { background: var(--down); box-shadow: 0 0 8px var(--down); }
|
|
||||||
.multi { font-size: 9.5px; font-weight: 700; color: var(--text-faint); background: var(--glass); border: 1px solid var(--glass-border); border-radius: 999px; padding: 1px 6px; }
|
|
||||||
|
|
||||||
/* ---------- widget strip ---------- */
|
|
||||||
.wstrip { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
|
|
||||||
.widget {
|
|
||||||
padding: 18px 20px; border-radius: 20px;
|
|
||||||
background: var(--glass); border: 1px solid var(--glass-border);
|
|
||||||
box-shadow: var(--inner-hi);
|
|
||||||
}
|
|
||||||
.wlabel { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; color: var(--text-faint); display: flex; align-items: center; gap: 7px; }
|
|
||||||
.wlabel img { width: 14px; height: 14px; }
|
|
||||||
.stat { font-size: 26px; font-weight: 800; letter-spacing: -0.03em; margin-top: 10px; font-variant-numeric: tabular-nums; }
|
|
||||||
.stat-sub { font-size: 11.5px; color: var(--text-faint); margin-top: 3px; font-weight: 500; }
|
|
||||||
|
|
||||||
/* ---------- url popover ---------- */
|
|
||||||
.urlpop {
|
|
||||||
position: absolute; top: calc(100% + 8px); left: 50%; z-index: 20;
|
|
||||||
transform: translateX(-50%) translateY(-4px) scale(0.97);
|
|
||||||
min-width: 220px; padding: 6px;
|
|
||||||
background: var(--popover);
|
|
||||||
backdrop-filter: blur(28px) saturate(1.5);
|
|
||||||
-webkit-backdrop-filter: blur(28px) saturate(1.5);
|
|
||||||
border: 1px solid var(--glass-border-hi);
|
|
||||||
border-radius: 16px;
|
|
||||||
box-shadow: var(--inner-hi), 0 16px 50px rgba(0,0,0,0.4);
|
|
||||||
opacity: 0; pointer-events: none;
|
|
||||||
transition: opacity 200ms var(--spring), transform 200ms var(--spring);
|
|
||||||
}
|
|
||||||
.tile.open .urlpop { opacity: 1; transform: translateX(-50%); pointer-events: auto; }
|
|
||||||
.urlpop a {
|
|
||||||
display: flex; align-items: center; gap: 10px;
|
|
||||||
padding: 9px 11px; border-radius: 10px;
|
|
||||||
color: var(--text); text-decoration: none; font-size: 13px; font-weight: 600;
|
|
||||||
}
|
|
||||||
.urlpop a:hover { background: var(--glass); }
|
|
||||||
.urlpop .tag {
|
|
||||||
flex: none; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.09em;
|
|
||||||
padding: 3px 7px; border-radius: 999px;
|
|
||||||
background: var(--glass); border: 1px solid var(--glass-border); color: var(--text-dim);
|
|
||||||
}
|
|
||||||
.urlpop .u { font-size: 11px; color: var(--text-faint); margin-left: auto; }
|
|
||||||
|
|
||||||
.edit-hint { color: var(--text-faint); font-size: 12px; text-align: center; margin-top: 30px; }
|
|
||||||
|
|
||||||
@media (max-width: 720px) {
|
|
||||||
.topbar { margin: 10px 12px 0; padding: 8px 12px; }
|
|
||||||
.search { display: none; }
|
|
||||||
main { padding: 26px 14px 80px; }
|
|
||||||
.hero { padding: 26px 22px; } .hero .clock { font-size: 42px; }
|
|
||||||
.hero .zones { margin-left: 0; }
|
|
||||||
.tray-body { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
|
|
||||||
.icon { width: 48px; height: 48px; }
|
|
||||||
}
|
|
||||||
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
|
|
||||||
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; border-radius: 8px; }
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div class="wall"></div>
|
|
||||||
|
|
||||||
<header class="topbar">
|
|
||||||
<div class="brand">
|
|
||||||
<span class="mark"><svg width="13" height="13" viewBox="0 0 18 18" fill="none"><rect x="1" y="1" width="7" height="7" rx="2" fill="currentColor"/><rect x="10" y="1" width="7" height="7" rx="2" fill="currentColor" opacity=".5"/><rect x="1" y="10" width="7" height="7" rx="2" fill="currentColor" opacity=".5"/><rect x="10" y="10" width="7" height="7" rx="2" fill="currentColor"/></svg></span>
|
|
||||||
Dash
|
|
||||||
</div>
|
|
||||||
<div class="search">
|
|
||||||
<svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="11" cy="11" r="7"/><path d="m20 20-3.5-3.5"/></svg>
|
|
||||||
Search services
|
|
||||||
</div>
|
|
||||||
<button class="pillbtn icon" id="theme" aria-label="Toggle theme">
|
|
||||||
<svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8"><path d="M21 12.8A9 9 0 1 1 11.2 3 7 7 0 0 0 21 12.8Z"/></svg>
|
|
||||||
</button>
|
|
||||||
<button class="pillbtn primary">
|
|
||||||
<svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.4"><path d="M12 5v14M5 12h14"/></svg>
|
|
||||||
Add service
|
|
||||||
</button>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<main>
|
|
||||||
<div class="hero">
|
|
||||||
<div>
|
|
||||||
<div class="greet" id="greet">Good evening</div>
|
|
||||||
<div class="clock" id="clock">--:--</div>
|
|
||||||
<div class="date" id="date"></div>
|
|
||||||
</div>
|
|
||||||
<div class="zones">
|
|
||||||
<div class="zone"><div class="zname">Prague</div><div class="ztime" id="tz1">--:--</div></div>
|
|
||||||
<div class="zone"><div class="zname">New York</div><div class="ztime" id="tz2">--:--</div></div>
|
|
||||||
<div class="zone"><div class="zname">Tokyo</div><div class="ztime" id="tz3">--:--</div></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="tray" style="margin-bottom:26px">
|
|
||||||
<div class="tray-head"><h2>Widgets</h2><span class="count">4</span>
|
|
||||||
<svg class="chev" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="m6 9 6 6 6-6"/></svg>
|
|
||||||
</div>
|
|
||||||
<div class="tray-body" style="display:block">
|
|
||||||
<div class="wstrip">
|
|
||||||
<div class="widget">
|
|
||||||
<div class="wlabel"><img src="https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/pi-hole.png" alt="" onerror="this.remove()">Pi-hole</div>
|
|
||||||
<div class="stat">24.6%</div>
|
|
||||||
<div class="stat-sub">ads blocked today · 84,213 queries</div>
|
|
||||||
</div>
|
|
||||||
<div class="widget">
|
|
||||||
<div class="wlabel"><img src="https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/adguard-home.png" alt="" onerror="this.remove()">AdGuard Home</div>
|
|
||||||
<div class="stat">11.2%</div>
|
|
||||||
<div class="stat-sub">blocked · 31 clients online</div>
|
|
||||||
</div>
|
|
||||||
<div class="widget">
|
|
||||||
<div class="wlabel"><img src="https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/immich.png" alt="" onerror="this.remove()">Immich</div>
|
|
||||||
<div class="stat">12,483</div>
|
|
||||||
<div class="stat-sub">photos · 96.4 GB library</div>
|
|
||||||
</div>
|
|
||||||
<div class="widget">
|
|
||||||
<div class="wlabel"><img src="https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/truenas.png" alt="" onerror="this.remove()">Storage</div>
|
|
||||||
<div class="stat">61%</div>
|
|
||||||
<div class="stat-sub">14.2 of 23.2 TB used</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="tray">
|
|
||||||
<div class="tray-head"><h2>Network</h2><span class="count">4</span>
|
|
||||||
<svg class="chev" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="m6 9 6 6 6-6"/></svg>
|
|
||||||
</div>
|
|
||||||
<div class="tray-body">
|
|
||||||
<div class="tile" draggable="true" data-urls='[{"tag":"Local","u":"http://10.0.0.2/admin"},{"tag":"External","u":"https://pihole.tdvorak.dev"}]'>
|
|
||||||
<div class="icon" data-letter="P"><img src="https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/pi-hole.png" alt="" onerror="this.remove()"></div>
|
|
||||||
<div class="name">Pi-hole</div>
|
|
||||||
<div class="meta"><span class="dot"></span><span class="multi">2 URLs</span></div>
|
|
||||||
<div class="urlpop"></div>
|
|
||||||
</div>
|
|
||||||
<div class="tile" draggable="true" data-urls='[{"tag":"Local","u":"http://10.0.0.3:3000"}]'>
|
|
||||||
<div class="icon" data-letter="A"><img src="https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/adguard-home.png" alt="" onerror="this.remove()"></div>
|
|
||||||
<div class="name">AdGuard Home</div>
|
|
||||||
<div class="meta"><span class="dot"></span></div>
|
|
||||||
</div>
|
|
||||||
<div class="tile" draggable="true" data-urls='[{"tag":"Local","u":"http://10.0.0.2:81"},{"tag":"External","u":"https://npm.tdvorak.dev"}]'>
|
|
||||||
<div class="icon" data-letter="N"><img src="https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/nginx-proxy-manager.png" alt="" onerror="this.remove()"></div>
|
|
||||||
<div class="name">Nginx Proxy Mgr</div>
|
|
||||||
<div class="meta"><span class="dot"></span><span class="multi">2 URLs</span></div>
|
|
||||||
<div class="urlpop"></div>
|
|
||||||
</div>
|
|
||||||
<div class="tile" draggable="true" data-urls='[{"tag":"Local","u":"http://10.0.0.5:3001"},{"tag":"External","u":"https://status.tdvorak.dev"}]'>
|
|
||||||
<div class="icon" data-letter="U"><img src="https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/uptime-kuma.png" alt="" onerror="this.remove()"></div>
|
|
||||||
<div class="name">Uptime Kuma</div>
|
|
||||||
<div class="meta"><span class="dot"></span><span class="multi">2 URLs</span></div>
|
|
||||||
<div class="urlpop"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="tray">
|
|
||||||
<div class="tray-head"><h2>Media</h2><span class="count">6</span>
|
|
||||||
<svg class="chev" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="m6 9 6 6 6-6"/></svg>
|
|
||||||
</div>
|
|
||||||
<div class="tray-body">
|
|
||||||
<div class="tile" draggable="true" data-urls='[{"tag":"Local","u":"http://10.0.0.10:8096"},{"tag":"External","u":"https://watch.tdvorak.dev"}]'>
|
|
||||||
<div class="icon" data-letter="J"><img src="https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/jellyfin.png" alt="" onerror="this.remove()"></div>
|
|
||||||
<div class="name">Jellyfin</div>
|
|
||||||
<div class="meta"><span class="dot"></span><span class="multi">2 URLs</span></div>
|
|
||||||
<div class="urlpop"></div>
|
|
||||||
</div>
|
|
||||||
<div class="tile" draggable="true" data-urls='[{"tag":"Local","u":"http://10.0.0.10:2283"},{"tag":"External","u":"https://photos.tdvorak.dev"}]'>
|
|
||||||
<div class="icon" data-letter="I"><img src="https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/immich.png" alt="" onerror="this.remove()"></div>
|
|
||||||
<div class="name">Immich</div>
|
|
||||||
<div class="meta"><span class="dot"></span><span class="multi">2 URLs</span></div>
|
|
||||||
<div class="urlpop"></div>
|
|
||||||
</div>
|
|
||||||
<div class="tile" draggable="true" data-urls='[{"tag":"Local","u":"http://10.0.0.10:4533"}]'>
|
|
||||||
<div class="icon" data-letter="N"><img src="https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/navidrome.png" alt="" onerror="this.remove()"></div>
|
|
||||||
<div class="name">Navidrome</div>
|
|
||||||
<div class="meta"><span class="dot"></span></div>
|
|
||||||
</div>
|
|
||||||
<div class="tile" draggable="true" data-urls='[{"tag":"Local","u":"http://10.0.0.10:8080"}]'>
|
|
||||||
<div class="icon" data-letter="q"><img src="https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/qbittorrent.png" alt="" onerror="this.remove()"></div>
|
|
||||||
<div class="name">qBittorrent</div>
|
|
||||||
<div class="meta"><span class="dot"></span></div>
|
|
||||||
</div>
|
|
||||||
<div class="tile" draggable="true" data-urls='[{"tag":"Local","u":"http://10.0.0.10:8989"}]'>
|
|
||||||
<div class="icon" data-letter="S"><img src="https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/sonarr.png" alt="" onerror="this.remove()"></div>
|
|
||||||
<div class="name">Sonarr</div>
|
|
||||||
<div class="meta"><span class="dot"></span></div>
|
|
||||||
</div>
|
|
||||||
<div class="tile" draggable="true" data-urls='[{"tag":"Local","u":"http://10.0.0.10:7878"}]'>
|
|
||||||
<div class="icon" data-letter="R"><img src="https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/radarr.png" alt="" onerror="this.remove()"></div>
|
|
||||||
<div class="name">Radarr</div>
|
|
||||||
<div class="meta"><span class="dot down"></span></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="tray">
|
|
||||||
<div class="tray-head"><h2>Infrastructure</h2><span class="count">7</span>
|
|
||||||
<svg class="chev" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="m6 9 6 6 6-6"/></svg>
|
|
||||||
</div>
|
|
||||||
<div class="tray-body">
|
|
||||||
<div class="tile" draggable="true" data-urls='[{"tag":"Local","u":"https://10.0.0.4:8006"}]'>
|
|
||||||
<div class="icon" data-letter="P"><img src="https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/proxmox.png" alt="" onerror="this.remove()"></div>
|
|
||||||
<div class="name">Proxmox</div>
|
|
||||||
<div class="meta"><span class="dot"></span></div>
|
|
||||||
</div>
|
|
||||||
<div class="tile" draggable="true" data-urls='[{"tag":"Local","u":"http://10.0.0.4:9000"}]'>
|
|
||||||
<div class="icon" data-letter="P"><img src="https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/portainer.png" alt="" onerror="this.remove()"></div>
|
|
||||||
<div class="name">Portainer</div>
|
|
||||||
<div class="meta"><span class="dot"></span></div>
|
|
||||||
</div>
|
|
||||||
<div class="tile" draggable="true" data-urls='[{"tag":"Local","u":"http://10.0.0.6"},{"tag":"External","u":"https://nas.tdvorak.dev"}]'>
|
|
||||||
<div class="icon" data-letter="T"><img src="https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/truenas.png" alt="" onerror="this.remove()"></div>
|
|
||||||
<div class="name">TrueNAS</div>
|
|
||||||
<div class="meta"><span class="dot"></span><span class="multi">2 URLs</span></div>
|
|
||||||
<div class="urlpop"></div>
|
|
||||||
</div>
|
|
||||||
<div class="tile" draggable="true" data-urls='[{"tag":"Local","u":"http://10.0.0.4:3100"}]'>
|
|
||||||
<div class="icon" data-letter="G"><img src="https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/grafana.png" alt="" onerror="this.remove()"></div>
|
|
||||||
<div class="name">Grafana</div>
|
|
||||||
<div class="meta"><span class="dot"></span></div>
|
|
||||||
</div>
|
|
||||||
<div class="tile" draggable="true" data-urls='[{"tag":"External","u":"https://vault.tdvorak.dev"}]'>
|
|
||||||
<div class="icon" data-letter="V"><img src="https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/vaultwarden.png" alt="" onerror="this.remove()"></div>
|
|
||||||
<div class="name">Vaultwarden</div>
|
|
||||||
<div class="meta"><span class="dot"></span></div>
|
|
||||||
</div>
|
|
||||||
<div class="tile" draggable="true" data-urls='[{"tag":"Local","u":"http://10.0.0.7:8123"},{"tag":"External","u":"https://home.tdvorak.dev"}]'>
|
|
||||||
<div class="icon" data-letter="H"><img src="https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/home-assistant.png" alt="" onerror="this.remove()"></div>
|
|
||||||
<div class="name">Home Assistant</div>
|
|
||||||
<div class="meta"><span class="dot"></span><span class="multi">2 URLs</span></div>
|
|
||||||
<div class="urlpop"></div>
|
|
||||||
</div>
|
|
||||||
<div class="tile" draggable="true" data-urls='[{"tag":"External","u":"https://cloud.tdvorak.dev"}]'>
|
|
||||||
<div class="icon" data-letter="N"><img src="https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/nextcloud.png" alt="" onerror="this.remove()"></div>
|
|
||||||
<div class="name">Nextcloud</div>
|
|
||||||
<div class="meta"><span class="dot"></span></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p class="edit-hint">Mockup C — Casa Glass. Wallpaper + glass trays + homescreen tiles. Click a “2 URLs” tile for the chooser. Trays collapse.</p>
|
|
||||||
</main>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
document.getElementById('theme').onclick = () => {
|
|
||||||
const h = document.documentElement;
|
|
||||||
h.dataset.theme = h.dataset.theme === 'dark' ? 'light' : 'dark';
|
|
||||||
};
|
|
||||||
|
|
||||||
const fmt = (tz) => new Intl.DateTimeFormat('en-GB', { hour: '2-digit', minute: '2-digit', timeZone: tz });
|
|
||||||
function tick() {
|
|
||||||
const n = new Date();
|
|
||||||
document.getElementById('clock').textContent = fmt().format(n);
|
|
||||||
document.getElementById('tz1').textContent = fmt('Europe/Prague').format(n);
|
|
||||||
document.getElementById('tz2').textContent = fmt('America/New_York').format(n);
|
|
||||||
document.getElementById('tz3').textContent = fmt('Asia/Tokyo').format(n);
|
|
||||||
document.getElementById('date').textContent = n.toLocaleDateString('en-GB', { weekday: 'long', day: 'numeric', month: 'long', year: 'numeric' });
|
|
||||||
const h = n.getHours();
|
|
||||||
document.getElementById('greet').textContent = h < 5 ? 'Good night' : h < 12 ? 'Good morning' : h < 18 ? 'Good afternoon' : 'Good evening';
|
|
||||||
}
|
|
||||||
tick(); setInterval(tick, 10000);
|
|
||||||
|
|
||||||
document.querySelectorAll('.tray-head').forEach(h =>
|
|
||||||
h.addEventListener('click', () => h.parentElement.classList.toggle('closed')));
|
|
||||||
|
|
||||||
document.querySelectorAll('.tile[data-urls]').forEach(card => {
|
|
||||||
const urls = JSON.parse(card.dataset.urls);
|
|
||||||
if (urls.length < 2) return;
|
|
||||||
const pop = card.querySelector('.urlpop');
|
|
||||||
pop.innerHTML = urls.map(x => `<a href="#" onclick="return false"><span class="tag">${x.tag}</span>${new URL(x.u).hostname}<span class="u">↗</span></a>`).join('');
|
|
||||||
card.addEventListener('click', e => {
|
|
||||||
if (card.classList.contains('dragging')) return;
|
|
||||||
document.querySelectorAll('.tile.open').forEach(c => c !== card && c.classList.remove('open'));
|
|
||||||
card.classList.toggle('open');
|
|
||||||
e.stopPropagation();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
document.addEventListener('click', () => document.querySelectorAll('.tile.open').forEach(c => c.classList.remove('open')));
|
|
||||||
|
|
||||||
let dragEl = null;
|
|
||||||
document.querySelectorAll('.tile').forEach(card => {
|
|
||||||
card.addEventListener('dragstart', () => { dragEl = card; setTimeout(() => card.classList.add('dragging')); });
|
|
||||||
card.addEventListener('dragend', () => card.classList.remove('dragging'));
|
|
||||||
card.addEventListener('dragover', e => {
|
|
||||||
e.preventDefault();
|
|
||||||
if (card === dragEl) return;
|
|
||||||
const r = card.getBoundingClientRect();
|
|
||||||
const before = e.clientX < r.left + r.width / 2;
|
|
||||||
card.parentElement.insertBefore(dragEl, before ? card : card.nextSibling);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
document.querySelectorAll('.tray-body').forEach(b => b.addEventListener('dragover', e => {
|
|
||||||
e.preventDefault();
|
|
||||||
if (dragEl && e.target === b) b.appendChild(dragEl);
|
|
||||||
}));
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
Reference in new issue
Block a user