mirror of
https://github.com/LukeHagar/unicorn-utterances.git
synced 2025-12-06 12:57:44 +00:00
add additional social link types
This commit is contained in:
@@ -41,9 +41,9 @@ Here's an example of what your entry might look like:
|
||||
// "description" is a short bio that will be shown on your profile page
|
||||
"description": "Haskell programmer, fanfiction author, and an omniscient unicorn.",
|
||||
|
||||
// Social usernames can include "twitter", "github", "linkedIn",
|
||||
// "twitch", and "dribbble", as well as a "website" that can be
|
||||
// anything you want!
|
||||
// Social usernames can include "twitter", "github", "gitlab",
|
||||
// "linkedIn", "twitch", "dribbble", "mastodon", "threads", and
|
||||
// "youtube", as well as a "website" that can be anything you want!
|
||||
"socials": {
|
||||
"twitter": "UnicornUttrncs",
|
||||
"github": "unicorn-utterances",
|
||||
|
||||
@@ -23,8 +23,11 @@
|
||||
"lastName": "Fenn",
|
||||
"description": "Enjoys writing software on loud keyboards. Starts too many projects. Consumes food.",
|
||||
"socials": {
|
||||
"twitter": "fennifith",
|
||||
"github": "fennifith"
|
||||
"github": "fennifith",
|
||||
"twitch": "fennifith",
|
||||
"mastodon": "https://is.a.horrific.dev/@fennifith",
|
||||
"website": "https://jfenn.me",
|
||||
"linkedIn": "james-fenn-3390b8167"
|
||||
},
|
||||
"pronouns": "he/him",
|
||||
"profileImg": "./fennifith.jpg",
|
||||
|
||||
1
src/icons/cohost.svg
Normal file
1
src/icons/cohost.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 74 74" fill="none"><path clip-rule="evenodd" d="M59.6322 44.9437c-4.6383 2.8737-9.9864 5.1316-16.0439 6.7736-6.7276 1.8235-13.0686 2.5545-19.0229 2.193-5.9544-.3616-11.0274-1.9329-15.21915-4.7139-4.19172-2.7811-7.01783-6.9285-8.478292-12.4422C-.600881 31.2089-.205441 26.1798 2.05428 21.667c2.25971-4.5129 5.8827-8.4159 10.86902-11.70923 4.9863-3.29329 10.8432-5.85173 17.5707-7.67525C37.1904.467421 43.506-.26513 49.4406.0848681 53.4279.32004 57.0244 1.0994 60.2301 2.42295c1.5656.6464 3.0379 1.42257 4.4171 2.32855 4.2031 2.76108 7.0349 6.8985 8.4954 12.4123 1.4605 5.5137 1.0552 10.537-1.216 15.0698-.3172.6333-.6608 1.2547-1.0308 1.8645-.2613-1.1906-.7862-2.2287-1.5745-3.1143-.387-.4348-.8173-.8341-1.2911-1.1979-.9699-.7448-2.1216-1.3407-3.455-1.7878C62.5905 27.3327 60.3791 27 57.9408 27c-2.4496 0-4.6696.3298-6.6599.9895-1.9903.6596-3.5724 1.652-4.7462 2.977-1.1737 1.3251-1.7606 2.9972-1.7606 5.0163 0 2.0076.5869 3.6768 1.7606 5.0076 1.1738 1.3308 2.7559 2.3318 4.7462 3.0029S55.4912 45 57.9408 45c.5764 0 1.1401-.0187 1.6914-.0563ZM38.4125 41.369c-.465.5048-1.2843 1.0411-2.4581 1.609-1.1738.5679-2.5886 1.0469-4.2443 1.4369-1.6558.3901-3.4363.5851-5.3416.5851-1.667 0-3.3001-.1635-4.8992-.4904-1.599-.327-3.045-.8461-4.3378-1.5574-1.2929-.7113-2.3221-1.6405-3.0876-2.7878-.7655-1.1472-1.1482-2.5411-1.1482-4.1816 0-1.6635.3827-3.0688 1.1482-4.2161.7655-1.1472 1.7947-2.0707 3.0876-2.7705 1.2928-.6998 2.7388-1.2075 4.3378-1.523C23.0684 27.1577 24.7015 27 26.3685 27c1.9167 0 3.6858.1721 5.3076.5163 1.6217.3441 3.0138.7944 4.1762 1.3508 1.1624.5564 2.0045 1.1501 2.5262 1.7811l-4.3549 2.891c-.6351-.6998-1.5991-1.2591-2.8919-1.6778-1.2928-.4188-2.8636-.6281-4.7121-.6281-.9073 0-1.823.0717-2.7473.2151-.9243.1434-1.772.3872-2.5432.7313-.7712.3442-1.3921.826-1.8627 1.4455-.4707.6196-.706 1.4054-.706 2.3576 0 .9407.2353 1.718.706 2.3317.4706.6138 1.0915 1.1014 1.8627 1.4627.7712.3614 1.6189.6167 2.5432.7658.9243.1492 1.84.2237 2.7473.2237 1.8145 0 3.3881-.2294 4.7206-.6883 1.3325-.4589 2.271-.9866 2.8154-1.5832l4.4569 2.8738Zm19.5283-.6711c2.3702 0 4.2074-.4302 5.5116-1.2906 1.3042-.8605 1.9563-2.0019 1.9563-3.4245 0-1.457-.6549-2.6013-1.9648-3.4331-1.3099-.8317-3.1442-1.2476-5.5031-1.2476-2.3702 0-4.216.4159-5.5372 1.2476-1.3212.8318-1.9818 1.9761-1.9818 3.4331 0 1.4455.6606 2.5927 1.9818 3.4417 1.3212.8489 3.167 1.2734 5.5372 1.2734Z" fill="currentColor" fill-rule="evenodd" transform="translate(0,8)"/></svg>
|
||||
|
After Width: | Height: | Size: 2.5 KiB |
1
src/icons/gitlab.svg
Normal file
1
src/icons/gitlab.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="90 90 200 200"><path fill="currentColor" d="M282.83,170.73l-.27-.69-26.14-68.22a6.81,6.81,0,0,0-2.69-3.24,7,7,0,0,0-8,.43,7,7,0,0,0-2.32,3.52l-17.65,54H154.29l-17.65-54A6.86,6.86,0,0,0,134.32,99a7,7,0,0,0-8-.43,6.87,6.87,0,0,0-2.69,3.24L97.44,170l-.26.69a48.54,48.54,0,0,0,16.1,56.1l.09.07.24.17,39.82,29.82,19.7,14.91,12,9.06a8.07,8.07,0,0,0,9.76,0l12-9.06,19.7-14.91,40.06-30,.1-.08A48.56,48.56,0,0,0,282.83,170.73Z"/></svg>
|
||||
|
After Width: | Height: | Size: 499 B |
@@ -9,10 +9,15 @@ export interface RawUnicornInfo {
|
||||
socials: {
|
||||
twitter?: string;
|
||||
github?: string;
|
||||
gitlab?: string;
|
||||
website?: string;
|
||||
linkedIn?: string;
|
||||
twitch?: string;
|
||||
dribbble?: string;
|
||||
mastodon?: string;
|
||||
threads?: string;
|
||||
youtube?: string;
|
||||
cohost?: string;
|
||||
};
|
||||
pronouns?: string;
|
||||
profileImg: string;
|
||||
|
||||
@@ -131,9 +131,33 @@ const fullUnicorns: UnicornInfo[] = unicornsRaw.map((unicorn) => {
|
||||
|
||||
newUnicorn.socials.twitter = normalizeUsername(newUnicorn.socials.twitter);
|
||||
newUnicorn.socials.github = normalizeUsername(newUnicorn.socials.github);
|
||||
newUnicorn.socials.gitlab = normalizeUsername(newUnicorn.socials.gitlab);
|
||||
newUnicorn.socials.linkedIn = normalizeUsername(newUnicorn.socials.linkedIn);
|
||||
newUnicorn.socials.twitch = normalizeUsername(newUnicorn.socials.twitch);
|
||||
newUnicorn.socials.dribbble = normalizeUsername(newUnicorn.socials.dribbble);
|
||||
newUnicorn.socials.threads = normalizeUsername(newUnicorn.socials.threads);
|
||||
newUnicorn.socials.cohost = normalizeUsername(newUnicorn.socials.cohost);
|
||||
|
||||
// "mastodon" should be a full URL; this will error if not valid
|
||||
try {
|
||||
if (newUnicorn.socials.mastodon)
|
||||
newUnicorn.socials.mastodon = new URL(
|
||||
newUnicorn.socials.mastodon,
|
||||
).toString();
|
||||
} catch (e) {
|
||||
console.error(
|
||||
`'${unicorn.id}' socials.mastodon is not a valid URL: '${newUnicorn.socials.mastodon}'`,
|
||||
);
|
||||
throw e;
|
||||
}
|
||||
|
||||
if (newUnicorn.socials.youtube) {
|
||||
// this can either be a "@username" or "channel/{id}" URL, which cannot be mixed.
|
||||
const username = normalizeUsername(newUnicorn.socials.youtube);
|
||||
newUnicorn.socials.youtube = newUnicorn.socials.youtube.includes("@")
|
||||
? `https://www.youtube.com/@${username}`
|
||||
: `https://www.youtube.com/channel/${username}`;
|
||||
}
|
||||
|
||||
return newUnicorn;
|
||||
});
|
||||
|
||||
@@ -25,6 +25,11 @@ const socials = [
|
||||
name: "GitHub",
|
||||
href: `https://github.com/${unicorn.socials.github}`,
|
||||
},
|
||||
unicorn.socials.gitlab && {
|
||||
icon: "gitlab",
|
||||
name: "GitLab",
|
||||
href: `https://gitlab.com/${unicorn.socials.gitlab}`,
|
||||
},
|
||||
unicorn.socials.twitter && {
|
||||
icon: "twitter",
|
||||
name: "Twitter",
|
||||
@@ -45,6 +50,26 @@ const socials = [
|
||||
name: "LinkedIn",
|
||||
href: `https://www.linkedin.com/in/${unicorn.socials.linkedIn}`,
|
||||
},
|
||||
unicorn.socials.mastodon && {
|
||||
icon: "mastodon",
|
||||
name: "Mastodon",
|
||||
href: unicorn.socials.mastodon,
|
||||
},
|
||||
unicorn.socials.threads && {
|
||||
icon: "threads",
|
||||
name: "Threads",
|
||||
href: `https://www.threads.net/${unicorn.socials.threads}`,
|
||||
},
|
||||
unicorn.socials.youtube && {
|
||||
icon: "youtube",
|
||||
name: "YouTube",
|
||||
href: unicorn.socials.youtube,
|
||||
},
|
||||
unicorn.socials.cohost && {
|
||||
icon: "cohost",
|
||||
name: "Cohost",
|
||||
href: `https://cohost.org/${unicorn.socials.cohost}`,
|
||||
},
|
||||
].filter((s) => !!s);
|
||||
---
|
||||
|
||||
@@ -81,6 +106,7 @@ const socials = [
|
||||
socials.map((social) => (
|
||||
<li>
|
||||
<a
|
||||
rel="me"
|
||||
href={social.href}
|
||||
class={`text-style-button-regular ${styles.socialLink}`}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user