fixes for multi-update stuff
This commit is contained in:
parent
f51ea184bb
commit
1b839fcc21
1 changed files with 4 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue