diff options
| -rw-r--r-- | blog/do-i-need-kubernetes.markdown | 18 | ||||
| -rw-r--r-- | src/app/markdown.rs | 2 | ||||
| -rw-r--r-- | src/tmpl/mod.rs | 10 |
3 files changed, 27 insertions, 3 deletions
diff --git a/blog/do-i-need-kubernetes.markdown b/blog/do-i-need-kubernetes.markdown new file mode 100644 index 0000000..bec7381 --- /dev/null +++ b/blog/do-i-need-kubernetes.markdown @@ -0,0 +1,18 @@ +--- +title: "Do I need Kubernetes?" +date: 2022-08-04 +tags: + - kubernetes + - k8s + - bestpractices +--- + +<xeblog-hero file="space-hexagon" prompt="A hexagon comprised of pink, blue, green, yellow, orange and purple colored trangles combining into octarine in space, digital art, 8k uhd, anime style" ai="DALL-E 2"></xeblog-hero> + +<xeblog-conv name="Cadey" mood="coffee">No.</xeblog-conv> + +<xeblog-conv name="Mara" mood="hmm">But I think I do...</xeblog-conv> + +<xeblog-conv name="Cadey" mood="coffee"><big><big>No.</big></big></xeblog-conv> + +<xeblog-sticker name="Cadey" mood="percussive-maintenance"></xeblog-sticker> diff --git a/src/app/markdown.rs b/src/app/markdown.rs index dee4eef..e539234 100644 --- a/src/app/markdown.rs +++ b/src/app/markdown.rs @@ -100,7 +100,7 @@ pub fn render(cfg: Arc<Config>, inp: &str) -> Result<String> { }), element!("xeblog-hero", |el| { let file = el.get_attribute("file").expect("wanted xeblog-hero to contain file"); - el.replace(&crate::tmpl::xeblog_hero(file, el.get_attribute("prompt")).0, ContentType::Html); + el.replace(&crate::tmpl::xeblog_hero(file, el.get_attribute("prompt"), el.get_attribute("ai")).0, ContentType::Html); Ok(()) }), element!("xeblog-salary-history", |el| { diff --git a/src/tmpl/mod.rs b/src/tmpl/mod.rs index bbb0a98..d919c92 100644 --- a/src/tmpl/mod.rs +++ b/src/tmpl/mod.rs @@ -22,15 +22,21 @@ pub fn xeblog_salary_history(cfg: Arc<Config>) -> Markup { } } -pub fn xeblog_hero(file: String, prompt: Option<String>) -> Markup { +pub fn xeblog_hero(file: String, prompt: Option<String>, ai: Option<String>) -> Markup { + let ai = ai.unwrap_or("MidJourney".to_string()); html! { + meta property="og:image" content={"https://cdn.xeiaso.net/file/christine-static/hero/" (file) "-smol.png"} figure.hero style="margin:0" { 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"}; } - figcaption { "Image generated by MidJourney" @if let Some(prompt) = prompt { " -- " (prompt) } } + figcaption { + "Image generated by " + (ai) + @if let Some(prompt) = prompt { " -- " (prompt) } + } } } } |
