summaryrefslogtreecommitdiff
path: root/src/projects/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/projects/mod.rs')
-rw-r--r--src/projects/mod.rs37
1 files changed, 27 insertions, 10 deletions
diff --git a/src/projects/mod.rs b/src/projects/mod.rs
index f399984..d3ceb40 100644
--- a/src/projects/mod.rs
+++ b/src/projects/mod.rs
@@ -1,4 +1,4 @@
-use self::data::PROJECTS;
+use self::data::{EXTRA_PROJECTS, PROJECTS};
use crate::layout::{DynScaffold, Scaffold};
use markup::Render;
use rocket::get;
@@ -19,27 +19,32 @@ pub fn r_projects() -> DynScaffold<'static> {
li { @Status::Planned.render() ": No code has been written yet." }
li { @Status::Developing.render() ": Project is under active development." }
li { @Status::Maintained.render() ": Project is in a working state and receives regular updates." }
- li { @Status::Stale.render() ": Project has been discontinued for an unspecified amount of time, but might be resumed if i feel like it." }
- li { @Status::Abandoned.render() ": Project has been discontinued and will likely not be continued forever." }
+ li { @Status::Paused(State::Working).render() @Status::Paused(State::Unfinished).render() ": Project has been discontinued for an unspecified amount of time, but might be resumed if i feel like it." }
+ li { @Status::Abandoned(State::Working).render() @Status::Abandoned(State::Unfinished).render() ": Project has been discontinued and will likely not ever be continued." }
li { @Status::Unknown.render() ": I have not bothered to write down the status" }
}
- ul {
- @for p in PROJECTS {
- li { @p }
- }
+ ul { @for p in PROJECTS { li { @p } } }
+ details { summary { "Other not-so-important projects" }
+ ul { @for p in EXTRA_PROJECTS { li { @p } } }
}
},
}
}
#[derive(Debug, Clone, Copy)]
+pub enum State {
+ Working,
+ Unfinished,
+}
+
+#[derive(Debug, Clone, Copy)]
pub enum Status {
Unknown,
Planned,
Developing,
- Stale,
+ Paused(State),
Maintained,
- Abandoned,
+ Abandoned(State),
}
markup::define! { Project(
@@ -63,9 +68,21 @@ markup::define! { Project(
}}
impl Status {
+ fn ident(self) -> &'static str {
+ match self {
+ Status::Unknown => "unknown",
+ Status::Planned => "planned",
+ Status::Developing => "developing",
+ Status::Maintained => "maintained",
+ Status::Paused(State::Unfinished) => "paused-unfinished",
+ Status::Paused(State::Working) => "paused-working",
+ Status::Abandoned(State::Unfinished) => "abandoned-unfinished",
+ Status::Abandoned(State::Working) => "abandoned-working",
+ }
+ }
pub fn render(self) -> impl Render {
markup::new! {
- div[class=format!("status status-{self:?}")] { @format!("{self:?}") }
+ div[class=format!("status status-{}", self.ident())] { @format!("{self:?}") }
}
}
}