Fix Post rendering, thanks andy
This commit is contained in:
parent
99567b586b
commit
b663980b4b
|
@ -23,13 +23,14 @@ instance FromRow Post where
|
||||||
fromRow = Post <$> field <*> field <*> field <*> field <*> field <*> field
|
fromRow = Post <$> field <*> field <*> field <*> field <*> field <*> field
|
||||||
|
|
||||||
render :: Post -> H.Html
|
render :: Post -> H.Html
|
||||||
render post = do
|
render post =
|
||||||
|
let state = case readTextile def (unpack $ body post) of
|
||||||
|
Right v -> v
|
||||||
|
Left err -> error (show err)
|
||||||
|
|
||||||
|
in do
|
||||||
H.div ! A.class_ "card blue-grey darken-1" $ do
|
H.div ! A.class_ "card blue-grey darken-1" $ do
|
||||||
H.div ! A.class_ "card-content white-text" $ do
|
H.div ! A.class_ "card-content white-text" $ do
|
||||||
H.span ! A.class_ "card-title" $ H.toHtml $ unpack (author post)
|
H.span ! A.class_ "card-title" $ H.toHtml $ unpack (author post)
|
||||||
|
|
||||||
state <- case readTextile def (unpack $ body post) of
|
|
||||||
Right v -> return v
|
|
||||||
Left err -> error (show err)
|
|
||||||
|
|
||||||
H.p $ writeHtml def state
|
H.p $ writeHtml def state
|
||||||
|
|
Loading…
Reference in New Issue