1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} module Card ( card ) where import Text.Blaze.Html5 as H import Text.Blaze.Html5.Attributes as A import Models card :: Item -> H.Html card item = H.html $ H.div ! A.class_ "item" $ do H.div $ do H.a ! A.class_ "item-link" ! A.href (H.toValue ("/item/" ++ show (Models.id item))) $ do H.img ! A.src "assets/keeb.jpg" ! A.class_ "card-photo" H.toHtml . Models.name $ item |