[blog] Implement new and simpler design

This commit is contained in:
Vincent Ambo 2015-11-21 17:24:01 +01:00
parent cfea17dc0d
commit 9f33d98db5
No known key found for this signature in database
GPG key ID: 66F505681DB8F43B
5 changed files with 98 additions and 287 deletions

View file

@ -40,7 +40,6 @@ tazBlog acid resDir = do
adminHandler acid -- this checks auth
, method GET >> (ok $ toResponse adminLogin)
, method POST >> processLogin acid ]
, dirs "static/blogv40.css" $ serveBlogStyle
, dir "static" $ staticHandler resDir
, blogHandler acid EN
, notFound $ toResponse $ showError NotFound DE
@ -96,7 +95,7 @@ showIndex acid lang = do
entries <- query' acid (LatestEntries lang)
(page :: Maybe Int) <- optional $ lookRead "page"
ok $ toResponse $ blogTemplate lang "" $
renderEntries False (eDrop page entries) (topText lang) (Just $ showLinks page lang)
renderEntries False (eDrop page entries) (Just $ showLinks page lang)
where
eDrop :: Maybe Int -> [a] -> [a]
eDrop (Just i) = drop ((i-1) * 6)