diff --git a/routes/css.cpp b/routes/css.cpp index 35e7a90..b9038c5 100644 --- a/routes/css.cpp +++ b/routes/css.cpp @@ -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 { diff --git a/servehelper.cpp b/servehelper.cpp index 79fa956..3438686 100644 --- a/servehelper.cpp +++ b/servehelper.cpp @@ -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});