1
0
Fork 0
freesewing/sites/shared/components/social/icons.mjs

71 lines
1.7 KiB
JavaScript
Raw Normal View History

2023-03-26 14:02:19 +02:00
import Link from 'next/link'
import {
MsfIcon,
HelpIcon,
DiscordIcon,
FacebookIcon,
GithubIcon,
InstagramIcon,
RedditIcon,
TwitterIcon,
OpenSourceIcon,
CcByIcon,
YouTubeIcon,
2023-03-26 14:02:19 +02:00
} from 'shared/components/icons.mjs'
import { colors } from 'shared/components/wordmark.mjs'
import { social } from 'config/social.mjs'
2023-03-26 14:02:19 +02:00
const iconClasses = (i) => ({
className: `w-8 lg:w-12 h-8 lg:h-12 text-${colors[i]}-400 hover:text-neutral-content`,
})
const socialList = {
MSF: {
icon: <MsfIcon {...iconClasses(0)} fill />,
href: 'https://www.youtube.com/channel/UCLAyxEL72gHvuKBpa-GmCvQ',
2023-03-26 14:02:19 +02:00
},
Discord: {
icon: <DiscordIcon {...iconClasses(1)} />,
href: social.Discord,
2023-03-26 14:02:19 +02:00
},
Instagram: {
icon: <InstagramIcon {...iconClasses(2)} />,
href: social.Instagram,
2023-03-26 14:02:19 +02:00
},
Facebook: {
icon: <FacebookIcon {...iconClasses(3)} />,
href: social.Facebook,
2023-03-26 14:02:19 +02:00
},
GitHub: {
2023-03-26 14:02:19 +02:00
icon: <GithubIcon {...iconClasses(4)} />,
href: social.GitHub,
2023-03-26 14:02:19 +02:00
},
Reddit: {
icon: <RedditIcon {...iconClasses(5)} />,
href: social.Reddit,
2023-03-26 14:02:19 +02:00
},
Twitter: {
icon: <TwitterIcon {...iconClasses(6)} />,
href: social.Twitter,
2023-03-26 14:02:19 +02:00
},
YouTube: {
icon: <YouTubeIcon {...iconClasses(7)} fill stroke={0} />,
href: social.YouTube,
2023-03-26 14:02:19 +02:00
},
'Open Souce License: MIT': {
icon: <OpenSourceIcon {...iconClasses(8)} />,
href: 'https://github.com/freesewing/freesewing/blob/develop/LICENSE',
},
'Contact Information': {
icon: <HelpIcon {...iconClasses(9)} />,
href: '/contact',
},
}
export const SocialIcons = () =>
Object.keys(socialList).map((item) => (
<Link key={item} href={socialList[item].href} className="hover:text-secondary" title={item}>
{socialList[item].icon}
2023-03-26 14:02:19 +02:00
</Link>
))