mirror of
http://nostr-git-proxy.forgejo.svc.cluster.local/git/45387ca441053e230b2126802005eb03767ab59d84555e8bac86b6e7def14e27/bestdadjokes
synced 2026-11-03 07:26:59 +00:00
feat: wrap category bar into two rows instead of horizontal scroll
- 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
This commit is contained in:
parent
0c6528dd19
commit
55798e102a
2 changed files with 4 additions and 6 deletions
6
build.py
6
build.py
|
|
@ -82,9 +82,7 @@ def joke_card(j, reveal=False):
|
|||
def layout(title, desc, body, path='/', extra_head=''):
|
||||
nav_cats = ''.join(
|
||||
'<a href="/category/%s/">%s %s</a>' % (c['slug'], c['emoji'], esc(c['name']))
|
||||
for c in CATS[:7])
|
||||
rest = ''.join('<a href="/category/%s/">%s %s</a>' % (c['slug'], c['emoji'], esc(c['name']))
|
||||
for c in CATS[7:])
|
||||
for c in CATS)
|
||||
foot_cats = ''.join('<a href="/category/%s/">%s</a>' % (c['slug'], esc(c['name'])) for c in CATS)
|
||||
return f"""<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
|
@ -121,7 +119,7 @@ def layout(title, desc, body, path='/', extra_head=''):
|
|||
</nav>
|
||||
</div>
|
||||
<div class="wrap catbar">
|
||||
{nav_cats}<a href="#all-cats">more →</a>
|
||||
{nav_cats}
|
||||
</div>
|
||||
</header>
|
||||
<main>
|
||||
|
|
|
|||
|
|
@ -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; }
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue