From 20f136b4ca104f895da4f5e4e08e7d9f85fd3f13 Mon Sep 17 00:00:00 2001 From: Kendall Morgan <1841529+kendallm@users.noreply.github.com> Date: Sat, 26 Oct 2024 13:40:04 -0700 Subject: [PATCH 1/2] Adding Kendall Morgan --- src/data.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/data.js b/src/data.js index 71efba1f..482a91e8 100644 --- a/src/data.js +++ b/src/data.js @@ -9170,6 +9170,31 @@ module.exports = [ 'Node.js', ], }, + { + name: 'Kendall Morgan', + description: + 'Software engineer by day. Hip-hop, coffee, and street photography aficionado by night.', + url: 'https://kendallmorgan.com/uses', + twitter: '@kendallmorgan', + mastodon: '@kendallmorgan@mastodon.social', + emoji: 'β', + computer: 'apple', + country: 'πΊπΈ', + phone: 'iphone', + tags: [ + 'Developer', + 'Programmer', + 'Engineer', + 'Backend', + 'Distributed Systems', + 'Golang', + 'Typescript', + 'Javascript', + 'Python', + 'Linux', + 'Cloud', + ], + }, { name: 'Kenny Robinson', description: From 5d6f83ff6b0cb17ff4c0aac2876976e64cc1b807 Mon Sep 17 00:00:00 2001 From: Kendall Morgan <1841529+kendallm@users.noreply.github.com> Date: Thu, 31 Oct 2024 14:33:09 -0700 Subject: [PATCH 2/2] feat: add bluesky social link --- scripts/utils.js | 1 + src/components/Person.js | 27 +++++++++++++++++++++++++-- src/data.js | 3 ++- 3 files changed, 28 insertions(+), 3 deletions(-) diff --git a/scripts/utils.js b/scripts/utils.js index 4f936e65..99cca400 100644 --- a/scripts/utils.js +++ b/scripts/utils.js @@ -62,6 +62,7 @@ module.exports.Schema = Joi.object({ .required(), twitter: Joi.string().pattern(new RegExp(/^@?(\w){1,15}$/)), mastodon: Joi.string().pattern(new RegExp(/^@(\w){1,30}@(\w)+\.(.?\w)+$/)), + bluesky: Joi.string().pattern(new RegExp(/^@[\w-]+\.(?:[\w-]+\.)?[\w-]+$/)), emoji: Joi.string().allow(''), computer: Joi.string().valid('apple', 'windows', 'linux', 'bsd'), phone: Joi.string().valid('iphone', 'android', 'windowsphone', 'flipphone'), diff --git a/src/components/Person.js b/src/components/Person.js index 6190444a..86942f54 100644 --- a/src/components/Person.js +++ b/src/components/Person.js @@ -7,7 +7,7 @@ import * as icons from '../util/icons'; export default function Person({ person }) { const url = new URL(person.url); const twitter = person.twitter - ? `https://unavatar.io/${person.twitter.replace('@', '')}` + ? `https://unavatar.io/x/${person.twitter.replace('@', '')}` : null; const website = `https://unavatar.io/${url.host}`; const unavatar = person.twitter @@ -93,8 +93,22 @@ export default function Person({ person }) { )} + {/* If they have a bluesky, and no twitter/mastodon, show that */} + {person.bluesky && !person.twitter && ( +
+ )} + {/* If they have a mastodon, and no twitter, show that */} - {person.mastodon && !person.twitter && ( + {person.mastodon && !person.twitter && !person.bluesky && ( )} + ); @@ -138,5 +153,13 @@ Person.propTypes = { ); } }, + bluesky(props, propName, componentName) { + if (!/^@(\w)+\.(\w)+\.(\w)+$/.test(props[propName])) { + return new Error( + `Invalid prop \`${propName}\` supplied to` + + ` \`${componentName}\`. This isn't a legit Bluesky handle.` + ); + } + }, }), }; diff --git a/src/data.js b/src/data.js index 482a91e8..6f1e7f48 100644 --- a/src/data.js +++ b/src/data.js @@ -8,6 +8,7 @@ * @property {string} country - flag emoji for contributor's country * @property {string} [twitter] - optional Twitter username (beginning with `@`) * @property {string} [mastodon] - optional Mastodon username & server (beginning with `@`, ex: `@hello@mastodon.social`) + * @property {string} [bluesky] - optional Bluesky handle (ex: `@handle.bsky.social`) * @property {string} [emoji] - some emoji corresponding to the contributor * @property {'apple' | 'windows' | 'linux' | 'bsd'} [computer] * @property {'iphone' | 'android' | 'windowsphone' | 'flipphone'} [phone] @@ -9175,7 +9176,7 @@ module.exports = [ description: 'Software engineer by day. Hip-hop, coffee, and street photography aficionado by night.', url: 'https://kendallmorgan.com/uses', - twitter: '@kendallmorgan', + bluesky: '@kendallmorgan.com', mastodon: '@kendallmorgan@mastodon.social', emoji: 'β', computer: 'apple',