Files
location_managemet/app/static/css/style.css
ske087 90cbf4e1f0 Add Layouts module with Konva.js builder; smart offline polling; UI improvements
- Move board cards from dashboard to top of boards list page
- Fix Werkzeug duplicate polling (WERKZEUG_RUN_MAIN guard)
- Smart offline polling: fast loop for online boards, slow recheck for offline
- Add manual ping endpoint POST /api/boards/<id>/ping
- Add spin animation CSS for ping button

Layouts module (new):
- app/models/layout.py: Layout model (canvas_json, thumbnail_b64)
- app/routes/layouts.py: 5 routes (list, create, builder, save, delete)
- app/templates/layouts/: list and builder templates
- app/static/js/layout_builder.js: full Konva.js builder engine
- app/static/vendor/konva/: vendored Konva.js 9
- Structure mode: wall, room, door, window, fence, text shapes
- Devices mode: drag relay/input/Sonoff channels onto canvas
- Live view mode: click relays/Sonoff to toggle, socket.io state updates
- Device selection: click to select, remove individual device, Delete key
- Fix door/Arc size persistence across save/reload (outerRadius, scaleX/Y)
- Fix Sonoff devices missing from palette (add makeSonoffChip function)
2026-02-27 13:34:44 +02:00

94 lines
2.6 KiB
CSS

/* ── Layout ─────────────────────────────────────────────────────────────── */
#wrapper {
min-height: 100vh;
}
#sidebar {
width: 240px;
min-height: 100vh;
position: sticky;
top: 0;
max-height: 100vh;
overflow-y: auto;
}
#page-content {
min-height: 100vh;
background: var(--bs-body-bg);
}
/* ── Sidebar nav pills ──────────────────────────────────────────────────── */
#sidebar .nav-link {
border-radius: 0.5rem;
padding: 0.5rem 0.75rem;
font-size: 0.9rem;
transition: background 0.15s;
}
#sidebar .nav-link:hover:not(.active) {
background: rgba(255, 255, 255, 0.08);
}
#sidebar .nav-link.active {
background: var(--bs-primary);
color: #fff !important;
}
/* ── Cards ──────────────────────────────────────────────────────────────── */
.card {
background: var(--bs-dark);
}
.stat-card {
transition: transform 0.2s;
}
.stat-card:hover {
transform: translateY(-2px);
}
.board-card {
transition: box-shadow 0.2s;
}
.board-card:hover {
box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}
/* ── Spinner for ping button ────────────────────────────────────────────── */
@keyframes spin {
to { transform: rotate(360deg); }
}
.spin {
display: inline-block;
animation: spin 0.8s linear infinite;
}
/* ── Relay buttons ──────────────────────────────────────────────────────── */
.relay-btn {
min-width: 90px;
font-size: 0.8rem;
}
/* ── Login page ─────────────────────────────────────────────────────────── */
body:not(:has(#wrapper)) {
background: #0d1117;
}
/* ── Misc ───────────────────────────────────────────────────────────────── */
.font-monospace {
font-size: 0.85em;
}
.input-badge {
font-size: 0.78rem;
cursor: default;
}
@media (max-width: 768px) {
#sidebar {
width: 100%;
min-height: auto;
position: relative;
}
#wrapper {
flex-direction: column;
}
}