From cf042551f645c9c5e0c9ec7bab35f808fcda67d5 Mon Sep 17 00:00:00 2001 From: Thilo Billerbeck Date: Sun, 19 May 2024 20:55:14 +0200 Subject: [PATCH] add implementation for subteams (#1428) resolves #1420 (Please don#t merge this with the changes to moderation, this is just an example to preview the changes here, I'll remove them before merging since the commits get squashed anyway) --- .../community/teams/MembersDisplay.astro | 65 +++++++++++++++++++ src/content/teams/08_moderation.mdx | 41 ++++++++++++ src/pages/community/teams/[...slug].astro | 64 +++++++----------- 3 files changed, 129 insertions(+), 41 deletions(-) create mode 100644 src/components/pages/community/teams/MembersDisplay.astro diff --git a/src/components/pages/community/teams/MembersDisplay.astro b/src/components/pages/community/teams/MembersDisplay.astro new file mode 100644 index 0000000000..e866dfcdd2 --- /dev/null +++ b/src/components/pages/community/teams/MembersDisplay.astro @@ -0,0 +1,65 @@ +--- +const { title = "Members", isSubteam = false, members, contact, class: extraClasses } = Astro.props; +const titleClasses = `text-3xl font-heading font-bold text-nix-blue`; +--- + + diff --git a/src/content/teams/08_moderation.mdx b/src/content/teams/08_moderation.mdx index e7f6479b02..8ff3bae930 100644 --- a/src/content/teams/08_moderation.mdx +++ b/src/content/teams/08_moderation.mdx @@ -20,6 +20,47 @@ contact: href: https://discourse.nixos.org/c/meta/moderation-team/40 - name: GitHub href: https://github.com/NixOS/moderation +subteams: +- name: TestTeam + members: + - name: Martin Weinelt + discourse: hexa + title: + - name: lassulus + discourse: lassulus + title: +- name: TestTeam + members: + - name: Martin Weinelt + discourse: hexa + title: + - name: lassulus + discourse: lassulus + title: +- name: TestTeam + members: + - name: Martin Weinelt + discourse: hexa + title: + - name: lassulus + discourse: lassulus + title: +- name: TestTeam + members: + - name: Martin Weinelt + discourse: hexa + title: + - name: lassulus + discourse: lassulus + title: +- name: TestTeam + members: + - name: Martin Weinelt + discourse: hexa + title: + - name: lassulus + discourse: lassulus + title: --- This team is responsible for moderating participation on [official community diff --git a/src/pages/community/teams/[...slug].astro b/src/pages/community/teams/[...slug].astro index 2f1d8df33a..343ab710fd 100644 --- a/src/pages/community/teams/[...slug].astro +++ b/src/pages/community/teams/[...slug].astro @@ -4,7 +4,7 @@ import { getCollection } from "astro:content"; import Layout from "../../../layouts/Layout.astro"; import PageHeader from "../../../components/layout/PageHeader.astro"; import Container from "../../../components/layout/Container.astro"; -import Tag from "../../../components/ui/Tag.astro"; +import MembersDisplay from "../../../components/pages/community/teams/MembersDisplay.astro"; export async function getStaticPaths() { const teamEntries = await getCollection("teams"); @@ -21,48 +21,30 @@ const { Content } = await entry.render(); - +
+ { + entry.data.subteams && entry.data.subteams.length > 0 && ( + <> +
+ {entry.data.subteams.map((subteam) => ( + + ))} +
+ + ) + }