Add dark mode; align table headers with numeric columns

Dark mode:
- Theme toggle in the header (System → Light → Dark); "System" follows
  the OS setting and its changes. The choice is kept per browser and
  applied before first paint, so there's no light flash.
- Implemented by remapping the palette under :root[data-theme=dark]:
  grays flip, color tints become translucent, dark colored text becomes
  its light counterpart. Page, surface, header and accent colors are
  semantic tokens. Native controls follow via color-scheme.
- Chart text and grid colors follow the theme.
- Public share pages get the toggle too.
- Contrast checked against WCAG 4.5:1 (primary button text and error
  text adjusted for dark).

Tables:
- Shared table style no longer forces header text left, so right-aligned
  numeric headers line up with their columns everywhere.
- Flight log: units in headers, muted dashes for empty cells, GPS marker
  beside the route instead of its own column.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rickyandClaude Opus 5.5 committed 2026-11-05 19:53:11 -05:00
1 parent 5bf682502b
commit 86aadfcf6c
13 files changed
+216 -25

No files matched your search

+4 -3
View File
@@ -1,6 +1,7 @@
<!DOCTYPE html>
<html class="h-full bg-slate-100">
<html class="h-full bg-page">
<head>
<%= render "shared/theme_script" %>
<title><%= [content_for(:title), "Simple Aircraft Manager"].compact.join(" · ") %></title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="robots" content="noindex, nofollow">
@@ -11,8 +12,8 @@
<%= javascript_importmap_tags %>
</head>
<body class="min-h-full text-slate-800">
<header class="bg-slate-900 text-white">
<div class="mx-auto max-w-7xl px-4 py-3 font-semibold"><span class="text-xl">✈</span> Simple Aircraft Manager</div>
<header class="bg-header text-white">
<div class="mx-auto flex max-w-7xl items-center justify-between px-4 py-3"><span class="font-semibold"><span class="text-xl">✈</span> Simple Aircraft Manager</span><%= render "shared/theme_toggle" %></div>
</header>
<main class="mx-auto max-w-7xl px-4 py-6">
<%= render "shared/flash" %>