diff --git a/src/Widget/Hcard.hs b/src/Widget/Hcard.hs index 74b7ebe..cc907b7 100644 --- a/src/Widget/Hcard.hs +++ b/src/Widget/Hcard.hs @@ -28,6 +28,7 @@ routeFromPgp PgpKey { pgpKeyFingerprint = f, pgpKeyHash = h } = hcard :: Entity User -> Widget hcard (Entity userId user) = do maybeAvatar <- liftIO $ L.avatarUrl (L.Email $ userEmail user) def { L.optSecure = True, L.optSize = L.Size 512 } + mcurrentRoute <- getCurrentRoute userProfiles <- handlerToWidget . runDB $ do profiles <- map entityVal <$> selectList [ProfileUserId ==. userId] [] sites <- M.fromList . map entityToTuple <$> selectList [SiteId <-. (profileSiteId <$> profiles)] [] diff --git a/templates/hcard.cassius b/templates/hcard.cassius index 219aca0..c55dcc4 100644 --- a/templates/hcard.cassius +++ b/templates/hcard.cassius @@ -1,5 +1,7 @@ .card.h-card margin: 2em auto width: 22rem + .u-uid.u-url:first-child + display: none .card-link white-space: nowrap diff --git a/templates/hcard.hamlet b/templates/hcard.hamlet index 3d800ea..1189dca 100644 --- a/templates/hcard.hamlet +++ b/templates/hcard.hamlet @@ -1,6 +1,10 @@
+ $maybe route <- mcurrentRoute + + $maybe avatar <- maybeAvatar Avatar for #{userFullName user} +

#{userFullName user} $forall key <- pgpKeys