Load more button on Posts page
This commit is contained in:
@@ -27,39 +27,47 @@ pub struct DashboardTemplate {
|
||||
}
|
||||
|
||||
#[derive(Template)]
|
||||
#[template(path = "../templates/home.html")]
|
||||
#[template(path = "home.html")]
|
||||
pub struct HomeTemplate;
|
||||
|
||||
#[derive(Template)]
|
||||
#[template(path = "../templates/posts.html")]
|
||||
#[template(path = "posts.html")]
|
||||
pub struct PostsTemplate {
|
||||
pub posts: Vec<PostEntry>,
|
||||
pub next_page: Option<i64>,
|
||||
}
|
||||
|
||||
#[derive(Template)]
|
||||
#[template(path = "../templates/post.html")]
|
||||
#[template(path = "posts.html", block = "posts")]
|
||||
pub struct PostListTemplate {
|
||||
pub posts: Vec<PostEntry>,
|
||||
pub next_page: Option<i64>,
|
||||
}
|
||||
|
||||
#[derive(Template)]
|
||||
#[template(path = "post.html")]
|
||||
pub struct PostTemplate {
|
||||
pub post: PostEntry,
|
||||
}
|
||||
|
||||
#[derive(Template)]
|
||||
#[template(path = "../templates/confirm.html")]
|
||||
#[template(path = "confirm.html")]
|
||||
pub struct ConfirmTemplate;
|
||||
|
||||
#[derive(Template)]
|
||||
#[template(path = "../templates/404.html")]
|
||||
#[template(path = "404.html")]
|
||||
pub struct NotFoundTemplate;
|
||||
|
||||
#[derive(Template)]
|
||||
#[template(path = "../templates/unsubscribe_confirm.html")]
|
||||
#[template(path = "unsubscribe_confirm.html")]
|
||||
pub struct UnsubscribeConfirmTemplate;
|
||||
|
||||
#[derive(Template)]
|
||||
#[template(path = "../templates/unsubscribe.html")]
|
||||
#[template(path = "unsubscribe.html")]
|
||||
pub struct UnsubscribeTemplate;
|
||||
|
||||
#[derive(Template)]
|
||||
#[template(path = "../templates/email/new_post.html")]
|
||||
#[template(path = "email/new_post.html")]
|
||||
pub struct NewPostEmailTemplate<'a> {
|
||||
pub base_url: &'a str,
|
||||
pub post_title: &'a str,
|
||||
@@ -68,7 +76,7 @@ pub struct NewPostEmailTemplate<'a> {
|
||||
}
|
||||
|
||||
#[derive(Template)]
|
||||
#[template(path = "../templates/email/standalone.html")]
|
||||
#[template(path = "email/standalone.html")]
|
||||
pub struct StandaloneEmailTemplate<'a> {
|
||||
pub base_url: &'a str,
|
||||
pub html_content: &'a str,
|
||||
@@ -135,9 +143,3 @@ You're receiving this because you subscribed to the zero2prod newsletter."#,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Template)]
|
||||
#[template(path = "../templates/post_card_fragment.html")]
|
||||
pub struct PostCardTemplate<'a> {
|
||||
pub post: &'a PostEntry,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user