1use askama::Template;
2
3/// A project card on the root page — either healthy or failed.
4pub(super) enum ProjectCard {
5 Ok {
6 name: String,
7 open: usize,
8 in_progress: usize,
9 closed: usize,
10 total: usize,
11 },
12 Err {
13 name: String,
14 error: String,
15 },
16}
17
18#[derive(Template)]
19#[template(path = "index.html")]
20pub(super) struct IndexTemplate {
21 pub(super) all_projects: Vec<String>,
22 pub(super) active_project: Option<String>,
23 pub(super) projects: Vec<ProjectCard>,
24}