Display acct as an inline block

This commit is contained in:
Ryan Fox 2022-01-18 22:11:07 -08:00
parent 6648fd840c
commit a5309d8cc7
Signed by: flewkey
GPG Key ID: 94F56ADFD848851E
3 changed files with 11 additions and 13 deletions

View File

@ -262,10 +262,15 @@ span.applink {
margin-left: 2px; margin-left: 2px;
} }
.display-name {
margin-right: 4px;
}
.acct { .acct {
font-size: 97%; font-size: 97%;
font-weight: normal; font-weight: normal;
color: #a0a0a0; color: #a0a0a0;
display: inline-block;
} }
.acct-instance-icon { .acct-instance-icon {

View File

@ -3,6 +3,7 @@ module View.Common
( accountAcctView ( accountAcctView
, accountAvatar , accountAvatar
, accountAvatarLink , accountAvatarLink
, accountDisplayName
, accountLink , accountLink
, accountLinkSmall , accountLinkSmall
, accountLinkLarge , accountLinkLarge
@ -56,7 +57,7 @@ accountLink external account =
[ href account.url [ href account.url
, href <| "#account/" ++ account.id , href <| "#account/" ++ account.id
] ]
[ text <| accountDisplayName <| account [ span [ class "display-name" ] [ text <| accountDisplayName <| account ]
, accountAcctView False account , accountAcctView False account
] ]
@ -74,11 +75,7 @@ accountLinkSmall external account =
[ href account.url [ href account.url
, accountHref , accountHref
] ]
[ text <| [ text <| accountDisplayName <| account
if account.display_name == "" then
account.username
else
account.display_name
] ]
@ -94,11 +91,7 @@ accountLinkLarge external account =
a a
[ href <| "#account/" ++ account.id [ href <| "#account/" ++ account.id
] ]
[ text <| [ text <| accountDisplayName <| account
if account.display_name == "" then
account.username
else
account.display_name
, br [] [] , br [] []
, accountAcctView True account , accountAcctView True account
] ]
@ -117,7 +110,7 @@ instanceIconsView url =
accountAcctView : Bool -> Account -> Html Msg accountAcctView : Bool -> Account -> Html Msg
accountAcctView showIcons account = accountAcctView showIcons account =
let let
acctText = text <| " @" ++ account.acct acctText = text <| "@" ++ account.acct
icons = icons =
if showIcons then if showIcons then
instanceIconsView <| account.url instanceIconsView <| account.url

View File

@ -328,7 +328,7 @@ statusView context ({ account, content, media_attachments, reblog, mentions, pin
, Common.accountAvatarLink False account , Common.accountAvatarLink False account
, div [ class "username" ] , div [ class "username" ]
[ a accountLinkAttributes [ a accountLinkAttributes
[ text (if account.display_name=="" then account.username else account.display_name) [ span [ class "display-name" ] [ text <| Common.accountDisplayName <| account ]
, Common.accountAcctView True account , Common.accountAcctView True account
] ]
] ]