/* This file is part of jellything (https://codeberg.org/metamuffin/jellything) which is licensed under the GNU Affero General Public License (version 3); see /COPYING. Copyright (C) 2023 metamuffin */ use super::{account::session::Session, error::MyError, layout::DynLayoutPage}; use crate::database::Database; use rocket::{get, State}; #[get("/items")] pub fn r_all_items(_sess: Session, db: &State) -> Result, MyError> { Ok(super::layout::LayoutPage { title: "All Items".to_owned(), content: markup::new! { .page.dir { h1 { "All Items" } // ul.directorylisting { @for item in &items { // li {@PosterCard { // wide: false, dir: false, // path: item.lib_path.clone(), // title: &item.info.title // }} // }} } }, ..Default::default() }) }