1
0
mirror of https://github.com/kremalicious/portfolio.git synced 2024-12-23 01:29:41 +01:00

Social -> Networks

This commit is contained in:
Matthias Kretschmann 2018-05-12 22:58:16 +02:00
parent 7da233b353
commit 0f72baf2f6
Signed by: m
GPG Key ID: 606EEEF3C479A91F
4 changed files with 10 additions and 12 deletions

View File

@ -10,9 +10,9 @@ import { ReactComponent as GitHub } from '../../images/github.svg'
import { ReactComponent as Dribbble } from '../../images/dribbble.svg' import { ReactComponent as Dribbble } from '../../images/dribbble.svg'
import '../atoms/Icons.scss' import '../atoms/Icons.scss'
import './Social.scss' import './Networks.scss'
const SocialIcon = props => { const NetworkIcon = props => {
switch (props.title) { switch (props.title) {
case 'Email': case 'Email':
return <Email {...props} /> return <Email {...props} />
@ -29,7 +29,7 @@ const SocialIcon = props => {
} }
} }
class Social extends PureComponent { class Network extends PureComponent {
constructor(props) { constructor(props) {
super(props) super(props)
@ -65,7 +65,7 @@ class Social extends PureComponent {
href={social[key]} href={social[key]}
key={i} key={i}
> >
<SocialIcon title={key} className="icon" /> <NetworkIcon title={key} className="icon" />
<span className="networks__title">{key}</span> <span className="networks__title">{key}</span>
</OutboundLink> </OutboundLink>
))} ))}
@ -76,10 +76,10 @@ class Social extends PureComponent {
} }
} }
Social.propTypes = { Network.propTypes = {
meta: PropTypes.object, meta: PropTypes.object,
minimal: PropTypes.bool, minimal: PropTypes.bool,
hide: PropTypes.bool, hide: PropTypes.bool,
} }
export default Social export default Network

View File

@ -32,8 +32,6 @@
} }
.icon { .icon {
width: 1rem;
height: 1rem;
fill: $brand-grey-light; fill: $brand-grey-light;
} }

View File

@ -2,7 +2,7 @@ import React, { PureComponent } from 'react'
import PropTypes from 'prop-types' import PropTypes from 'prop-types'
import FileSaver from 'file-saver' import FileSaver from 'file-saver'
import vCard from '../../lib/vcf/vcard' import vCard from '../../lib/vcf/vcard'
import Social from '../molecules/Social' import Networks from '../molecules/Networks'
import './Footer.scss' import './Footer.scss'
class Footer extends PureComponent { class Footer extends PureComponent {
@ -54,7 +54,7 @@ class Footer extends PureComponent {
return ( return (
<footer className="footer"> <footer className="footer">
<Social meta={meta} minimal /> <Networks meta={meta} minimal />
<p className="footer__actions"> <p className="footer__actions">
<a <a
href={`${meta.url}/${this.generateFileName()}`} href={`${meta.url}/${this.generateFileName()}`}

View File

@ -2,7 +2,7 @@ import React, { PureComponent } from 'react'
import Link from 'gatsby-link' import Link from 'gatsby-link'
import PropTypes from 'prop-types' import PropTypes from 'prop-types'
import { FadeIn } from '../atoms/Animations' import { FadeIn } from '../atoms/Animations'
import Social from '../molecules/Social' import Networks from '../molecules/Networks'
import Availability from '../molecules/Availability' import Availability from '../molecules/Availability'
import ThemeSwitch from '../molecules/ThemeSwitch' import ThemeSwitch from '../molecules/ThemeSwitch'
import { ReactComponent as Logo } from '../../images/logo.svg' import { ReactComponent as Logo } from '../../images/logo.svg'
@ -49,7 +49,7 @@ class Header extends PureComponent {
</Link> </Link>
</FadeIn> </FadeIn>
<Social meta={meta} hide={!isHomepage} /> <Networks meta={meta} hide={!isHomepage} />
<Availability <Availability
meta={meta} meta={meta}