Cap unknown media text size

https://chaosfem.tw/@betsystreeter@mastodon.art/111456606953658581
This commit is contained in:
blankie 2023-12-07 09:44:41 +11:00
parent 0d97483017
commit 9acae28193
Signed by: blankie
GPG Key ID: CC15FC822C7F61F5
2 changed files with 7 additions and 2 deletions

View File

@ -139,6 +139,11 @@ svg {
.post-attachments audio {
height: 40px;
}
/* https://chaosfem.tw/@betsystreeter@mastodon.art/111456606953658581 */
.post-attachments .unknown_media {
max-width: 320px;
max-height: 180px;
}
/* POLL */
.poll-option {

View File

@ -544,9 +544,9 @@ static inline Element serialize_media(const Media& media) {
} else if (media.type == "unknown") {
if (media.remote_url) {
// https://botsin.space/@lina@vt.social/111053598696451525
return Element("a", {{"href", *media.remote_url}}, {"Media is not available from this instance, view externally"});
return Element("a", {{"class", "unknown_media"}, {"href", *media.remote_url}}, {"Media is not available from this instance, view externally"});
} else {
return Element("p", {"Media is not available from this instance"});
return Element("p", {{"class", "unknown_media"}}, {"Media is not available from this instance"});
}
} else {
return Element("p", {"Unsupported media type: ", media.type});