From 9b43e6e3377151152671b063a76a701381302c00 Mon Sep 17 00:00:00 2001 From: Vinta Chen Date: Wed, 21 Oct 2026 15:48:59 +0800 Subject: [PATCH] fix: collapse home hero category list into a disclosure on phones On phones the hero's 74-link category grid was 1,236px tall and pushed the project table down to 2,583px, over three screens. Co-Authored-By: Claude --- website/static/style.css | 27 ++++++++++++++++++++++++--- website/templates/index.html | 32 ++++++++++++++++++++------------ 2 files changed, 44 insertions(+), 15 deletions(-) diff --git a/website/static/style.css b/website/static/style.css index bc78a581..d612f1c7 100644 --- a/website/static/style.css +++ b/website/static/style.css @@ -353,12 +353,24 @@ kbd { } .hero-category-nav { + padding-top: 1.35rem; + border-top: 1px solid var(--hero-line); +} + +.hero-category-details { display: grid; grid-template-columns: minmax(10rem, 14rem) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; - padding-top: 1.35rem; - border-top: 1px solid var(--hero-line); +} + +.hero-category-meta { + display: block; + cursor: pointer; +} + +.hero-category-meta::-webkit-details-marker { + display: none; } .hero-category-meta h2 { @@ -368,6 +380,14 @@ kbd { letter-spacing: 0.04em; } +.hero-category-meta h2::after { + content: " ↓"; +} + +.hero-category-details[open] .hero-category-meta h2::after { + content: " ↑"; +} + .hero-category-links { list-style: none; display: grid; @@ -438,6 +458,7 @@ kbd { .hero-brand-mini:focus-visible, .hero-topbar-link:focus-visible, .hero-category-link:focus-visible, +.hero-category-meta:focus-visible, .search:focus-visible, .tag:focus-visible, .jump-link:focus-visible, @@ -1718,7 +1739,7 @@ th[data-sort].sort-asc::after { gap: 0.35rem; } - .hero-category-nav { + .hero-category-details { grid-template-columns: 1fr; gap: 0.95rem; } diff --git a/website/templates/index.html b/website/templates/index.html index 156d5aae..6020f35b 100644 --- a/website/templates/index.html +++ b/website/templates/index.html @@ -53,18 +53,26 @@