Add a u-uid to the h-card to ensure the h-card is considered representative
This commit is contained in:
parent
484609fb8b
commit
25a1e00cd7
3 changed files with 7 additions and 0 deletions
|
@ -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)] []
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
<div .card.h-card>
|
||||
$maybe route <- mcurrentRoute
|
||||
<a .u-uid.u-url rel="me" href=@{route}>
|
||||
|
||||
$maybe avatar <- maybeAvatar
|
||||
<img .card-img-top.u-photo src=#{avatar} alt="Avatar for #{userFullName user}">
|
||||
|
||||
<div .card-body>
|
||||
<h4 .card-title.p-name>#{userFullName user}
|
||||
$forall key <- pgpKeys
|
||||
|
|
Loading…
Reference in a new issue