From 2ac490aca1be78d5cb01eeeb9639c6d02ccf40e5 Mon Sep 17 00:00:00 2001 From: cel 🌸 Date: Wed, 31 Jan 2024 21:02:28 +0000 Subject: add poetry --- src/templates.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/templates.rs') diff --git a/src/templates.rs b/src/templates.rs index 861930f..8eafd98 100644 --- a/src/templates.rs +++ b/src/templates.rs @@ -4,6 +4,7 @@ use askama::Template; use poem::http::StatusCode; use rand::{thread_rng, Rng}; +use crate::poetry; use crate::posts::Post; use crate::{blog, scrobbles::NowPlayingData}; @@ -43,6 +44,20 @@ pub struct Blog { pub filter_tags: HashSet, } +#[derive(Template)] +#[template(path = "poem.html")] +pub struct Poem { + pub poem: poetry::Poem, + pub jiggle: isize, +} + +#[derive(Template)] +#[template(path = "poetry.html")] +pub struct Poetry { + pub poems: Vec, + pub jiggle: isize, +} + #[derive(Template)] #[template(path = "contact.html")] pub struct Contact; -- cgit