1
0
mirror of https://github.com/kremalicious/portfolio.git synced 2025-01-03 18:35:00 +01:00
This commit is contained in:
Matthias Kretschmann 2018-04-12 00:10:13 +02:00
parent cf420fa282
commit 3b2c8758f5
Signed by: m
GPG Key ID: 606EEEF3C479A91F
9 changed files with 70 additions and 75 deletions

View File

@ -1,4 +1,4 @@
const meta = require('./src/data/meta.json') const meta = require('./data/meta.json')
module.exports = { module.exports = {
siteMetadata: { siteMetadata: {
@ -18,7 +18,7 @@ module.exports = {
resolve: 'gatsby-source-filesystem', resolve: 'gatsby-source-filesystem',
options: { options: {
name: 'data', name: 'data',
path: `${__dirname}/src/data/`, path: `${__dirname}/data/`,
}, },
}, },
'gatsby-transformer-json', 'gatsby-transformer-json',

View File

@ -12,11 +12,11 @@ const Header = ({ meta, isHomepage }) => {
<header className={classes}> <header className={classes}>
<Link className="header__name" to={'/'}> <Link className="header__name" to={'/'}>
<Logo className="header__logo" /> <Logo className="header__logo" />
<h1 className="header__title">{meta.title}</h1> <h1 className="header__title">{meta.title.toLowerCase()}</h1>
<p className="header__description">{meta.tagline}</p> <p className="header__description"><span>{'{ '}</span> {meta.tagline.toLowerCase()} <span>{' }'}</span></p>
</Link> </Link>
<Social meta={meta} minimal={!isHomepage} /> <Social meta={meta} minimal={!isHomepage} hide={!isHomepage} />
</header> </header>
) )
} }

View File

@ -2,11 +2,11 @@
.header { .header {
padding: $spacer; padding: $spacer;
min-height: calc(100vh - #{$spacer * 3}); min-height: calc(100vh - #{$spacer});
display: flex; display: flex;
align-content: center;
flex-wrap: wrap; flex-wrap: wrap;
text-align: center; align-content: center;
justify-content: center;
} }
.header__logo { .header__logo {
@ -14,7 +14,6 @@
width: 1.5rem; width: 1.5rem;
height: 1.5rem; height: 1.5rem;
fill: $brand-grey-light; fill: $brand-grey-light;
margin-top: -3rem;
margin-bottom: $spacer; margin-bottom: $spacer;
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
@ -28,29 +27,30 @@
.header__title { .header__title {
font-size: $font-size-h3; font-size: $font-size-h3;
margin-right: $spacer / 2; margin-right: $spacer / 4;
color: $brand-main; color: $brand-main;
} }
.header__description { .header__description {
font-size: $font-size-large; font-size: $font-size-large;
color: $brand-grey; color: $brand-grey;
span {
opacity: .4;
}
} }
.header__name { .header__name {
width: 100%; height: 100%;
pointer-events: none; pointer-events: none;
} }
.header--minimal { .header--minimal {
min-height: 0; min-height: 0;
text-align: left;
flex-wrap: nowrap;
align-content: flex-start;
justify-content: space-between;
@media (min-width: 30rem) { @media (min-width: 30rem) {
margin-bottom: $spacer; margin-top: $spacer / 2;
margin-bottom: $spacer / 2;
} }
.header__title, .header__title,
@ -68,13 +68,9 @@
} }
.header__logo { .header__logo {
display: inline-block;
width: 1rem; width: 1rem;
height: 1rem; height: 1rem;
margin-top: -2rem; margin-bottom: $spacer / 3;
margin-bottom: 0;
margin-right: $spacer / 3;
margin-left: 0;
} }
.header__name { .header__name {
@ -95,10 +91,4 @@
} }
} }
} }
.social {
margin-top: 0;
text-align: right;
justify-content: flex-end;
}
} }

View File

