aboutsummaryrefslogtreecommitdiff
path: root/src/tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'src/tmpl')
-rw-r--r--src/tmpl/mod.rs30
1 files changed, 28 insertions, 2 deletions
diff --git a/src/tmpl/mod.rs b/src/tmpl/mod.rs
index d919c92..c0b1089 100644
--- a/src/tmpl/mod.rs
+++ b/src/tmpl/mod.rs
@@ -22,6 +22,32 @@ pub fn xeblog_salary_history(cfg: Arc<Config>) -> Markup {
}
}
+pub fn xeblog_talk_warning() -> Markup {
+ html! {
+ div.warning {
+ (xeblog_conv("Cadey".to_string(), "coffee".to_string(), html!{
+ "So you are aware: you are reading the written version of a conference talk. This is written in a different style that is more lighthearted, conversational and different than the content normally on this blog. The words being said are the verbatim words that were spoken at the conference. The slides are the literal slides for each spoken utterance. If you want to hide the non-essential slides, please install this userstyle: "
+ a href="/css/no-fun-allowed.user.css" {code {"No fun allowed"}}
+ ". If this isn't enough, please edit it to also hide this CSS class: "
+ code { "xeblog-slides-essential" }
+ ". Doing this may make the presentation page harder to understand."
+ }))
+ }
+ }
+}
+
+pub fn xeblog_slide(name: String, essential: bool) -> Markup {
+ html! {
+ div.hero.{@if essential {("xeblog-slides-essential")} @else {("xeblog-slides-fluff")}} {
+ picture style="margin:0" {
+ source type="image/avif" srcset={"https://cdn.xeiaso.net/file/christine-static/talks/" (name) ".avif"};
+ source type="image/webp" srcset={"https://cdn.xeiaso.net/file/christine-static/talks/" (name) ".webp"};
+ img style="padding:0" loading="lazy" src={"https://cdn.xeiaso.net/file/christine-static/talks/" (name) "-smol.png"};
+ }
+ }
+ }
+}
+
pub fn xeblog_hero(file: String, prompt: Option<String>, ai: Option<String>) -> Markup {
let ai = ai.unwrap_or("MidJourney".to_string());
html! {
@@ -30,7 +56,7 @@ pub fn xeblog_hero(file: String, prompt: Option<String>, ai: Option<String>) ->
picture style="margin:0" {
source type="image/avif" srcset={"https://cdn.xeiaso.net/file/christine-static/hero/" (file) ".avif"};
source type="image/webp" srcset={"https://cdn.xeiaso.net/file/christine-static/hero/" (file) ".webp"};
- img style="padding:0" alt={"hero image " (file)} src={"https://cdn.xeiaso.net/file/christine-static/hero/" (file) "-smol.png"};
+ img style="padding:0" loading="lazy" alt={"hero image " (file)} src={"https://cdn.xeiaso.net/file/christine-static/hero/" (file) "-smol.png"};
}
figcaption {
"Image generated by "
@@ -50,7 +76,7 @@ pub fn xeblog_conv(name: String, mood: String, body: Markup) -> Markup {
picture {
source type="image/avif" srcset={"https://cdn.xeiaso.net/file/christine-static/stickers/" (name_lower) "/" (mood) ".avif"};
source type="image/webp" srcset={"https://cdn.xeiaso.net/file/christine-static/stickers/" (name_lower) "/" (mood) ".webp"};
- img alt={(name) " is " (mood)} src={"https://cdn.xeiaso.net/file/christine-static/stickers/" (name_lower) "/" (mood) ".png"};
+ img alt={(name) " is " (mood)} loading="lazy" src={"https://cdn.xeiaso.net/file/christine-static/stickers/" (name_lower) "/" (mood) ".png"};
}
}
."conversation-chat" {