Markdown notes and a phone-friendly layout

- Notes render GitHub-flavored Markdown (commonmarker, sanitized), with a
  Write/Preview editor; overview shows a plain-text excerpt
- Phone header collapses into a menu; aircraft sections use a dropdown
- Tables stack into labelled cards under 640px (opt out with .table-keep)
- Fix horizontal overflow on overview and logbook; bigger touch targets;
  16px inputs to stop iOS zoom

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rickyandClaude Opus 5.5 committed 2026-11-06 21:18:23 -05:00
1 parent 1c6c2f88c0
commit 230a569b77
19 files changed
+331 -15

No files matched your search

+63
View File
@@ -107,3 +107,66 @@
--color-blue-100: color-mix(in oklab, oklch(62.3% 0.214 259.815) 22%, transparent);
--color-blue-700: oklch(80.9% 0.105 251.813);
}
/* Rendered Markdown (notes). Colors use the palette, so dark mode follows. */
@layer components {
.markdown { overflow-wrap: anywhere; }
.markdown > * + * { margin-top: 0.5em; }
.markdown h1, .markdown h2, .markdown h3, .markdown h4 { font-weight: 600; color: var(--color-slate-900); line-height: 1.3; }
.markdown h1 { font-size: 1.15rem; }
.markdown h2 { font-size: 1.05rem; }
.markdown h3, .markdown h4 { font-size: 1rem; }
.markdown a { color: var(--color-sky-700); text-decoration: underline; text-underline-offset: 2px; }
.markdown ul { list-style: disc; padding-left: 1.25rem; }
.markdown ol { list-style: decimal; padding-left: 1.25rem; }
.markdown li + li { margin-top: 0.15em; }
.markdown li:has(> input[type="checkbox"]) { list-style: none; margin-left: -1.25rem; }
.markdown input[type="checkbox"] { margin-right: 0.4em; vertical-align: -1px; }
.markdown blockquote { border-left: 3px solid var(--color-slate-300); padding-left: 0.75rem; color: var(--color-slate-600); }
.markdown code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.85em; background: var(--color-slate-100); border-radius: 0.25rem; padding: 0.1em 0.3em; }
.markdown pre { background: var(--color-slate-100); border-radius: 0.375rem; padding: 0.6rem 0.75rem; overflow-x: auto; }
.markdown pre code { background: none; padding: 0; }
.markdown hr { border-color: var(--color-slate-200); }
.markdown table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; font-size: 0.85em; }
.markdown th, .markdown td { border: 1px solid var(--color-slate-200); padding: 0.25rem 0.5rem; text-align: left; }
.markdown th { background: var(--color-slate-50); font-weight: 600; }
}
/* ---- Phones ---------------------------------------------------------- */
@layer base {
/* Grid columns may shrink below their content (a wide table scrolls inside
its card instead of widening the page). */
.grid > * { min-width: 0; }
}
/* Phones: each table row becomes a card; cells carry their column's name
(data-label, copied from the header by application.js). Tables that read
across columns (e.g. oil results by sample date) opt out with .table-keep. */
@media (max-width: 639px) {
.table:not(.table-keep) { display: block; min-width: 0; }
.table:not(.table-keep) thead { display: none; }
.table:not(.table-keep) tbody, .table:not(.table-keep) tfoot { display: block; }
.table:not(.table-keep) tr { display: block; padding: 0.625rem 1rem; border-bottom: 1px solid var(--color-slate-100); }
.table:not(.table-keep) td { display: block; padding: 0.125rem 0 !important; border: 0; text-align: left !important; white-space: normal !important; max-width: none !important; }
.table:not(.table-keep) td:empty { display: none; }
.table:not(.table-keep) td[data-label]:not([data-label=""])::before {
content: attr(data-label) " ";
margin-right: 0.35rem; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase;
color: var(--color-slate-500);
}
/* The first column names the row: show it as the card's title. */
.table:not(.table-keep) td:first-child { font-weight: 500; }
.table:not(.table-keep) td:first-child::before { content: none !important; }
/* Buttons-only cells (Edit / Resolve…) sit at the end of the card. */
.table:not(.table-keep) td[data-label=""]:not(:first-child) { padding-top: 0.375rem !important; }
.overflow-x-auto:has(> .table:not(.table-keep)) { overflow-x: visible; }
/* 16px text stops iOS zooming into fields on focus. */
.input, select.input, textarea.input { font-size: 16px; }
}
/* Touch screens: small buttons and tabs get a finger-sized target. */
@media (pointer: coarse) {
.btn-sm { padding: 0.4rem 0.75rem; font-size: 0.8125rem; }
.btn-primary, .btn-secondary, .btn-danger { min-height: 2.5rem; }
}