aboutsummaryrefslogtreecommitdiff
path: root/src/tmpl
diff options
context:
space:
mode:
authorXe Iaso <me@christine.website>2022-09-17 02:27:29 +0000
committerXe Iaso <me@christine.website>2022-09-17 02:27:39 +0000
commit839c44e535d03f8ae747139acd27109e897c76e4 (patch)
tree37fc4f812501463454a4f9aa41c9eef2ea430600 /src/tmpl
parent812f4d5baabf0d53fb8cb9c821ea8b2e134fc320 (diff)
downloadxesite-839c44e535d03f8ae747139acd27109e897c76e4.tar.xz
xesite-839c44e535d03f8ae747139acd27109e897c76e4.zip
push 2fa considered harmful
Signed-off-by: Xe Iaso <me@christine.website>
Diffstat (limited to 'src/tmpl')
-rw-r--r--src/tmpl/mod.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/tmpl/mod.rs b/src/tmpl/mod.rs
index c0b1089..ec7ccd5 100644
--- a/src/tmpl/mod.rs
+++ b/src/tmpl/mod.rs
@@ -48,6 +48,16 @@ pub fn xeblog_slide(name: String, essential: bool) -> Markup {
}
}
+pub fn xeblog_picture(path: String) -> Markup {
+ html! {
+ 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"};
+ }
+ }
+}
+
pub fn xeblog_hero(file: String, prompt: Option<String>, ai: Option<String>) -> Markup {
let ai = ai.unwrap_or("MidJourney".to_string());
html! {