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 21039a9f..33dcb2ee 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 && ( +
+ + @ + {person.bluesky.substring(1)} + +
+ )} + {/* If they have a mastodon, and no twitter, show that */} - {person.mastodon && !person.twitter && ( + {person.mastodon && !person.twitter && !person.bluesky && (