From 347d411940e79e425de066a8db9e203d87ec2de5 Mon Sep 17 00:00:00 2001 From: Test Date: Tue, 22 Sep 2026 23:46:06 +0000 Subject: [PATCH] feat: wrap category bar into two rows instead of horizontal scroll MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Change .catbar from overflow-x:auto to flex-wrap:wrap - Show all 14 categories instead of 7 + 'more →' - Remove flex:0 0 auto from pills to allow natural wrapping Closes: beb1824d530419b4dc71d6720a9a2c7821139c28280326d48e8073d4aa6b3184 --- build.py | 6 ++---- static/style.css | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/build.py b/build.py index ff5c365e..7957b420 100644 --- a/build.py +++ b/build.py @@ -82,9 +82,7 @@ def joke_card(j, reveal=False): def layout(title, desc, body, path='/', extra_head=''): nav_cats = ''.join( '%s %s' % (c['slug'], c['emoji'], esc(c['name'])) - for c in CATS[:7]) - rest = ''.join('%s %s' % (c['slug'], c['emoji'], esc(c['name'])) - for c in CATS[7:]) + for c in CATS) foot_cats = ''.join('%s' % (c['slug'], esc(c['name'])) for c in CATS) return f""" @@ -121,7 +119,7 @@ def layout(title, desc, body, path='/', extra_head=''):
- {nav_cats}more → + {nav_cats}
diff --git a/static/style.css b/static/style.css index 86ce4f30..9afbd164 100644 --- a/static/style.css +++ b/static/style.css @@ -38,8 +38,8 @@ p.page-sub { color: var(--ink-soft); font-size: 1.08rem; max-width: 46rem; margi .site-nav a { text-decoration: none; color: var(--ink); font-weight: 600; padding: 7px 12px; border-radius: 999px; } .site-nav a:hover { background: var(--cream); } .site-nav a.on { background: var(--ink); color: var(--cream); } -.catbar { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 12px; } -.catbar a { flex: 0 0 auto; text-decoration: none; color: var(--ink); font-weight: 600; font-size: .86rem; background: var(--cream); border: 1.5px solid var(--ink); border-radius: 999px; padding: 3px 11px; white-space: nowrap; } +.catbar { display: flex; gap: 8px; flex-wrap: wrap; padding-bottom: 12px; } +.catbar a { text-decoration: none; color: var(--ink); font-weight: 600; font-size: .86rem; background: var(--cream); border: 1.5px solid var(--ink); border-radius: 999px; padding: 3px 11px; white-space: nowrap; } .catbar a:hover { background: var(--brand2); } .navtoggle, .navburger { display: none; }