Implement entry and feed pagination
This commit is contained in:
@@ -7,21 +7,23 @@ use crate::error::Result;
|
||||
use crate::models::feed::{Feed, GetFeedsOptions};
|
||||
use crate::partials::add_feed_form::add_feed_form;
|
||||
use crate::partials::feed_list::feed_list;
|
||||
use crate::partials::opml_import_form::opml_import_form;
|
||||
use crate::partials::layout::Layout;
|
||||
use crate::partials::opml_import_form::opml_import_form;
|
||||
|
||||
pub async fn get(State(pool): State<PgPool>, layout: Layout) -> Result<Response> {
|
||||
let options = GetFeedsOptions::default();
|
||||
let feeds = Feed::get_all(&pool, options.clone()).await?;
|
||||
Ok(layout.render(html! {
|
||||
let feeds = Feed::get_all(&pool, &options).await?;
|
||||
Ok(layout.with_subtitle("feeds").render(html! {
|
||||
h2 { "Feeds" }
|
||||
div class="feeds" {
|
||||
(feed_list(feeds, options))
|
||||
ul id="feeds" {
|
||||
(feed_list(feeds, &options))
|
||||
}
|
||||
div class="add-feed" {
|
||||
h3 { "Add Feed" }
|
||||
(add_feed_form())
|
||||
(opml_import_form())
|
||||
}
|
||||
}
|
||||
}
|
||||
}))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user