diff --git a/public/style.css b/public/style.css index 77dd572..456f3a5 100644 --- a/public/style.css +++ b/public/style.css @@ -262,10 +262,15 @@ span.applink { margin-left: 2px; } +.display-name { + margin-right: 4px; +} + .acct { font-size: 97%; font-weight: normal; color: #a0a0a0; + display: inline-block; } .acct-instance-icon { diff --git a/src/View/Common.elm b/src/View/Common.elm index f246c77..069565a 100644 --- a/src/View/Common.elm +++ b/src/View/Common.elm @@ -3,6 +3,7 @@ module View.Common ( accountAcctView , accountAvatar , accountAvatarLink + , accountDisplayName , accountLink , accountLinkSmall , accountLinkLarge @@ -56,7 +57,7 @@ accountLink external account = [ href account.url , href <| "#account/" ++ account.id ] - [ text <| accountDisplayName <| account + [ span [ class "display-name" ] [ text <| accountDisplayName <| account ] , accountAcctView False account ] @@ -74,11 +75,7 @@ accountLinkSmall external account = [ href account.url , accountHref ] - [ text <| - if account.display_name == "" then - account.username - else - account.display_name + [ text <| accountDisplayName <| account ] @@ -94,11 +91,7 @@ accountLinkLarge external account = a [ href <| "#account/" ++ account.id ] - [ text <| - if account.display_name == "" then - account.username - else - account.display_name + [ text <| accountDisplayName <| account , br [] [] , accountAcctView True account ] @@ -117,7 +110,7 @@ instanceIconsView url = accountAcctView : Bool -> Account -> Html Msg accountAcctView showIcons account = let - acctText = text <| " @" ++ account.acct + acctText = text <| "@" ++ account.acct icons = if showIcons then instanceIconsView <| account.url diff --git a/src/View/Status.elm b/src/View/Status.elm index 982a422..15f7839 100644 --- a/src/View/Status.elm +++ b/src/View/Status.elm @@ -328,7 +328,7 @@ statusView context ({ account, content, media_attachments, reblog, mentions, pin , Common.accountAvatarLink False account , div [ class "username" ] [ 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 ] ]