fixes for multi-update stuff

This commit is contained in:
rhiannon morris 2022-11-12 12:13:02 +01:00
parent f51ea184bb
commit 1b839fcc21
1 changed files with 4 additions and 1 deletions

View File

@ -216,6 +216,8 @@ makeButtonBar title images =
Cat cats
| all ((<= 1) . length . snd) cats ->
makeButtonBar title $ Uncat $ flatten cats
| [(_, imgs)] <- cats ->
makeButtonBar title (Uncat imgs)
| otherwise ->
makeNav "cat" $ map (uncurry makeCat) cats
where
@ -291,7 +293,7 @@ extLink (Link {title, url}) = [b|@8
makeUpdates :: [(Date, [Update])] -> Builder
makeUpdates ups =
if null ups then "" else [b|@4
if all (null . snd) ups then "" else [b|@4
<section id=updates class=info-section>
<h2>updates</h2>
<dl>
@ -302,6 +304,7 @@ makeUpdates ups =
where updateList = map (uncurry makeUpdate) ups
makeUpdate :: Date -> [Update] -> Builder
makeUpdate _ [] = ""
makeUpdate date ups = [b|@8
<dt>$date'
<dd>$desc