aboutsummaryrefslogtreecommitdiffstats
path: root/src/templates.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/templates.rs')
-rw-r--r--src/templates.rs15
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;