Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bring back three deleted mobs as Terminated #250

Merged
merged 1 commit into from
Dec 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 15 additions & 10 deletions builder/src/components/mob_page.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,21 +51,24 @@ impl MobPage {

impl Render for MobPage {
fn render(&self) -> maud::Markup {
let join_content = match self.mob.status() {
let status_content = match self.mob.status() {
mob::Status::Short(join_content) | mob::Status::Open(join_content) => {
Some(join_content.clone())
}
mob::Status::Full(join_content) => join_content.clone(),
mob::Status::Public(join_content) => Some(join_content.clone()),
mob::Status::Terminated(content) => content.clone(),
};

let calendar = components::Calendar::new(
self.events.clone(),
None,
self.fullcalendar_path.clone(),
self.rrule_path.clone(),
self.fullcalendar_rrule_path.clone(),
);
let calendar = (!matches!(self.mob.status(), mob::Status::Terminated(_))).then(|| {
components::Calendar::new(
self.events.clone(),
None,
self.fullcalendar_path.clone(),
self.rrule_path.clone(),
self.fullcalendar_rrule_path.clone(),
)
});

let root_classes = classes!(
"flex",
Expand Down Expand Up @@ -115,15 +118,17 @@ impl Render for MobPage {
(self.mob.freeform_copy_markdown())
}
div class=(*style::PROSE_CLASSES) {
@if let Some(join_content) = join_content {
@if let Some(join_content) = status_content {
(join_content)
}
}
}

hr;

(calendar)
@if let Some(calendar) = calendar {
(calendar)
}
};

self.base
Expand Down
16 changes: 14 additions & 2 deletions builder/src/components/mob_page/status.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ impl Render for Status {
html!(span { (content) })
}

let (short_wrapper, open_wrapper, full_wrapper, public_wrapper): (
let (short_wrapper, open_wrapper, full_wrapper, public_wrapper, terminated_wrapper): (
WrapperFn,
WrapperFn,
WrapperFn,
WrapperFn,
Expand All @@ -32,31 +33,42 @@ impl Render for Status {
status_wrapper_false,
status_wrapper_false,
status_wrapper_false,
status_wrapper_false,
),
mob::Status::Open(_) => (
status_wrapper_false,
status_wrapper_true,
status_wrapper_false,
status_wrapper_false,
status_wrapper_false,
),
mob::Status::Full(_) => (
status_wrapper_false,
status_wrapper_false,
status_wrapper_true,
status_wrapper_false,
status_wrapper_false,
),
mob::Status::Public(_) => (
status_wrapper_false,
status_wrapper_false,
status_wrapper_false,
status_wrapper_true,
status_wrapper_false,
),
mob::Status::Terminated(_) => (
status_wrapper_false,
status_wrapper_false,
status_wrapper_false,
status_wrapper_false,
status_wrapper_true,
),
};

html! {
div class=(classes!("flex", "flex-col", "items-center", "gap-1", "text-lg")) {
div class=(classes!("flex", "gap-4", "uppercase", "tracking-widest")) {
(short_wrapper("short")) (open_wrapper("open")) (full_wrapper("full")) (public_wrapper("public"))
(short_wrapper("short")) (open_wrapper("open")) (full_wrapper("full")) (public_wrapper("public")) (terminated_wrapper("terminated"))
}
p class="tracking-wide" { (mob::Status::description(self.0.as_ref())) }
}
Expand Down
11 changes: 11 additions & 0 deletions builder/src/mob/status.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,17 @@ pub(crate) enum Status {
/// ```
#[attr(indicator = '⛲')]
Public(Markdown),
/// This mob has been terminated.
///
/// The value may explain why.
///
/// Example:
///
/// ```yaml
/// !Terminated |
/// Our goals have been accomplished and we moved on to other activities.
/// ```
Terminated(Option<Markdown>),
}

impl Status {
Expand Down
1 change: 1 addition & 0 deletions builder/src/pages/index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ pub fn page() -> FileSpec {

let events = MOBS
.iter()
.filter(|mob| !matches!(mob.status(), mob::Status::Terminated(_)))
.map(|mob| mob.events(&mut expected_files, event_content_template))
.collect::<Vec<_>>()
.into_iter()
Expand Down
26 changes: 26 additions & 0 deletions mobs/agda_now.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
title: Agda Now
subtitle: Learning Agda, a dependently typed functional programming language
participants:
- !Public
name: Shahar “Dawn” Or
social_url: https://twitter.com/mightyiam
avatar_url: https://avatars.githubusercontent.com/u/635591?v=4
- !Public
name: Iuliu Pop
social_url: https://twitter.com/iulspop
avatar_url: https://avatars.githubusercontent.com/u/53665722?v=4
schedule:
- frequency: FREQ=WEEKLY;BYDAY=FR
timezone: UTC
start_date: 2023-07-14
start_time: 13:00
duration: 90
background_color: salmon
text_color: black
freeform_copy: |
## We're learning Agda

Learning [Agda](https://wiki.portal.chalmers.se/agda/pmwiki.php) since 2023-02-13.

Currently going through [Programming Language Foundations in Agda](https://plfa.github.io/).
status: !Terminated
24 changes: 24 additions & 0 deletions mobs/bass.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
title: Bass
subtitle: Yet another Mobus Operandi website mob
participants:
- !Public
name: Shahar “Dawn” Or
social_url: https://twitter.com/mightyiam
avatar_url: https://avatars.githubusercontent.com/u/635591?v=4
- !Public
name: Kelly Rankin
social_url: https://twitter.com/kellyrankin19
avatar_url: https://avatars.githubusercontent.com/u/1892611?v=4
schedule:
- frequency: FREQ=WEEKLY;BYDAY=MO,TU,WE,TH
timezone: Etc/UTC
start_date: 2023-01-23
start_time: 03:00
duration: 240
background_color: firebrick
text_color: floralwhite
freeform_copy: |
## What we do

We are currently working on [the Mobus Operandi website](https://mobusoperandi.com) which is [statically generated using Rust](https://github.com/mobusoperandi/website).
status: !Terminated
32 changes: 32 additions & 0 deletions mobs/pangolin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
title: Mob Pangolin
subtitle: The Mobus Operandi website mob
participants:
- !Public
name: Shahar “Dawn” Or
social_url: https://twitter.com/mightyiam
avatar_url: https://avatars.githubusercontent.com/u/635591?v=4
- !Public
name: Roland Fredenhagen
social_url: https://github.com/ModProg
avatar_url: https://avatars.githubusercontent.com/u/11978847?v=4

schedule:
- frequency: FREQ=WEEKLY;BYDAY=TU,WE
timezone: Etc/UTC
start_date: 2022-11-01
start_time: 13:00
duration: 120
background_color: Peru
text_color: SeaShell
links:
- !YouTube "@mobpangolin"
freeform_copy: |
## What we do

We are working on the [Mobus Operandi website](https://github.com/mobusoperandi/website)
and on some Rust web development tooling that may eventually be published for general use.

This includes some advanced topics such as futures, streams and reactive programming.

status: !Terminated