* added TODO file

This commit is contained in:
Vincent Ambo 2012-03-03 04:05:19 +01:00
parent 7114876693
commit 485e271475
3 changed files with 3 additions and 2 deletions

1
TODO Normal file
View file

@ -0,0 +1 @@
* create entirely new CouchDB views to return the blog IDs in descending order

View file

@ -77,7 +77,7 @@ renderEntries entries topText = H.div ! A.class_ "innerBox" $ do
H.div ! A.class_ "innerBoxTop" $ toHtml topText H.div ! A.class_ "innerBoxTop" $ toHtml topText
H.div ! A.class_ "innerBoxMiddle" $ do H.div ! A.class_ "innerBoxMiddle" $ do
H.ul $ H.ul $
sequence_ $ reverse $ map showEntry entries sequence_ . reverse $ map showEntry entries
where where
showEntry :: Entry -> Html showEntry :: Entry -> Html
showEntry e = H.li $ do showEntry e = H.li $ do

View file

@ -64,7 +64,7 @@ tryEntry (Just entry) = toResponse $ blogTemplate eLang eTitle $ renderEntry ent
showIndex :: BlogLang -> ServerPart Response showIndex :: BlogLang -> ServerPart Response
showIndex lang = do showIndex lang = do
entries <- getLatest lang [("limit", toJSON (6 :: Int)), ("descending", toJSON True)] entries <- getLatest lang [("limit", toJSON (7 :: Int)), ("descending", toJSON True)]
ok $ toResponse $ blogTemplate lang "" $ renderEntries entries (topText lang) ok $ toResponse $ blogTemplate lang "" $ renderEntries entries (topText lang)
showMonth :: Int -> Int -> BlogLang -> ServerPart Response showMonth :: Int -> Int -> BlogLang -> ServerPart Response