From 5abd44c56ca5b1900a6b2620f025269d97b72884 Mon Sep 17 00:00:00 2001 From: Henrik Klee Date: Thu, 3 Dec 2026 05:01:54 +0800 Subject: [PATCH 01/11] Microphone and camera in every device list; two lines where a row doesn't fit The device check, the /devices table, the share cards and the device descriptions show microphone and camera from the catalog. On narrow phones a row puts the features on a line under the name; /devices does the same below 1400 px instead of overflowing. Fixes the phone rows starting 12 px left of their divider. --- src/components/DeviceCheck.astro | 10 +++++++--- src/lib/catalog.ts | 2 ++ src/lib/og.ts | 11 +++++------ src/pages/devices/index.astro | 13 ++++++++++--- 4 files changed, 24 insertions(+), 12 deletions(-) diff --git a/src/components/DeviceCheck.astro b/src/components/DeviceCheck.astro index 073603d..775fb7d 100644 --- a/src/components/DeviceCheck.astro +++ b/src/components/DeviceCheck.astro @@ -71,7 +71,7 @@ const families = ['iPad', 'iPhone', 'iPod touch'].map((f) => [f, shown.filter((d .key li { display: flex; align-items: center; gap: 8px; } .key i { width: 10px; height: 10px; } .key .on { background: var(--blue); } .key .maybe { background: var(--maybe); } .key .off { background: var(--off); } - /* Two columns read top to bottom, then the next: the sorted order stays in reading order. */ + /* Two columns, filled row by row in the sorted order. */ .rows { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: 32px; border-top: 1px solid var(--border); } .rows li { border-bottom: 1px solid var(--border); } .rows li[hidden] { display: none; } @@ -92,17 +92,21 @@ const families = ['iPad', 'iPhone', 'iPod touch'].map((f) => [f, shown.filter((d [aria-expanded='true'] .done { visibility: visible; } .more :global(.chev) { transition: transform .15s; } [aria-expanded='true'] :global(.chev) { transform: rotate(180deg); } - @media (max-width: 1100px) { .rows { grid-template-columns: 1fr; } } + @media (max-width: 1240px) { .rows { grid-template-columns: 1fr; } } @media (max-width: 900px) { .check-head { flex-direction: column; gap: 20px; margin-bottom: 20px; } .search-col { width: 100%; } .controls { margin-bottom: 20px; } .legend { display: none; } .rows { grid-template-columns: 1fr; } - .rows a { height: auto; padding: 12px 0; flex-wrap: wrap; row-gap: 8px; } + .rows a { height: auto; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; row-gap: 8px; } .name small { display: none; } .rows .feat { gap: 6px; } } + /* Narrow phones: the name on one line, the features on the next, under the name. */ + @media (max-width: 560px) { + .rows .feat { flex-basis: 100%; padding-left: 34px; justify-content: space-between; max-width: 400px; } + }