|
| 1 | +/* eslint-disable no-undef */ |
| 2 | +import React from 'react'; |
| 3 | +import { makeStyles } from '@material-ui/core/styles'; |
| 4 | +import Box from '@mui/material/Box'; |
| 5 | +import Container from '@mui/material/Container'; |
| 6 | + |
| 7 | +import { |
| 8 | + FaTwitter, |
| 9 | + FaLinkedinIn, |
| 10 | + FaGithub, |
| 11 | + FaYoutube, |
| 12 | + FaStackOverflow, |
| 13 | + FaCodepen, |
| 14 | +} from 'react-icons/fa'; |
| 15 | +import { SiReplit } from 'react-icons/si'; |
| 16 | +import { ThemeContext } from '../../contexts/ThemeContext'; |
| 17 | +import { socialsData } from '../../data/socialsData'; |
| 18 | +import './SocialMediaIcons.css'; |
| 19 | + |
| 20 | + |
| 21 | +function SocialMediaIcons() { |
| 22 | + const { theme } = useContext(ThemeContext); |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + const useStyles = makeStyles((t) => ({ |
| 27 | + input: { |
| 28 | + border: `4px solid ${theme.primary80}`, |
| 29 | + backgroundColor: `${theme.secondary}`, |
| 30 | + color: `purple`, |
| 31 | + fontFamily: 'var(--primaryFont)', |
| 32 | + fontWeight: 500, |
| 33 | + transition: 'border 0.2s ease-in-out', |
| 34 | + '&:focus': { |
| 35 | + border: `4px solid ${theme.primary600}`, |
| 36 | + color: 'black', |
| 37 | + }, |
| 38 | + }, |
| 39 | + |
| 40 | + label: { |
| 41 | + backgroundColor: `${theme.secondary}`, |
| 42 | + color: `${theme.primary}`, |
| 43 | + fontFamily: 'var(--primaryFont)', |
| 44 | + fontWeight: 600, |
| 45 | + // fontSize: '0.9rem', |
| 46 | + padding: '0 5px', |
| 47 | + transform: 'translate(25px,50%)', |
| 48 | + display: 'inline-flex', |
| 49 | + '&:hover': { |
| 50 | + transform: 'scale(1.1)', |
| 51 | + color: '#000', |
| 52 | + backgroundColor: theme.tertiary, |
| 53 | + }, |
| 54 | + }, |
| 55 | + socialIcon: { |
| 56 | + width: '55px', |
| 57 | + height: '55px', |
| 58 | + borderRadius: '50%', |
| 59 | + border: `2px solid #232526`, |
| 60 | + fontSize: '45px', |
| 61 | + display: 'flex', |
| 62 | + alignItems: 'center', |
| 63 | + justifyContent: 'center', |
| 64 | + padding: '5px', |
| 65 | + backgroundColor: 'none', |
| 66 | + color: theme.secondary, |
| 67 | + transition: '250ms ease-in-out', |
| 68 | + '&:hover': { |
| 69 | + |
| 70 | + color: '#000', |
| 71 | + backgroundColor: theme.tertiary, |
| 72 | + }, |
| 73 | + }, |
| 74 | + detailsIcon: { |
| 75 | + backgroundColor: '#667', |
| 76 | + color: '#232526', |
| 77 | + borderRadius: '50%', |
| 78 | + border: '2px solid #232526', |
| 79 | + width: '45px', |
| 80 | + height: '45px', |
| 81 | + display: 'flex', |
| 82 | + alignItems: 'center', |
| 83 | + justifyContent: 'center', |
| 84 | + fontSize: '23px', |
| 85 | + transition: '250ms ease-in-out', |
| 86 | + flexShrink: 0, |
| 87 | + '&:hover': { |
| 88 | + transform: 'scale(1.1)', |
| 89 | + color: '#667', |
| 90 | + backgroundColor: '#232526', |
| 91 | + }, |
| 92 | + typoImpo: { |
| 93 | + color: theme.secondary, |
| 94 | + } |
| 95 | + }, |
| 96 | + |
| 97 | + })); |
| 98 | + |
| 99 | + const classes = useStyles(); |
| 100 | + return ( |
| 101 | + <div className='socialmedia-icons'> |
| 102 | + {socialsData.github && ( |
| 103 | + <a |
| 104 | + href={socialsData.github} |
| 105 | + target='_blank' |
| 106 | + rel='noreferrer' |
| 107 | + className={classes.socialIcon} |
| 108 | + > |
| 109 | + <FaGithub aria-label='GitHub' className="localIcon" /> |
| 110 | + </a> |
| 111 | + )} |
| 112 | + {socialsData.twitter && ( |
| 113 | + <a |
| 114 | + href={socialsData.twitter} |
| 115 | + target='_blank' |
| 116 | + rel='noreferrer' |
| 117 | + className={classes.socialIcon} |
| 118 | + > |
| 119 | + <FaTwitter aria-label='Twitter' className="localIcon" /> |
| 120 | + </a> |
| 121 | + )} |
| 122 | + |
| 123 | + {socialsData.linkedIn && ( |
| 124 | + <a |
| 125 | + href={socialsData.linkedIn} |
| 126 | + target='_blank' |
| 127 | + rel='noreferrer' |
| 128 | + className={classes.socialIcon} |
| 129 | + > |
| 130 | + <FaLinkedinIn aria-label='LinkedIn' className="localIcon" /> |
| 131 | + </a> |
| 132 | + )} |
| 133 | + |
| 134 | + {socialsData.youtube && ( |
| 135 | + <a |
| 136 | + href={socialsData.youtube} |
| 137 | + target='_blank' |
| 138 | + rel='noreferrer' |
| 139 | + className={classes.socialIcon} |
| 140 | + > |
| 141 | + <FaYoutube aria-label='YouTube' className="localIcon" /> |
| 142 | + </a> |
| 143 | + )} |
| 144 | + {socialsData.stackOverflow && ( |
| 145 | + <a |
| 146 | + href={socialsData.stackOverflow} |
| 147 | + target='_blank' |
| 148 | + rel='noreferrer' |
| 149 | + className={classes.socialIcon} |
| 150 | + > |
| 151 | + <FaStackOverflow aria-label='Stack Overflow' className="localIcon" /> |
| 152 | + </a> |
| 153 | + )} |
| 154 | + {socialsData.codepen && ( |
| 155 | + <a |
| 156 | + href={socialsData.codepen} |
| 157 | + target='_blank' |
| 158 | + rel='noreferrer' |
| 159 | + className={classes.socialIcon} |
| 160 | + > |
| 161 | + <FaCodepen aria-label='CodePen' className="localIcon" /> |
| 162 | + </a> |
| 163 | + )} |
| 164 | + {socialsData.replit && ( |
| 165 | + <a |
| 166 | + href={socialsData.replit} |
| 167 | + target='_blank' |
| 168 | + rel='noreferrer' |
| 169 | + className={classes.socialIcon} |
| 170 | + > |
| 171 | + <SiReplit aria-label='replit' className="localIcon" /> |
| 172 | + </a> |
| 173 | + )} |
| 174 | + </div> |
| 175 | + ) |
| 176 | +} |
| 177 | + |
| 178 | +export default SocialMediaIcons |
0 commit comments