diff --git a/src/Widget/Card.hs b/src/Widget/Card.hs index 05d7844..fcb705b 100644 --- a/src/Widget/Card.hs +++ b/src/Widget/Card.hs @@ -1,5 +1,6 @@ {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE TemplateHaskell #-} module Widget.Card ( hCard ) where @@ -31,4 +32,8 @@ hCard (Entity userId user) = do E.orderBy [E.asc $ site ^. SiteName] return (site, profile) pgpKeys <- handlerToWidget . runDB $ map entityVal <$> selectList [PgpKeyUserId ==. userId] [] + toWidgetHead [hamlet| + $forall key <- pgpKeys + + |] $(widgetFile "mf2/h-card") diff --git a/templates/mf2/h-card.hamlet b/templates/mf2/h-card.hamlet index fa100ab..6447796 100644 --- a/templates/mf2/h-card.hamlet +++ b/templates/mf2/h-card.hamlet @@ -7,10 +7,9 @@

#{userFullName user} $forall key <- pgpKeys - + #{prettyPgp key} -

#{userNote user}