diff --git a/src/components/AboutFooter.astro b/src/components/AboutFooter.astro index 7a6ea52..2d656be 100644 --- a/src/components/AboutFooter.astro +++ b/src/components/AboutFooter.astro @@ -89,14 +89,22 @@ const sortedSections = sectionsConfig {section.name === "speakers" && (

Speakers

- +
)} {section.name === "core contributors" && (

Core Contributors

- +
)} diff --git a/src/components/SpeakerGrid.astro b/src/components/SpeakerGrid.astro index f6446c7..bec507e 100644 --- a/src/components/SpeakerGrid.astro +++ b/src/components/SpeakerGrid.astro @@ -1,11 +1,12 @@ --- -const { people, team } = Astro.props; +const { people, team, core } = Astro.props; -// Filter the people and limit the results to 12 -const filteredPeople = people - .filter((p) => !team.includes(p.id)) - .filter((p) => p.imageUrl) - .slice(0, 12); // Limit to the first 12 people +// Filter based on the `core` parameter +const members = core + ? people.filter((p) => team.includes(p.id)) // If `core` is true, filter for team members + : people.filter((p) => !team.includes(p.id)); // If `core` is false or undefined, filter for non-team members + +const filteredPeople = members.filter((p) => p.imageUrl).slice(0, 12); function personLink(person) { if (person.refs?.twitter) { @@ -24,15 +25,6 @@ function personLink(person) { return "#"; } } - -function truncateCaption(caption) { - if (!caption) return ""; - const words = caption.split(" "); - if (words.length > 10) { - return words.slice(0, 20).join(" ") + "..."; - } - return caption; -} ---
{ filteredPeople.map((person) => ( -
+