summaryrefslogtreecommitdiff
path: root/html.c
diff options
context:
space:
mode:
authordefault <nobody@localhost>2023-07-11 20:16:44 +0200
committerdefault <nobody@localhost>2023-07-11 20:16:44 +0200
commit28a91ab7328939870046b2d0d77ece37dfd63b32 (patch)
treec0203179db12862a006c80ee5a3eeff4603f0862 /html.c
parenta18c71929868403af33fdaff2265a74e4c552c13 (diff)
Added new CSS classes snac-embedded-video and snac-embedded-audio.
Diffstat (limited to 'html.c')
-rw-r--r--html.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/html.c b/html.c
index ca72a34..f8201e3 100644
--- a/html.c
+++ b/html.c
@@ -1172,7 +1172,9 @@ xs_str *html_entry(snac *snac, xs_str *os, const xs_dict *msg, int local,
name = "No description";
xs *es1 = encode_html(name);
- xs *s1 = xs_fmt("<video style=\"max-width: 90vw; max-height: 70vh;\" controls src=\"%s\">Video: <a href=\"%s\">%s</a></video>\n", url, url, es1);
+ xs *s1 = xs_fmt("<video style=\"width: 100%\" class=\"snac-embedded-video\" "
+ "controls src=\"%s\">Video: "
+ "<a href=\"%s\">%s</a></video>\n", url, url, es1);
s = xs_str_cat(s, s1);
}
@@ -1187,7 +1189,9 @@ xs_str *html_entry(snac *snac, xs_str *os, const xs_dict *msg, int local,
name = "No description";
xs *es1 = encode_html(name);
- xs *s1 = xs_fmt("<audio style=\"max-width: 90vw\" controls src=\"%s\">Audio: <a href=\"%s\">%s</a></audio>\n", url, url, es1);
+ xs *s1 = xs_fmt("<audio style=\"width: 100%\" class=\"snac-embedded-audio\" "
+ "controls src=\"%s\">Audio: "
+ "<a href=\"%s\">%s</a></audio>\n", url, url, es1);
s = xs_str_cat(s, s1);
}