Initial implementation of Sahsa Clock
Pygame framebuffer clock for Le Potato (ARM Debian) with aiohttp webhook server. Renders 12-hour clock directly to /dev/fb0 (no X11/Wayland). Supports full-screen message overlays pushed via a browser dashboard or Bearer-token API. Includes first-run setup wizard, session-based dashboard auth, bcrypt password storage, per-IP rate limiting, and systemd service unit. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
206
dashboard/style.css
Normal file
206
dashboard/style.css
Normal file
@@ -0,0 +1,206 @@
|
||||
/* ── Reset & tokens ────────────────────────────────────────────────────────── */
|
||||
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
||||
|
||||
:root {
|
||||
--bg: #0f0f0f;
|
||||
--surface: #1a1a1a;
|
||||
--surface2: #242424;
|
||||
--border: #333;
|
||||
--text: #f0f0f0;
|
||||
--muted: #888;
|
||||
--primary: #2563eb;
|
||||
--primary-h: #1d4ed8;
|
||||
--secondary-h: #2f2f2f;
|
||||
--danger: #dc2626;
|
||||
--success: #16a34a;
|
||||
--radius: 10px;
|
||||
}
|
||||
|
||||
html { font-size: 16px; }
|
||||
|
||||
body {
|
||||
background: var(--bg);
|
||||
color: var(--text);
|
||||
font-family: system-ui, -apple-system, sans-serif;
|
||||
min-height: 100vh;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
/* ── Layout ────────────────────────────────────────────────────────────────── */
|
||||
.container {
|
||||
max-width: 640px;
|
||||
margin: 0 auto;
|
||||
padding: 1.25rem 1rem;
|
||||
}
|
||||
|
||||
/* ── Header ────────────────────────────────────────────────────────────────── */
|
||||
header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 1.5rem;
|
||||
padding-bottom: 1rem;
|
||||
border-bottom: 1px solid var(--border);
|
||||
}
|
||||
|
||||
h1 { font-size: 1.4rem; font-weight: 700; }
|
||||
|
||||
.btn-signout {
|
||||
background: none;
|
||||
border: 1px solid var(--border);
|
||||
color: var(--muted);
|
||||
padding: 0.4rem 0.9rem;
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
font-size: 0.9rem;
|
||||
transition: border-color 0.15s, color 0.15s;
|
||||
}
|
||||
.btn-signout:hover { border-color: #666; color: var(--text); }
|
||||
|
||||
/* ── Cards ─────────────────────────────────────────────────────────────────── */
|
||||
.card {
|
||||
background: var(--surface);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius);
|
||||
padding: 1.5rem;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 0.8rem;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.07em;
|
||||
text-transform: uppercase;
|
||||
color: var(--muted);
|
||||
margin-bottom: 1.25rem;
|
||||
}
|
||||
|
||||
/* ── Form fields ───────────────────────────────────────────────────────────── */
|
||||
.field { margin-bottom: 1.25rem; }
|
||||
|
||||
label {
|
||||
display: block;
|
||||
margin-bottom: 0.45rem;
|
||||
color: var(--muted);
|
||||
font-size: 0.9rem;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
textarea {
|
||||
width: 100%;
|
||||
background: var(--surface2);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 6px;
|
||||
color: var(--text);
|
||||
padding: 0.75rem;
|
||||
font-size: 1rem;
|
||||
font-family: inherit;
|
||||
resize: vertical;
|
||||
line-height: 1.5;
|
||||
transition: border-color 0.15s;
|
||||
}
|
||||
textarea:focus { outline: none; border-color: var(--primary); }
|
||||
|
||||
.char-count {
|
||||
text-align: right;
|
||||
color: var(--muted);
|
||||
font-size: 0.8rem;
|
||||
margin-top: 0.3rem;
|
||||
}
|
||||
|
||||
/* ── Duration picker ───────────────────────────────────────────────────────── */
|
||||
.duration-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
@media (min-width: 440px) {
|
||||
.duration-grid { grid-template-columns: repeat(4, 1fr); }
|
||||
}
|
||||
|
||||
.dur-option {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: var(--surface2);
|
||||
border: 2px solid var(--border);
|
||||
border-radius: 6px;
|
||||
padding: 0.65rem 0.25rem;
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
transition: border-color 0.15s, background 0.15s;
|
||||
text-align: center;
|
||||
}
|
||||
.dur-option input[type=radio] { display: none; }
|
||||
.dur-option span { font-size: 0.95rem; font-weight: 500; }
|
||||
.dur-option:hover { border-color: #555; }
|
||||
.dur-option:has(input:checked) {
|
||||
border-color: var(--primary);
|
||||
background: #1e2d4a;
|
||||
color: #93c5fd;
|
||||
}
|
||||
|
||||
/* ── Action buttons ────────────────────────────────────────────────────────── */
|
||||
.action-row {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 0.75rem;
|
||||
}
|
||||
|
||||
@media (max-width: 360px) {
|
||||
.action-row { grid-template-columns: 1fr; }
|
||||
}
|
||||
|
||||
.btn {
|
||||
padding: 0.9rem 1rem;
|
||||
border: none;
|
||||
border-radius: 8px;
|
||||
font-size: 1rem;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
width: 100%;
|
||||
transition: background 0.15s;
|
||||
/* Minimum touch target */
|
||||
min-height: 48px;
|
||||
}
|
||||
|
||||
.btn-primary { background: var(--primary); color: #fff; }
|
||||
.btn-primary:hover { background: var(--primary-h); }
|
||||
.btn-primary:disabled { background: #374151; color: #6b7280; cursor: not-allowed; }
|
||||
|
||||
.btn-secondary {
|
||||
background: var(--surface2);
|
||||
color: var(--text);
|
||||
border: 1px solid var(--border);
|
||||
}
|
||||
.btn-secondary:hover { background: var(--secondary-h); border-color: #555; }
|
||||
|
||||
/* ── Status bar ────────────────────────────────────────────────────────────── */
|
||||
.status-bar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.75rem;
|
||||
background: var(--surface);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius);
|
||||
padding: 1rem 1.25rem;
|
||||
}
|
||||
|
||||
.status-dot {
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
border-radius: 50%;
|
||||
flex-shrink: 0;
|
||||
background: var(--muted);
|
||||
transition: background 0.3s, box-shadow 0.3s;
|
||||
}
|
||||
.status-dot.active {
|
||||
background: var(--success);
|
||||
box-shadow: 0 0 7px var(--success);
|
||||
}
|
||||
|
||||
#status-text {
|
||||
font-size: 0.95rem;
|
||||
color: var(--muted);
|
||||
}
|
||||
Reference in New Issue
Block a user