Separate archived items

This commit is contained in:
Nettika 2026-01-25 15:00:08 -08:00
parent 208cfe3608
commit 91bbfbd4d4
No known key found for this signature in database

View file

@ -29,6 +29,9 @@ fn main() {
fn display_projects() -> rouille::Response {
let projects = db::list_all_projects().unwrap_or_default();
let active_projects: Vec<_> = projects.iter().filter(|p| !p.archived).collect();
let archived_projects: Vec<_> = projects.iter().filter(|p| p.archived).collect();
let markup = html! {
(DOCTYPE)
html {
@ -41,13 +44,24 @@ fn display_projects() -> rouille::Response {
body {
main {
section {
@for project in &projects {
@for project in &active_projects {
project-card
title=(project.title)
percentage=(project.percentage_completed)
archived=(project.archived) {}
}
}
details {
summary { "Archived" }
section {
@for project in &archived_projects {
project-card
title=(project.title)
percentage=(project.percentage_completed)
archived=(project.archived) {}
}
}
}
}
}
}