diff options
author | cel 🌸 <cel@blos.sm> | 2024-01-31 21:02:28 +0000 |
---|---|---|
committer | cel 🌸 <cel@blos.sm> | 2024-01-31 21:02:28 +0000 |
commit | 2ac490aca1be78d5cb01eeeb9639c6d02ccf40e5 (patch) | |
tree | 04426c29d75d74b35e5e681acc0b58eda713ded3 /src/templates.rs | |
parent | 7ccf135f287ccb6c12494275b2220aae63aa9126 (diff) | |
download | blossom-2ac490aca1be78d5cb01eeeb9639c6d02ccf40e5.tar.gz blossom-2ac490aca1be78d5cb01eeeb9639c6d02ccf40e5.tar.bz2 blossom-2ac490aca1be78d5cb01eeeb9639c6d02ccf40e5.zip |
add poetry
Diffstat (limited to 'src/templates.rs')
-rw-r--r-- | src/templates.rs | 15 |
1 files changed, 15 insertions, 0 deletions
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}; @@ -44,6 +45,20 @@ pub struct Blog { } #[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<poetry::Poem>, + pub jiggle: isize, +} + +#[derive(Template)] #[template(path = "contact.html")] pub struct Contact; |