diff options
| author | Xe Iaso <me@christine.website> | 2022-10-30 21:46:40 -0400 |
|---|---|---|
| committer | Xe Iaso <me@christine.website> | 2022-10-30 21:46:40 -0400 |
| commit | 9c28a6face3d3b70679ee666d6a416dc333a8324 (patch) | |
| tree | 872f3956fa770baf046b55667b6348d37a34d313 /lib/xesite_templates | |
| parent | 1c2737540172085900f7e68c772a60f7ee35a6f3 (diff) | |
| download | xesite-9c28a6face3d3b70679ee666d6a416dc333a8324.tar.xz xesite-9c28a6face3d3b70679ee666d6a416dc333a8324.zip | |
i hate CSS
Signed-off-by: Xe Iaso <me@christine.website>
Diffstat (limited to 'lib/xesite_templates')
| -rw-r--r-- | lib/xesite_templates/src/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/xesite_templates/src/lib.rs b/lib/xesite_templates/src/lib.rs index 333c847..e744531 100644 --- a/lib/xesite_templates/src/lib.rs +++ b/lib/xesite_templates/src/lib.rs @@ -174,12 +174,12 @@ pub fn toot_embed(u: User, t: Toot) -> Markup { @for att in &t.attachment { @if att.media_type.starts_with("image/") { a href=(att.url) { - img height=(if att.height > att.width {"480"} else {"100%"}) src=(att.url) alt=(att.name.clone().unwrap_or("no description provided".into())); + img width="100%" height="100%" src=(att.url) alt=(att.name.clone().unwrap_or("no description provided".into())); } } @if att.media_type.starts_with("video/") { - video width=({att.width / 2}) height=({att.height / 2}) controls { + video width="100%" height="100%" controls { source src=(att.url) type=(att.media_type); "Your browser does not support the video tag, see this URL: " a href=(att.url) {(att.url)} |
