aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXe Iaso <me@christine.website>2022-10-30 21:46:40 -0400
committerXe Iaso <me@christine.website>2022-10-30 21:46:40 -0400
commit9c28a6face3d3b70679ee666d6a416dc333a8324 (patch)
tree872f3956fa770baf046b55667b6348d37a34d313
parent1c2737540172085900f7e68c772a60f7ee35a6f3 (diff)
downloadxesite-9c28a6face3d3b70679ee666d6a416dc333a8324.tar.xz
xesite-9c28a6face3d3b70679ee666d6a416dc333a8324.zip
i hate CSS
Signed-off-by: Xe Iaso <me@christine.website>
-rw-r--r--css/shim.css16
-rw-r--r--lib/xesite_templates/src/lib.rs4
2 files changed, 17 insertions, 3 deletions
diff --git a/css/shim.css b/css/shim.css
index 452b8e9..15f88af 100644
--- a/css/shim.css
+++ b/css/shim.css
@@ -70,7 +70,16 @@ figcaption {
}
.ea-placement.ea-type-image {
- background: #282828;
+ background-color: #282828;
+}
+
+.media {
+ background-color: #32302f;
+ color: #fbf1c7;
+
+ margin: auto;
+ max-width: 80ch;
+ padding: 2ch;
}
@media (prefers-color-scheme: light) {
@@ -89,4 +98,9 @@ figcaption {
.logo {
background-color: #1d2021;
}
+
+ .media {
+ color: #32302f;
+ background-color: #fbf1c7;
+ }
}
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)}