Put the <link>s for PGP keys into the page header instead of the h-card itself, since it's invalid HTML to have <link> in the body
This commit is contained in:
parent
9d0d6ba249
commit
44288b419c
2 changed files with 6 additions and 2 deletions
|
@ -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
|
||||
<link rel="pgpkey" type="application/pgp-keys" href=@{routeFromPgp key}>
|
||||
|]
|
||||
$(widgetFile "mf2/h-card")
|
||||
|
|
|
@ -7,10 +7,9 @@
|
|||
<div .card-body>
|
||||
<h4 .card-title.p-name>#{userFullName user}
|
||||
$forall key <- pgpKeys
|
||||
<a .card-subtitle.u-key href=@{routeFromPgp key}>
|
||||
<a .card-subtitle.u-key type="application/pgp-keys" href=@{routeFromPgp key}>
|
||||
<i .fa.fa-key>
|
||||
#{prettyPgp key}
|
||||
<link rel="pgpkey" type="application/pgp-keys" href=@{routeFromPgp key}>
|
||||
<p .card-text.p-note .text-muted>#{userNote user}
|
||||
|
||||
<ul .profiles>
|
||||
|
|
Loading…
Reference in a new issue