Fix Post rendering, thanks andy

This commit is contained in:
Christine Dodrill 2015-07-28 10:06:09 -07:00
parent 99567b586b
commit b663980b4b
1 changed files with 9 additions and 8 deletions

View File

@ -23,13 +23,14 @@ instance FromRow Post where
fromRow = Post <$> field <*> field <*> field <*> field <*> field <*> field
render :: Post -> H.Html
render post = do
H.div ! A.class_ "card blue-grey darken-1" $ do
H.div ! A.class_ "card-content white-text" $ do
H.span ! A.class_ "card-title" $ H.toHtml $ unpack (author post)
render post =
let state = case readTextile def (unpack $ body post) of
Right v -> v
Left err -> error (show err)
state <- case readTextile def (unpack $ body post) of
Right v -> return v
Left err -> error (show err)
in do
H.div ! A.class_ "card blue-grey darken-1" $ do
H.div ! A.class_ "card-content white-text" $ do
H.span ! A.class_ "card-title" $ H.toHtml $ unpack (author post)
H.p $ writeHtml def state
H.p $ writeHtml def state