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