From 18339f611fd17e1300593edd65adf7604a39ad72 Mon Sep 17 00:00:00 2001 From: "Adam T. Carpenter" Date: Sat, 14 Sep 2024 20:54:44 -0400 Subject: feat: working rudimentary blog presentation --- src/views/post.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/views/post.rs (limited to 'src/views') diff --git a/src/views/post.rs b/src/views/post.rs new file mode 100644 index 0000000..4f0554b --- /dev/null +++ b/src/views/post.rs @@ -0,0 +1,15 @@ +use crate::helpers::*; +use crate::posts::abstractions::post::Post; +use askama::Template; + +#[derive(Template)] +#[template(path = "post.html")] +pub struct PostView { + post: P, +} + +impl PostView

{ + pub fn with_post(post: P) -> Self { + Self { post } + } +} -- cgit v1.2.3