Move user information into the left card

This commit is contained in:
Christine Dodrill 2015-07-29 18:55:58 -07:00
parent 9c78c6704e
commit e0d159eab4
2 changed files with 11 additions and 16 deletions

View File

@ -34,13 +34,4 @@ render post user =
H.div ! A.class_ "card-content white-text" $ do H.div ! A.class_ "card-content white-text" $ do
H.div ! A.class_ "row" $ do H.div ! A.class_ "row" $ do
H.div ! A.class_ "col s12 m3" $ User.render user H.div ! A.class_ "col s12 m3" $ User.render user
H.div ! A.class_ "col s12 m6" $ writeHtml def state H.div ! A.class_ "col s12 m9" $ writeHtml def state
H.div ! A.class_ "col s12 m3" $ do
H.div ! A.class_ "card blue-grey darken-5" $ do
H.div ! A.class_ "card-content info-card center" $ do
H.h5 $ "More information"
H.div ! A.class_ "card-action blue-text" $ do
H.a ! A.href (H.toValue ("/users/" ++ (unpack (User.oID user)))) $ "All their posts"
H.br
H.a ! A.href (H.toValue ("https://derpibooru.org/profiles/" ++ (unpack (User.oID user)))) $ "Derpibooru profile"
H.br

View File

@ -21,9 +21,13 @@ instance FromRow User where
render :: User -> H.Html render :: User -> H.Html
render user = do render user = do
H.div ! A.class_ "card-panel blue-grey darken-3" $ do H.div ! A.class_ "card blue-grey darken-3" $ do
H.div ! A.class_ "card-content white-text center user-card" $ do H.div ! A.class_ "card-content white-text center user-card" $ do
H.h5 $ H.toHtml $ unpack (name user) H.h5 $ H.toHtml $ unpack (name user)
H.br H.br
H.a ! A.href (H.toValue ("https://derpibooru.org/profiles/" ++ unpack (oID user))) $ do H.a ! A.href (H.toValue ("https://derpibooru.org/profiles/" ++ unpack (oID user))) $ do
H.img ! A.src (H.toValue $ unpack $ avatar user) ! A.width "125" H.img ! A.src (H.toValue $ unpack $ avatar user) ! A.width "125"
H.div ! A.class_ "card-action blue-text" $ do
H.a ! A.href (H.toValue ("/users/" ++ (unpack (oID user)))) $ "All their posts"
H.br
H.a ! A.href (H.toValue ("https://derpibooru.org/profiles/" ++ (unpack (oID user)))) $ "Derpibooru profile"