From 33c51a72893f953b18ce651e6ce3d361b6501244 Mon Sep 17 00:00:00 2001 From: joostdecock Date: Wed, 17 May 2023 12:18:25 +0200 Subject: [PATCH] chore(shared): Updated to social icons/list --- config/social.mjs | 9 +++++++ sites/shared/components/social/icons.mjs | 33 ++++++++++++----------- sites/shared/config/freesewing.config.mjs | 3 +++ 3 files changed, 29 insertions(+), 16 deletions(-) create mode 100644 config/social.mjs diff --git a/config/social.mjs b/config/social.mjs new file mode 100644 index 00000000000..2bc58277fba --- /dev/null +++ b/config/social.mjs @@ -0,0 +1,9 @@ +export const social = { + YouTube: 'https://www.youtube.com/@freesewing', + Discord: 'https://discord.freesewing.org/', + Instagram: 'https://instagram.com/freesewing_org', + Facebook: 'https://www.facebook.com/groups/627769821272714/', + GitHub: 'https://github.com/freesewing', + Reddit: 'https://www.reddit.com/r/freesewing/', + Twitter: 'https://twitter.com/freesewing_org', +} diff --git a/sites/shared/components/social/icons.mjs b/sites/shared/components/social/icons.mjs index 92e3d298dc0..4e078b2aded 100644 --- a/sites/shared/components/social/icons.mjs +++ b/sites/shared/components/social/icons.mjs @@ -13,43 +13,44 @@ import { YouTubeIcon, } from 'shared/components/icons.mjs' import { colors } from 'shared/components/wordmark.mjs' +import { social } from 'config/social.mjs' const iconClasses = (i) => ({ className: `w-8 lg:w-12 h-8 lg:h-12 text-${colors[i]}-400 hover:text-neutral-content`, }) -const social = { - YouTube: { - icon: , +const socialList = { + MSF: { + icon: , href: 'https://www.youtube.com/channel/UCLAyxEL72gHvuKBpa-GmCvQ', }, Discord: { icon: , - href: 'https://discord.freesewing.org/', + href: social.Discord, }, Instagram: { icon: , - href: 'https://instagram.com/freesewing_org', + href: social.Instagram, }, Facebook: { icon: , - href: 'https://www.facebook.com/groups/627769821272714/', + href: social.Facebook, }, - Github: { + GitHub: { icon: , - href: 'https://github.com/freesewing', + href: social.GitHub, }, Reddit: { icon: , - href: 'https://www.reddit.com/r/freesewing/', + href: social.Reddit, }, Twitter: { icon: , - href: 'https://twitter.com/freesewing_org', + href: social.Twitter, }, - 'Creative Commons content: CC-BY': { - icon: , - href: 'https://creativecommons.org/licenses/by/2.0/', + YouTube: { + icon: , + href: social.YouTube, }, 'Open Souce License: MIT': { icon: , @@ -62,8 +63,8 @@ const social = { } export const SocialIcons = () => - Object.keys(social).map((item) => ( - - {social[item].icon} + Object.keys(socialList).map((item) => ( + + {socialList[item].icon} )) diff --git a/sites/shared/config/freesewing.config.mjs b/sites/shared/config/freesewing.config.mjs index 3d97eae8c00..dc0f7a5647c 100644 --- a/sites/shared/config/freesewing.config.mjs +++ b/sites/shared/config/freesewing.config.mjs @@ -1,3 +1,5 @@ +import { social } from 'config/social.mjs' + export const freeSewingConfig = { monorepo: 'https://github.com/freesewing/freesewing', backend: process.env.NEXT_PUBLIC_BACKEND, @@ -37,4 +39,5 @@ export const freeSewingConfig = { notes: 2, }, }, + social, }