mirror of
https://github.com/rickbarrette/simple-aircraft-manager-rails.git
synced 2026-11-17 23:50:36 -05:00
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>
12 lines
937 B
ERB
12 lines
937 B
ERB
<%# Airport code input with autocomplete. locals: f, attribute, label, aircraft %>
|
|
<div class="relative" data-controller="airport-autocomplete"
|
|
data-airport-autocomplete-url-value="<%= airport_search_path(aircraft_id: aircraft.id) %>">
|
|
<%= f.label attribute, label, class: "label" %>
|
|
<%= f.text_field attribute, class: "input font-mono uppercase placeholder:normal-case placeholder:font-sans", placeholder: local_assigns[:placeholder], maxlength: 10,
|
|
data: { airport_autocomplete_target: "input",
|
|
action: "input->airport-autocomplete#search keydown->airport-autocomplete#keydown blur->airport-autocomplete#blur" } %>
|
|
<ul data-airport-autocomplete-target="list" role="listbox" hidden
|
|
class="absolute z-20 mt-1 max-h-72 w-[min(28rem,90vw)] overflow-auto rounded-md bg-surface py-1 shadow-lg ring-1 ring-slate-200"></ul>
|
|
<p class="hint min-h-4" data-airport-autocomplete-target="hint"></p>
|
|
</div>
|