From f77317bbb13b6063d74fba310751c57984310031 Mon Sep 17 00:00:00 2001 From: NoobDeveloper412 Date: Mon, 16 Sep 2024 19:33:28 +0500 Subject: [PATCH] Removed a few typos, added the options for the other popular social links for the speakers grid. --- src/components/SpeakerGrid.astro | 68 ++++++++++++++++++++------------ src/pages/about.astro | 4 +- 2 files changed, 45 insertions(+), 27 deletions(-) diff --git a/src/components/SpeakerGrid.astro b/src/components/SpeakerGrid.astro index 91924ea..f6446c7 100644 --- a/src/components/SpeakerGrid.astro +++ b/src/components/SpeakerGrid.astro @@ -8,11 +8,21 @@ const filteredPeople = people .slice(0, 12); // Limit to the first 12 people function personLink(person) { - return person.refs?.twitter - ? `https://twitter.com/${person.refs.twitter}` - : person.refs?.bsky - ? `https://bsky.app/profile/${person.refs.bsky}` - : "#"; + if (person.refs?.twitter) { + return `https://twitter.com/${person.refs.twitter}`; + } else if (person.refs?.bsky) { + return `https://bsky.app/profile/${person.refs.bsky}`; + } else if (person.refs?.linkedin) { + return `https://www.linkedin.com/in/${person.refs.linkedin}`; + } else if (person.refs?.github) { + return `https://github.com/${person.refs.github}`; + } else if (person.refs?.matrix) { + return `https://matrix.to/#/${person.refs.matrix}`; + } else if (person.refs?.email) { + return `mailto:${person.refs.email}`; + } else { + return "#"; + } } function truncateCaption(caption) { @@ -25,25 +35,33 @@ function truncateCaption(caption) { } --- -
- {filteredPeople.map((person) => ( -
- - {person.name} - -
-

{person.name}

- {person.refs && person.refs.twitter && ( -

@{person.refs.twitter}

- )} -

{truncateCaption(person.caption)}

+
+ { + filteredPeople.map((person) => ( +
+ + {person.name} + +
+

{person.name}

+ {person.refs && ( +

+ {person.refs.twitter && `@${person.refs.twitter}`} + {person.refs.bsky && ` | bsky: ${person.refs.bsky}`} + {person.refs.linkedin && ` | LinkedIn: ${person.refs.linkedin}`} + {person.refs.github && ` | GitHub: ${person.refs.github}`} + {person.refs.matrix && ` | Matrix: ${person.refs.matrix}`} + {person.refs.email && ` | Email: ${person.refs.email}`} +

+ )} +
-
- ))} + )) + }
diff --git a/src/pages/about.astro b/src/pages/about.astro index 290bb25..ab08c2c 100644 --- a/src/pages/about.astro +++ b/src/pages/about.astro @@ -70,7 +70,7 @@ for (const e of upcomingEvents) { -
@@ -87,7 +87,7 @@ for (const e of upcomingEvents) { -