@ -3,16 +3,13 @@
.project__links { .project__links {
ul { ul {
padding: 0; padding: 0;
display: flex; margin-left: -($spacer / 2);
flex-wrap: wrap;
justify-content: space-between;
width: 100%;
} }
li { li {
display: block; display: inline-block;
flex: 0 0 48%; margin-left: $spacer / 2;
margin-bottom: 2%; margin-bottom: $spacer / 2;
} }
.icon { .icon {
@ -22,22 +19,23 @@
} }
a { a {
display: block; display: inline-block;
background: darken($brand-light, 5%); color: $brand-cyan;
text-align: center; text-align: center;
border-radius: .25rem; border-radius: .25rem;
padding: $spacer / 4; padding: $spacer / 4 $spacer;
transition-property: all; transition-property: all;
color: $text-color;
.icon {
fill: $brand-cyan;
opacity: .85;
}
&:hover, &:hover,
&:focus { &:focus {
background: $brand-cyan; background: $brand-light;
color: #fff; transform: translate3d(0, -.2rem, 0);
box-shadow: 0 6px 10px rgba($brand-main, .1), 0 10px 25px rgba($brand-main, .1);
.icon {
fill: #fff;
}
} }
&:active { &:active {

View File

@ -1,4 +1,4 @@
import React from 'react' import React, { Fragment } from 'react'
import PropTypes from 'prop-types' import PropTypes from 'prop-types'
import { OutboundLink } from 'gatsby-plugin-google-analytics' import { OutboundLink } from 'gatsby-plugin-google-analytics'
import { Email, Blog, Twitter, GitHub, Dribbble } from '../atoms/Icons' import { Email, Blog, Twitter, GitHub, Dribbble } from '../atoms/Icons'
@ -21,11 +21,13 @@ const SocialIcon = ({ title }) => {
} }
} }
const Social = ({ meta, minimal }) => { const Social = ({ meta, minimal, hide }) => {
const social = meta.social const social = meta.social
const classes = minimal ? 'social social--minimal' : 'social' const classes = minimal ? 'social social--minimal' : 'social'
return ( return (
<Fragment>
{!hide && (
<aside className={classes}> <aside className={classes}>
{Object.keys(social).map((key, i) => ( {Object.keys(social).map((key, i) => (
<OutboundLink <OutboundLink
@ -38,12 +40,15 @@ const Social = ({ meta, minimal }) => {
</OutboundLink> </OutboundLink>
))} ))}
</aside> </aside>
)}
</Fragment>
) )
} }
Social.propTypes = { Social.propTypes = {
meta: PropTypes.object, meta: PropTypes.object,
minimal: PropTypes.bool, minimal: PropTypes.bool,
hide: PropTypes.bool,
} }
export default Social export default Social

View File

@ -1,7 +1,7 @@
@import 'variables'; @import 'variables';
.social { .social {
margin-top: $spacer * $line-height; margin-top: $spacer;
display: flex; display: flex;
justify-content: center; justify-content: center;
width: 100%; width: 100%;
@ -10,38 +10,36 @@
.social__link { .social__link {
margin-left: $spacer / 2; margin-left: $spacer / 2;
margin-right: $spacer / 2; margin-right: $spacer / 2;
background: $brand-light; padding: $spacer / 2;
padding: $spacer / 4;
text-align: center; text-align: center;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
width: 1.35rem;
height: 1.35rem;
box-shadow: 0 3px 5px rgba($brand-main, .1), 0 5px 16px rgba($brand-main, .1);
border-radius: .25rem; border-radius: .25rem;
transition-property: transform, background, box-shadow; transition-property: transform, background, box-shadow;
.icon {
width: 1rem;
height: 1rem;
}
&:hover, &:hover,
&:focus { &:focus {
background: $brand-grey-dimmed; background: $brand-light;
transform: translate3d(0, -.2rem, 0); transform: translate3d(0, -.2rem, 0);
box-shadow: 0 6px 10px rgba($brand-main, .1), 0 10px 25px rgba($brand-main, .1); box-shadow: 0 6px 10px rgba($brand-main, .1), 0 10px 25px rgba($brand-main, .1);
} }
.social--minimal & { .social--minimal & {
width: 1rem; padding: $spacer / 3;
height: 1rem; margin-left: $spacer / 3;
padding: $spacer / 8; margin-right: $spacer / 3;
margin-left: $spacer / 4;
margin-right: $spacer / 4;
background: transparent;
box-shadow: none;
transform: none;
.icon { .icon {
fill: $brand-grey-light; fill: $brand-grey-light;
transition: .2s ease-out; transition: .2s ease-out;
width: .85rem;
height: .85rem;
} }
&:hover, &:hover,

View File

@ -1,5 +1,11 @@
@import 'variables'; @import 'variables';
*,
*::before,
*::after {
box-sizing: border-box;
}
html, html,
body { body {
margin: 0; margin: 0;
@ -21,7 +27,6 @@ body {
text-rendering: optimizeLegibility; text-rendering: optimizeLegibility;
font-display: swap; font-display: swap;
font-feature-settings: 'liga', 'kern'; font-feature-settings: 'liga', 'kern';
letter-spacing: -.01rem;
} }
p, p,
@ -43,7 +48,6 @@ h6 {
line-height: $line-height-headings; line-height: $line-height-headings;
color: $color-headings; color: $color-headings;
font-weight: $font-weight-headings; font-weight: $font-weight-headings;
letter-spacing: -.04rem;
margin: 0 0 $spacer; margin: 0 0 $spacer;
} }