Skip to content

Commit

Permalink
Migrate team member cards to astro-icon icons
Browse files Browse the repository at this point in the history
  • Loading branch information
Southpaw1496 committed Aug 13, 2024
1 parent 02bb51d commit 3d4d2bb
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 48 deletions.
11 changes: 7 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,20 @@
},
"dependencies": {
"@babel/traverse": "^7.25.3",
"@iconify-json/cib": "^1.1.10",
"@iconify-json/material-symbols": "^1.1.87",
"@iconify-json/mdi": "^1.1.68",
"@tsndr/cloudflare-worker-jwt": "^2.5.3",
"astro-compress": "^2.3.1",
"astro-icon": "^1.1.0",
"semver-sort": "^1.0.0",
"xml-js": "^1.6.11"
},
"pnpm": {
"overrides": {
"@iconify/tools": "^4.0.0"
}
},
"overrides": {
"@iconify/tools": "^4.0.0"
}
},
"engines": {
"node": ">=20"
}
Expand Down
30 changes: 30 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 13 additions & 13 deletions src/components/parts/team/TeamMember.astro
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
import type { TeamMember,} from "@data/Team";
import { t } from "i18next";
import SystemMembers from "./SystemMembers.astro";
import CurseforgeLogo from '../../assets/icon/solid/curseforge.svg?raw';
import ModrinthLogo from '../../assets/icon/solid/modrinth.svg?raw';
import ModrinthLogoSmall from '../../assets/icon/solid/modrinth-small.svg?raw';
import { Icon } from "astro-icon/components"
export interface Props {
member: TeamMember;
Expand All @@ -16,12 +13,6 @@ const { member, isLeader } = Astro.props as Props;
// this is the "N/A" text, for anyone wondering
const na = t("team:n-a");
let customIcons: Record<string, string> = {
'curseforge': CurseforgeLogo,
'modrinth': ModrinthLogo,
'modrinth-small': ModrinthLogoSmall,
}
---
<style>
.z-60 { z-index: 60; }
Expand Down Expand Up @@ -54,12 +45,12 @@ let customIcons: Record<string, string> = {
</p>

<p class="subtitle is-6">
<i class="fab fa-fw fa-discord"></i>
<Icon name="cib:discord" />
{member.discord ?? na}
</p>

<p class="subtitle is-6">
<i class="fab fa-fw fa-github"></i>
<Icon name="cib:github" />

{
member.github ? (
Expand All @@ -77,7 +68,7 @@ let customIcons: Record<string, string> = {
<p class="subtitle is-6 is-links">
{member.links.map((link) => (
<a href={link.url}>
{link.icon.startsWith('custom:') ? (<span style="width: 1.25em; vertical-align: -.2em; display:inline-block;"><Fragment set:html={customIcons[link.icon.substring('custom:'.length)]} /></span>) : (<i class:list={["fa-lg", link.icon]} />)}
<Icon name={link.icon}/>
</a>
))}
</p>
Expand All @@ -99,3 +90,12 @@ let customIcons: Record<string, string> = {
}
</div>
</div>

<style>
[data-icon] {
vertical-align: middle;
width: 1.2em;
height: 1.2em;
padding-right: 0.05em;
}
</style>
62 changes: 31 additions & 31 deletions src/data/TeamData.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default {
avatar: "https://avatars.githubusercontent.com/u/3987560",
description:
"Modder and software developer who has way too many ambitious projects.",
links: [{ icon: "fas fa-link", url: "https://dblsaiko.net/" }],
links: [{ icon: "mdi:link-variant", url: "https://dblsaiko.net/" }],
},
ADudeCalledLeo: {
name: "ADudeCalledLeo",
Expand All @@ -17,11 +17,11 @@ export default {
"The local project abandoning expert. Also may or may not exist.",
links: [
{
icon: "fab fa-mastodon",
icon: "cib:mastodon",
url: "https://tech.lgbt/@ADudeCalledLeo",
},
{
icon: "custom:modrinth-small",
icon: "modrinth-small",
url: "https://modrinth.com/user/ADudeCalledLeo",
},
],
Expand All @@ -40,11 +40,11 @@ export default {
avatar: "/assets/img/team/AlexIIL.png",
links: [
{
icon: "fas fa-link",
icon: "mdi:link-variant",
url: "https://alexiil.uk",
},
{
icon: "custom:curseforge",
icon: "curseforge",
url: "https://www.curseforge.com/members/alexiil/projects",
},
],
Expand Down Expand Up @@ -77,7 +77,7 @@ export default {
github: "Forkk",
avatar: "https://avatars.githubusercontent.com/u/1300078?v=4",
description: "Resident silverware expert.",
links: [{ icon: "fas fa-link", url: "https://forkk.net/" }],
links: [{ icon: "mdi:link-variant", url: "https://forkk.net/" }],
},
Fusion: {
name: "Fusion Flux",
Expand All @@ -87,11 +87,11 @@ export default {
description: "Part time speedrunner, mod developer, and game developer.",
links: [
{
icon: "fab fa-youtube",
icon: "cib:youtube",
url: "https://www.youtube.com/channel/UCyzsPpD0PPB7FQy93Yo6xfQ",
},
{
icon: "fab fa-twitch",
icon: "cib:twitch",
url: "https://www.twitch.tv/fusion_flux",
},
],
Expand Down Expand Up @@ -122,7 +122,7 @@ export default {
discord: "ix0rai",
github: "ix0rai",
avatar: "/assets/img/team/ix0rai.png",
links: [{ icon: "fab fa-tumblr", url: "https://ix0rai.tumblr.com/" }],
links: [{ icon: "cib:tumblr", url: "https://ix0rai.tumblr.com/" }],
},
Jamalam: {
name: "Jamalam",
Expand All @@ -133,15 +133,15 @@ export default {
"Modder and programmer trying to create cool things using Java, Kotlin, and TypeScript/Deno.",
links: [
{
icon: "fas fa-link",
icon: "mdi:link-variant",
url: "https://jamalam.tech/",
},
{
icon: "fab fa-twitter",
icon: "cib:twitter",
url: "https://twitter.com/jamalamisadev",
},
{
icon: "custom:curseforge",
icon: "curseforge",
url: "https://www.curseforge.com/members/Jamalam360/projects",
},
],
Expand All @@ -161,7 +161,7 @@ export default {
avatar: "https://avatars.githubusercontent.com/u/61744596?v=4",
links: [
{
icon: "custom:modrinth-small",
icon: "modrinth-small",
url: "https://modrinth.com/user/anonymous123-code",
},
],
Expand All @@ -182,7 +182,7 @@ export default {
description: "Shorthand enjoyer. Java, Python and bio. Chinese in the SEA.",
links: [
{
icon: "fas fa-link",
icon: "mdi:link-variant",
url: "https://linktr.ee/lapisliozuli",
}
]
Expand All @@ -201,7 +201,7 @@ export default {
description: "Professional memer",
links: [
{
icon: "custom:modrinth-small",
icon: "modrinth-small",
url: "https://modrinth.com/user/obj-obj",
},
],
Expand All @@ -215,19 +215,19 @@ export default {
"Enthusiastic modder, University student, creator of Netherite Plus. Has a special interest in making items extendable and improving everything about mappings in the Quilt Toolchain.",
links: [
{
icon: "fas fa-link",
icon: "mdi:link-variant",
url: "https://oroarmor.com/",
},
{
icon: "fab fa-twitter",
icon: "cib:twitter",
url: "https://twitter.com/realOroArmor",
},
{
icon: "custom:curseforge",
icon: "curseforge",
url: "https://www.curseforge.com/members/oroarmor/projects",
},
{
icon: "custom:modrinth-small",
icon: "modrinth-small",
url: "https://modrinth.com/user/h74rYEcI",
},
],
Expand All @@ -240,7 +240,7 @@ export default {
systemMembers: "---",
links: [
{
icon: "custom:modrinth-small",
icon: "modrinth-small",
url: "https://modrinth.com/user/moehreag"
}
]
Expand All @@ -254,15 +254,15 @@ export default {
"Java programmer and modder, passionate about Kotlin and serverside technology.",
links: [
{
icon: "fal fa-globe",
icon: "mdi:link-variant",
url: "https://quiltservertools.net",
},
{
icon: "custom:curseforge",
icon: "curseforge",
url: "https://www.curseforge.com/members/potatoboy99999/projects",
},
{
icon: "custom:modrinth-small",
icon: "modrinth-small",
url: "https://modrinth.com/user/Potatoboy9999",
},
],
Expand All @@ -281,7 +281,7 @@ export default {
avatar: "/assets/img/team/snoozestudios.png",
description: "Student, Coder & Much More!",
links: [
{ icon: "fab fa-twitter", url: "https://twitter.com/snoozestudios" },
{ icon: "cib:twitter", url: "https://twitter.com/snoozestudios" },
],
},
Southpaw: {
Expand All @@ -293,11 +293,11 @@ export default {
"Inside of Quilt I help moderate community spaces and lead the Outreach team. Outside of Quilt I tinker with things to varying degrees of failure, and write things now and then. I also like cats.",
links: [
{
icon: "fal fa-globe",
icon: "mdi:link-variant",
url: "https://southpaw1496.me",
},
{
icon: "fab fa-mastodon",
icon: "cib:mastodon",
url: "https://mastodon.southpaw1496.me",
},
],
Expand All @@ -311,11 +311,11 @@ export default {
"A person who used to know nothing about programming and now makes fun of himself for it. Also likes Kotlin.",
links: [
{
icon: "fas fa-link",
icon: "mdi:link-variant",
url: "https://concern.i.ng",
},
{
icon: "fab fa-mastodon",
icon: "cib:mastodon",
url: "vmst.io/@sschr15",
},
],
Expand All @@ -329,7 +329,7 @@ export default {
"https://gitlab.com/uploads/-/system/user/avatar/3853177/avatar.png?width=400",
links: [
{
icon: "fab fa-gitlab",
icon: "cib:mastodon",
url: "https://gitlab.com/supersaiyansubtlety",
},
],
Expand All @@ -341,7 +341,7 @@ export default {
description:
"Programming enthusiast, theater and music nerd, Gradle denier.",
avatar: "https://avatars.githubusercontent.com/u/37983572?v=4",
links: [{ icon: "fas fa-link", url: "https://tibinonest.me/" }],
links: [{ icon: "mdi:link-variant", url: "https://tibinonest.me/" }],
},
Woodie: {
name: "Woodie",
Expand All @@ -351,7 +351,7 @@ export default {
avatar: "https://avatars.githubusercontent.com/u/17211100?v=4",
links: [
{
icon: "custom:modrinth-small",
icon: "modrinth-small",
url: "https://modrinth.com/user/woodiertexas",
},
]
Expand Down

0 comments on commit 3d4d2bb

Please sign in to comment.