summaryrefslogtreecommitdiff
path: root/src/views/post.rs
blob: 4f0554bb21836430ed70016af4a6c8e7b36a17f3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::helpers::*;
use crate::posts::abstractions::post::Post;
use askama::Template;

#[derive(Template)]
#[template(path = "post.html")]
pub struct PostView<P: Post> {
    post: P,
}

impl<P: Post> PostView<P> {
    pub fn with_post(post: P) -> Self {
        Self { post }
    }
}