Update the Twitter User layout

This commit is contained in:
Maurice Parker 2020-08-13 11:27:21 -05:00
parent ad48042e42
commit 58f6a3e179
2 changed files with 10 additions and 4 deletions

View File

@ -30,14 +30,15 @@ struct TwitterUser: Codable {
if let avatarURL = avatarURL { if let avatarURL = avatarURL {
html += "<img class=\"twitterAvatar\" src=\"\(avatarURL)\">" html += "<img class=\"twitterAvatar\" src=\"\(avatarURL)\">"
} }
html += "<span class=\"twitterUsername\">" html += "<div class=\"twitterUsername\">"
if let name = name { if let name = name {
html += " \(name)" html += " \(name)"
} }
html += "<br><span class=\"twitterScreenName\">"
if let screenName = screenName { if let screenName = screenName {
html += " @\(screenName)" html += " @\(screenName)"
} }
html += "</span></a></div>" html += "</span></div></a></div>"
return html return html
} }

View File

@ -241,16 +241,21 @@ blockquote {
.twitterAvatar { .twitterAvatar {
vertical-align: middle; vertical-align: middle;
border-radius: 4px; border-radius: 4px;
height: 24px; height: 1.7em;
width: 24px; width: 1.7em;
} }
.twitterUsername { .twitterUsername {
line-height: 1.2;
margin-left: 4px; margin-left: 4px;
display: inline-block; display: inline-block;
vertical-align: middle; vertical-align: middle;
} }
.twitterScreenName {
font-size: 66%;
}
.twitterTimestamp { .twitterTimestamp {
font-size: 66%; font-size: 66%;
} }