mirror of
https://github.com/BradNut/awesome-uses
synced 2025-09-08 17:40:31 +00:00
Merge pull request #1872 from kendallm/master
Add bluesky socials support
This commit is contained in:
commit
3803c1bfef
3 changed files with 50 additions and 2 deletions
|
|
@ -62,6 +62,7 @@ module.exports.Schema = Joi.object({
|
||||||
.required(),
|
.required(),
|
||||||
twitter: Joi.string().pattern(new RegExp(/^@?(\w){1,15}$/)),
|
twitter: Joi.string().pattern(new RegExp(/^@?(\w){1,15}$/)),
|
||||||
mastodon: Joi.string().pattern(new RegExp(/^@(\w){1,30}@(\w)+\.(.?\w)+$/)),
|
mastodon: Joi.string().pattern(new RegExp(/^@(\w){1,30}@(\w)+\.(.?\w)+$/)),
|
||||||
|
bluesky: Joi.string().pattern(new RegExp(/^@[\w-]+\.(?:[\w-]+\.)?[\w-]+$/)),
|
||||||
emoji: Joi.string().allow(''),
|
emoji: Joi.string().allow(''),
|
||||||
computer: Joi.string().valid('apple', 'windows', 'linux', 'bsd'),
|
computer: Joi.string().valid('apple', 'windows', 'linux', 'bsd'),
|
||||||
phone: Joi.string().valid('iphone', 'android', 'windowsphone', 'flipphone'),
|
phone: Joi.string().valid('iphone', 'android', 'windowsphone', 'flipphone'),
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ import * as icons from '../util/icons';
|
||||||
export default function Person({ person }) {
|
export default function Person({ person }) {
|
||||||
const url = new URL(person.url);
|
const url = new URL(person.url);
|
||||||
const twitter = person.twitter
|
const twitter = person.twitter
|
||||||
? `https://unavatar.io/${person.twitter.replace('@', '')}`
|
? `https://unavatar.io/x/${person.twitter.replace('@', '')}`
|
||||||
: null;
|
: null;
|
||||||
const website = `https://unavatar.io/${url.host}`;
|
const website = `https://unavatar.io/${url.host}`;
|
||||||
const unavatar = person.twitter
|
const unavatar = person.twitter
|
||||||
|
|
@ -93,8 +93,22 @@ export default function Person({ person }) {
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
{/* If they have a bluesky, and no twitter/mastodon, show that */}
|
||||||
|
{person.bluesky && !person.twitter && (
|
||||||
|
<div className="SocialHandle">
|
||||||
|
<a
|
||||||
|
href={`https://bsky.app/profile/${person.bluesky.replace("@", "")}`}
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
>
|
||||||
|
<span className="at">@</span>
|
||||||
|
{person.bluesky.substring(1)}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
{/* If they have a mastodon, and no twitter, show that */}
|
{/* If they have a mastodon, and no twitter, show that */}
|
||||||
{person.mastodon && !person.twitter && (
|
{person.mastodon && !person.twitter && !person.bluesky && (
|
||||||
<div className="SocialHandle">
|
<div className="SocialHandle">
|
||||||
<a
|
<a
|
||||||
href={`https://${mastodonServer}/@${mastodonHandle}`}
|
href={`https://${mastodonServer}/@${mastodonHandle}`}
|
||||||
|
|
@ -151,5 +165,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.`
|
||||||
|
);
|
||||||
|
}
|
||||||
|
},
|
||||||
}),
|
}),
|
||||||
};
|
};
|
||||||
|
|
|
||||||
25
src/data.js
25
src/data.js
|
|
@ -9509,6 +9509,31 @@ module.exports = [
|
||||||
'Node.js',
|
'Node.js',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'Kendall Morgan',
|
||||||
|
description:
|
||||||
|
'Software engineer by day. Hip-hop, coffee, and street photography aficionado by night.',
|
||||||
|
url: 'https://kendallmorgan.com/uses',
|
||||||
|
bluesky: '@kendallmorgan.com',
|
||||||
|
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',
|
name: 'Kenny Robinson',
|
||||||
description:
|
description:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue