aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorXe Iaso <me@xeiaso.net>2023-03-18 15:20:46 -0400
committerXe Iaso <me@xeiaso.net>2023-03-18 15:20:46 -0400
commite179aa8df11f3100d6aa4135398012da908a8138 (patch)
treee72a639f99da1cba984d12c2ab516be4cebfad95 /lib
parent13475efda64dd9a89923df9bcd2acb9a53ba5d1c (diff)
downloadxesite-e179aa8df11f3100d6aa4135398012da908a8138.tar.xz
xesite-e179aa8df11f3100d6aa4135398012da908a8138.zip
lib/xesite_templates: add picture class to xeblog-picture
Signed-off-by: Xe Iaso <me@xeiaso.net>
Diffstat (limited to 'lib')
-rw-r--r--lib/xesite_templates/src/lib.rs10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/xesite_templates/src/lib.rs b/lib/xesite_templates/src/lib.rs
index 413aa90..9472af2 100644
--- a/lib/xesite_templates/src/lib.rs
+++ b/lib/xesite_templates/src/lib.rs
@@ -30,12 +30,10 @@ pub fn slide(name: String, essential: bool) -> Markup {
pub fn picture(path: String) -> Markup {
html! {
a href={"https://cdn.xeiaso.net/file/christine-static/" (path) ".jpg"} target="_blank" {
- center {
- picture style="margin:0" {
- source type="image/avif" srcset={"https://cdn.xeiaso.net/file/christine-static/" (path) ".avif"};
- source type="image/webp" srcset={"https://cdn.xeiaso.net/file/christine-static/" (path) ".webp"};
- img style="padding:0" loading="lazy" alt={"hero image " (path)} src={"https://cdn.xeiaso.net/file/christine-static/" (path) "-smol.png"};
- }
+ picture.picture style="margin:0" {
+ source type="image/avif" srcset={"https://cdn.xeiaso.net/file/christine-static/" (path) ".avif"};
+ source type="image/webp" srcset={"https://cdn.xeiaso.net/file/christine-static/" (path) ".webp"};
+ img.picture style="padding:0" loading="lazy" alt={"hero image " (path)} src={"https://cdn.xeiaso.net/file/christine-static/" (path) "-smol.png"};
}
}
}