1
0
mirror of https://github.com/kremalicious/portfolio.git synced 2025-02-14 21:10:41 +01:00

Merge pull request #200 from kremalicious/feature/css-modules

migrate to CSS modules, kick out SASS
This commit is contained in:
Matthias Kretschmann 2020-03-07 04:36:37 +01:00 committed by GitHub
commit c3a6cf2f74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
75 changed files with 1360 additions and 1925 deletions

View File

@ -1,7 +1,7 @@
import wrapPageElementWithLayout from './src/helpers/wrapPageElement'
// Global styles
import './src/styles/global.scss'
import './src/styles/global.css'
// IntersectionObserver polyfill for gatsby-image (Safari, IE)
if (typeof window !== 'undefined' && !window.IntersectionObserver) {

View File

@ -36,12 +36,6 @@ module.exports = {
path: path.join(__dirname, 'src', 'images')
}
},
{
resolve: 'gatsby-plugin-sass',
options: {
includePaths: [`${__dirname}/node_modules`, `${__dirname}/src/styles`]
}
},
{
resolve: 'gatsby-plugin-svgr',
options: {

971
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -25,22 +25,21 @@
"@loadable/component": "^5.12.0",
"axios": "^0.19.2",
"file-saver": "^2.0.2",
"gatsby": "^2.19.30",
"gatsby-image": "^2.2.42",
"gatsby-plugin-manifest": "^2.2.42",
"gatsby": "^2.19.32",
"gatsby-image": "^2.2.43",
"gatsby-plugin-manifest": "^2.2.44",
"gatsby-plugin-matomo": "^0.8.1",
"gatsby-plugin-offline": "^3.0.35",
"gatsby-plugin-react-helmet": "^3.1.22",
"gatsby-plugin-sass": "^2.1.29",
"gatsby-plugin-sharp": "^2.4.5",
"gatsby-plugin-sitemap": "^2.2.27",
"gatsby-plugin-offline": "^3.0.37",
"gatsby-plugin-react-helmet": "^3.1.23",
"gatsby-plugin-sharp": "^2.4.7",
"gatsby-plugin-sitemap": "^2.2.28",
"gatsby-plugin-svgr": "^2.0.2",
"gatsby-plugin-use-dark-mode": "^1.1.2",
"gatsby-plugin-webpack-size": "^1.0.0",
"gatsby-source-filesystem": "^2.1.48",
"gatsby-transformer-json": "^2.2.26",
"gatsby-transformer-sharp": "^2.3.16",
"gatsby-transformer-yaml": "^2.2.25",
"gatsby-source-filesystem": "^2.1.50",
"gatsby-transformer-json": "^2.2.27",
"gatsby-transformer-sharp": "^2.3.17",
"gatsby-transformer-yaml": "^2.2.26",
"giphy-js-sdk-core": "^1.0.6",
"graphql": "^14.6.0",
"intersection-observer": "^0.7.0",
@ -69,14 +68,14 @@
"@welldone-software/why-did-you-render": "^4.0.5",
"babel-eslint": "^10.1.0",
"babel-jest": "^25.1.0",
"babel-preset-gatsby": "^0.2.29",
"babel-preset-gatsby": "^0.2.31",
"chalk": "^3.0.0",
"eslint": "^6.8.0",
"eslint-config-prettier": "^6.10.0",
"eslint-loader": "^3.0.3",
"eslint-plugin-graphql": "^3.1.1",
"eslint-plugin-prettier": "^3.1.2",
"eslint-plugin-react": "^7.18.3",
"eslint-plugin-react": "^7.19.0",
"eslint-plugin-react-hooks": "^2.5.0",
"eslint-plugin-testing-library": "^2.2.3",
"gatsby-plugin-webpack-bundle-analyser-v2": "^1.1.8",
@ -84,7 +83,6 @@
"jest": "^25.1.0",
"jest-canvas-mock": "^2.2.0",
"js-yaml": "^3.13.1",
"node-sass": "^4.13.1",
"ora": "^4.0.3",
"prepend": "^1.0.2",
"prettier": "^1.19.1",

View File

@ -7,7 +7,7 @@ import Typekit from './atoms/Typekit'
import HostnameCheck from './atoms/HostnameCheck'
import Header from './organisms/Header'
import Footer from './organisms/Footer'
import styles from './Layout.module.scss'
import styles from './Layout.module.css'
import { useMeta } from '../hooks/use-meta'
// https://github.com/welldone-software/why-did-you-render

View File

@ -0,0 +1,15 @@
.screen {
margin-top: calc(var(--spacer) * var(--line-height));
}
.screen > article {
display: grid;
grid-template-columns:
[full-start] minmax(var(--spacer), 1fr)
[main-start] minmax(0, 38rem) [main-end]
minmax(var(--spacer), 1fr) [full-end];
}
.screen > article > * {
grid-column: main;
}

View File

@ -1,17 +0,0 @@
@import 'variables';
.screen {
margin-top: $spacer * $line-height;
> article {
display: grid;
grid-template-columns:
[full-start] minmax($spacer, 1fr)
[main-start] minmax(0, 38rem) [main-end]
minmax($spacer, 1fr) [full-end];
> * {
grid-column: main;
}
}
}

View File

@ -1,6 +1,6 @@
import React from 'react'
import PropTypes from 'prop-types'
import styles from './Button.module.scss'
import styles from './Button.module.css'
const Button = props => (
<a className={styles.button} {...props}>

View File

@ -0,0 +1,42 @@
.button {
display: block;
width: 100%;
color: var(--brand-cyan);
text-align: center;
border-radius: var(--border-radius);
padding: calc(var(--spacer) / 4) calc(var(--spacer) / 2);
transition-property: all;
background: var(--box-background-color);
border: 0.05rem solid var(--brand-cyan);
font-size: var(--font-size-small);
text-transform: uppercase;
cursor: pointer;
}
@media (min-width: 30rem) {
.button {
display: inline-block;
width: auto;
}
}
.button svg {
margin-right: calc(var(--spacer) / 4);
transition: 0.2s var(--easing);
margin-bottom: -0.1rem;
width: var(--font-size-small);
height: var(--font-size-small);
}
.button:hover,
.button:focus {
color: #5ebeb1;
border-color: #5ebeb1;
transform: translate3d(0, -0.1rem, 0);
box-shadow: var(--box-shadow);
}
.button:active {
transition: none;
background: var(--box-background-color);
}

View File

@ -1,53 +0,0 @@
@import 'variables';
.button {
display: block;
width: 100%;
color: $brand-cyan;
text-align: center;
border-radius: $border-radius;
padding: $spacer / 4 $spacer / 2;
transition-property: all;
background: rgba(#fff, 0.15);
border: 0.05rem solid rgba($brand-cyan, 0.75);
font-size: $font-size-small;
text-transform: uppercase;
cursor: pointer;
@media (min-width: 30rem) {
display: inline-block;
width: auto;
}
svg {
margin-right: $spacer / 4;
transition: 0.2s $easing;
margin-bottom: -0.1rem;
width: $font-size-small;
height: $font-size-small;
}
&:hover,
&:focus {
color: lighten($brand-cyan, 10%);
border-color: rgba(lighten($brand-cyan, 10%), 0.75);
transform: translate3d(0, -0.1rem, 0);
box-shadow: 0 6px 10px rgba($brand-main, 0.1),
0 10px 25px rgba($brand-main, 0.05);
}
&:active {
transition: none;
background: rgba(#fff, 0.15);
}
:global(.dark) & {
background: darken($body-background-color--dark, 1%);
&:hover,
&:focus {
box-shadow: 0 6px 10px rgba(darken($brand-main, 20%), 0.1),
0 10px 25px rgba(darken($brand-main, 20%), 0.2);
}
}
}

View File

@ -1,6 +1,6 @@
import React from 'react'
import PropTypes from 'prop-types'
import styles from './FullWidth.module.scss'
import styles from './FullWidth.module.css'
const FullWidth = ({ children }) => (
<div className={styles.fullWidth}>{children}</div>

View File

@ -1,5 +1,3 @@
@import 'variables';
.fullWidth {
grid-column: full !important;
}

View File

@ -1,7 +1,7 @@
import React, { PureComponent } from 'react'
import PropTypes from 'prop-types'
import Helmet from 'react-helmet'
import styles from './HostnameCheck.module.scss'
import styles from './HostnameCheck.module.css'
export default class HostnameCheck extends PureComponent {
static propTypes = {

View File

@ -0,0 +1,16 @@
.hostnameInfo {
position: sticky;
top: 0;
z-index: 99;
padding: calc(var(--spacer) / 3);
font-size: var(--font-size-small);
font-weight: bold;
background: var(--brand-light);
}
.hostnameInfo p {
margin: auto;
margin-bottom: 0;
max-width: 70em;
text-align: center;
}

View File

@ -1,22 +0,0 @@
@import 'variables';
.hostnameInfo {
position: sticky;
top: 0;
z-index: 99;
padding: $spacer / 3;
font-size: $font-size-small;
font-weight: bold;
background: rgba($brand-light, 0.8);
:global(.dark) & {
background: rgba($body-background-color--dark, 0.8);
}
p {
margin: auto;
margin-bottom: 0;
max-width: $screen-lg;
text-align: center;
}
}

View File

@ -25,7 +25,7 @@ import {
Info
} from 'react-feather'
import { ReactComponent as Dribbble } from '../../images/dribbble.svg'
import styles from './Icon.module.scss'
import styles from './Icon.module.css'
const Icon = memo(({ name, ...props }) => {
const components = {

View File

@ -1,8 +1,6 @@
@import 'variables';
.icon {
width: $font-size-base;
height: $font-size-base;
width: var(--font-size-base);
height: var(--font-size-base);
stroke: currentColor;
stroke-width: 0.1rem;
stroke-linecap: round;

View File

@ -2,7 +2,7 @@ import React, { PureComponent } from 'react'
import PropTypes from 'prop-types'
import { graphql } from 'gatsby'
import Img from 'gatsby-image'
import styles from './ProjectImage.module.scss'
import styles from './ProjectImage.module.css'
export default class ProjectImage extends PureComponent {
static propTypes = {

View File

@ -0,0 +1,18 @@
.projectImage {
margin-left: auto;
margin-right: auto;
display: block;
border-radius: var(--border-radius);
overflow: hidden;
box-shadow: var(--box-shadow);
}
@media (min-width: 1200px) {
.projectImage {
max-width: var(--projectImageMaxWidth);
}
}
.projectImage img {
display: block;
}

View File

@ -1,24 +0,0 @@
@import 'variables';
.projectImage {
margin-left: auto;
margin-right: auto;
display: block;
border-radius: $border-radius;
overflow: hidden;
box-shadow: 0 3px 5px rgba($brand-main, 0.15),
0 5px 16px rgba($brand-main, 0.15);
@media (min-width: $projectImageMaxWidth) {
max-width: $projectImageMaxWidth;
}
:global(.dark) & {
box-shadow: 0 3px 5px rgba(darken($brand-main, 20%), 0.15),
0 5px 16px rgba(darken($brand-main, 20%), 0.15);
}
img {
display: block;
}
}

View File

@ -3,7 +3,7 @@ import PropTypes from 'prop-types'
import posed from 'react-pose'
import { fadeIn } from '../atoms/Transitions'
import { useMeta } from '../../hooks/use-meta'
import styles from './Availability.module.scss'
import styles from './Availability.module.css'
const Animation = posed.aside(fadeIn)

View File

@ -0,0 +1,21 @@
.availability {
border-radius: var(--border-radius);
color: var(--text-color-light);
z-index: 2;
padding: calc(var(--spacer) / 2);
display: block;
margin-top: auto;
}
.availability p {
margin-bottom: 0;
}
.available {
background: var(--body-background-color);
color: var(--brand-main);
position: fixed;
bottom: var(--spacer);
left: 50%;
transform: translateX(-50%);
}

View File

@ -1,36 +0,0 @@
@import 'variables';
.availability {
border-radius: $border-radius;
color: $text-color-light;
z-index: 2;
padding: $spacer / 2;
display: block;
margin-top: auto;
:global(.dark) & {
color: $text-color-light--dark;
}
p {
margin-bottom: 0;
}
a {
border-bottom: 1px solid rgba($brand-cyan, 0.4);
}
}
.available {
background: rgba($brand-light, 0.8);
color: $brand-main;
position: fixed;
bottom: $spacer;
left: 50%;
transform: translateX(-50%);
:global(.dark) & {
background: rgba($body-background-color--dark, 0.8);
color: $brand-light;
}
}

View File

@ -4,7 +4,7 @@ import { Link } from 'gatsby'
import posed from 'react-pose'
import { moveInBottom } from '../atoms/Transitions'
import { ReactComponent as Logo } from '../../images/logo.svg'
import styles from './LogoUnit.module.scss'
import styles from './LogoUnit.module.css'
import { useResume } from '../../hooks/use-resume'
LogoUnit.propTypes = {

View File

@ -0,0 +1,68 @@
.logounit {
pointer-events: none;
display: block;
width: 100%;
}
.logo {
display: block;
width: 1.5rem;
height: 1.5rem;
fill: var(--text-color-light);
margin-bottom: calc(var(--spacer) / 2);
margin-left: auto;
margin-right: auto;
}
.title,
.description {
display: inline-block;
margin-bottom: 0;
}
.title {
font-size: var(--font-size-h3);
margin-right: calc(var(--spacer) / 4);
line-height: var(--line-height);
}
.description {
font-size: var(--font-size-h4);
color: var(--text-color);
}
.description::before,
.description::after {
opacity: 0.4;
}
.description::before {
content: '{ ';
}
.description::after {
content: ' }';
}
.minimal {
composes: logounit;
pointer-events: all;
}
.minimal,
.minimal:hover,
.minimal:focus {
transform: scale(0.7);
transform-origin: top center;
transform-box: border-box;
}
.minimal .title,
.minimal .description {
color: var(--text-color-light);
}
.minimal .logo {
margin-bottom: calc(var(--spacer) / 3);
opacity: 0.5;
}

View File

@ -1,75 +0,0 @@
@import 'variables';
.logounit {
pointer-events: none;
display: block;
width: 100%;
}
.logo {
display: block;
width: 1.5rem;
height: 1.5rem;
fill: $brand-grey-light;
margin-bottom: $spacer / 2;
margin-left: auto;
margin-right: auto;
}
.title,
.description {
display: inline-block;
margin-bottom: 0;
}
.title {
font-size: $font-size-h3;
margin-right: $spacer / 4;
color: $brand-main;
line-height: $line-height;
}
.description {
font-size: $font-size-h4;
color: $brand-grey-light;
&::before,
&::after {
opacity: 0.4;
}
&::before {
content: '{ ';
}
&::after {
content: ' }';
}
}
.minimal {
composes: logounit;
pointer-events: all;
&,
&:hover,
&:focus {
transform: scale(0.7);
transform-origin: top center;
transform-box: border-box;
}
.title,
.description {
color: $text-color-light;
:global(.dark) & {
color: $text-color-light--dark;
}
}
.logo {
margin-bottom: $spacer / 3;
opacity: 0.5;
}
}

View File

@ -4,7 +4,7 @@ import posed from 'react-pose'
import { moveInTop } from '../atoms/Transitions'
import Icon from '../atoms/Icon'
import { useResume } from '../../hooks/use-resume'
import styles from './Networks.module.scss'
import styles from './Networks.module.css'
const linkClasses = key =>
key === 'Mail' ? `u-email ${styles.link}` : `u-url ${styles.link}`

View File

@ -0,0 +1,68 @@
.networks {
margin-top: calc(var(--spacer) * var(--line-height));
margin-left: auto;
margin-right: auto;
width: 100%;
text-align: center;
display: flex;
flex-wrap: wrap;
justify-content: center;
}
.title {
display: block;
font-size: var(--font-size-mini);
color: var(--brand-grey-light);
opacity: 0;
transform: translate3d(0, 0.5rem, 0);
transition: 0.2s var(--easing);
}
.link {
margin-left: calc(var(--spacer) / var(--line-height));
margin-right: calc(var(--spacer) / var(--line-height));
margin-bottom: calc(var(--spacer) / 2);
text-align: center;
display: inline-block;
flex: 0 1;
min-width: 2.5rem;
}
.link,
.link svg {
transition: 0.2s var(--easing);
}
.link svg {
stroke: var(--brand-grey-light);
width: 24px;
height: 24px;
}
.link:hover svg,
.link:focus svg {
stroke: var(--brand-cyan);
}
.link:hover .title,
.link:focus .title {
opacity: 1;
transform: translate3d(0, 0, 0);
}
.small {
composes: networks;
}
.small .link {
padding: calc(var(--spacer) / 4);
margin-left: calc(var(--spacer) / 7);
margin-right: calc(var(--spacer) / 7);
margin-bottom: calc(var(--spacer) / 4);
}
.small svg {
width: var(--font-size-base);
height: var(--font-size-base);
opacity: 0.8;
}

View File

@ -1,71 +0,0 @@
@import 'variables';
.networks {
margin-top: $spacer * $line-height;
margin-left: auto;
margin-right: auto;
width: 100%;
text-align: center;
display: flex;
flex-wrap: wrap;
justify-content: center;
}
.title {
display: block;
font-size: $font-size-mini;
color: $brand-grey-light;
opacity: 0;
transform: translate3d(0, 0.5rem, 0);
transition: 0.2s $easing;
}
.link {
margin-left: $spacer / $line-height;
margin-right: $spacer / $line-height;
margin-bottom: $spacer / 2;
text-align: center;
display: inline-block;
flex: 0 1;
min-width: 2.5rem;
&,
svg {
transition: 0.2s $easing;
}
svg {
stroke: $brand-grey-light;
width: 24px;
height: 24px;
}
&:hover,
&:focus {
svg {
stroke: $brand-cyan;
}
.title {
opacity: 1;
transform: translate3d(0, 0, 0);
}
}
}
.small {
composes: networks;
.link {
padding: $spacer / 4;
margin-left: $spacer / 7;
margin-right: $spacer / 7;
margin-bottom: $spacer / 4;
}
svg {
width: $font-size-base;
height: $font-size-base;
opacity: 0.8;
}
}

View File

@ -2,7 +2,7 @@ import React from 'react'
import PropTypes from 'prop-types'
import Button from '../atoms/Button'
import Icon from '../atoms/Icon'
import styles from './ProjectLinks.module.scss'
import styles from './ProjectLinks.module.css'
ProjectLinks.propTypes = {
links: PropTypes.array

View File

@ -0,0 +1,28 @@
.projectLinks ul {
padding: 0;
}
.projectLinks li {
display: flex;
align-items: center;
margin-bottom: calc(var(--spacer) / 2.1);
}
.projectLinks a {
display: block;
width: 100%;
text-transform: none;
text-align: left;
padding-left: 1.8rem;
}
.projectLinks svg {
stroke: var(--text-color-light);
width: var(--font-size-small);
height: var(--font-size-small);
margin-left: -1.2rem;
}
.title {
composes: metatitle from '../templates/Project.module.css';
}

View File

@ -1,31 +0,0 @@
@import 'variables';
.projectLinks {
ul {
padding: 0;
}
li {
display: flex;
align-items: center;
white-space: nowrap;
margin-bottom: $spacer / 2.1;
}
a {
display: block;
width: 100%;
text-transform: none;
text-align: left;
}
svg {
stroke: $brand-grey-light;
width: $font-size-small;
height: $font-size-small;
}
}
.title {
composes: metatitle from '../templates/Project.module.scss';
}

View File

@ -1,9 +1,9 @@
import React, { PureComponent } from 'react'
import PropTypes from 'prop-types'
import { Link, graphql, StaticQuery } from 'gatsby'
import Img from 'gatsby-image'
import shortid from 'shortid'
import styles from './ProjectNav.module.scss'
import ProjectImage from '../atoms/ProjectImage'
import styles from './ProjectNav.module.css'
const query = graphql`
query {
@ -28,7 +28,7 @@ const query = graphql`
const Project = ({ node, refCurrentItem }) => (
<div className={styles.item} ref={refCurrentItem}>
<Link className={styles.link} to={node.slug}>
<Img
<ProjectImage
className={styles.image}
fluid={node.img.childImageSharp.fluid}
alt={node.title}

View File

@ -0,0 +1,51 @@
.projectNav {
white-space: nowrap;
overflow-y: hidden;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
}
.projectNav::-webkit-scrollbar,
.projectNav::-moz-scrollbar {
display: none;
}
.projectNav::-webkit-scrollbar {
width: 6px;
height: 6px;
}
.projectNav::-webkit-scrollbar-thumb {
background: var(--brand-grey-dimmed);
}
.projectNav::-webkit-scrollbar-track {
background: var(--box-background-color);
}
.item {
display: inline-block;
width: 60vw;
margin-left: var(--spacer);
}
.item:last-child {
margin-right: calc(var(--spacer) * 2);
}
@media (min-width: 30em) {
.item {
width: 40vw;
max-width: 500px;
margin-left: calc(var(--spacer) * 2);
}
}
.title {
visibility: hidden;
font-size: 0;
}
.link {
display: block;
}

View File

@ -1,71 +0,0 @@
@import 'variables';
.projectNav {
white-space: nowrap;
overflow-y: hidden;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
&::-webkit-scrollbar,
&::-moz-scrollbar {
display: none;
}
&::-webkit-scrollbar {
width: 6px;
height: 6px;
}
&::-webkit-scrollbar-thumb {
background: lighten($brand-grey-light, 25%);
:global(.dark) & {
background: lighten($body-background-color--dark, 15%);
}
}
// stylelint-disable-next-line no-descending-specificity
&::-webkit-scrollbar-track {
background: darken($body-background-color, 2%);
:global(.dark) & {
background: lighten($body-background-color--dark, 2%);
}
}
}
.item {
display: inline-block;
width: 60vw;
margin-left: $spacer;
&:last-child {
margin-right: $spacer * 2;
}
@media (min-width: $screen-xs) {
width: 40vw;
max-width: 500px;
margin-left: $spacer * 2;
}
}
.image {
margin: 0;
box-shadow: 0 3px 5px rgba($brand-main, 0.15),
0 5px 16px rgba($brand-main, 0.15);
:global(.dark) & {
box-shadow: 0 3px 5px rgba(darken($brand-main, 20%), 0.15),
0 5px 16px rgba(darken($brand-main, 20%), 0.15);
}
}
.title {
visibility: hidden;
font-size: 0;
}
.link {
display: block;
}

View File

@ -1,6 +1,6 @@
import React from 'react'
import PropTypes from 'prop-types'
import styles from './ProjectTechstack.module.scss'
import styles from './ProjectTechstack.module.css'
const ProjectTechstack = ({ techstack }) => (
<div className={styles.projectTechstack}>

View File

@ -0,0 +1,23 @@
.projectTechstack ul {
padding: 0;
display: grid;
grid-template-columns: 1fr 1fr;
gap: calc(var(--spacer) / 2);
}
.projectTechstack li {
display: flex;
align-items: center;
justify-content: center;
padding: calc(var(--spacer) / 4);
text-align: center;
background: var(--box-background-color);
border-radius: var(--border-radius);
border: 0.05rem solid transparent;
color: var(--text-color-light);
font-size: var(--font-size-small);
}
.title {
composes: metatitle from '../templates/Project.module.css';
}

View File

@ -1,32 +0,0 @@
@import 'variables';
.projectTechstack {
ul {
padding: 0;
display: grid;
grid-template-columns: 1fr 1fr;
grid-gap: $spacer / 2;
}
li {
display: flex;
align-items: center;
justify-content: center;
padding: $spacer / 4;
text-align: center;
background: rgba(#fff, 0.15);
border-radius: $border-radius;
border: 0.05rem solid transparent;
color: $brand-grey-light;
font-size: $font-size-small;
:global(.dark) & {
background: darken($body-background-color--dark, 1%);
color: $text-color--dark;
}
}
}
.title {
composes: metatitle from '../templates/Project.module.scss';
}

View File

@ -1,7 +1,7 @@
import React from 'react'
import PropTypes from 'prop-types'
import Icon from '../atoms/Icon'
import styles from './Repository.module.scss'
import styles from './Repository.module.css'
export default function Repository({ repo }) {
const {

View File

@ -0,0 +1,51 @@
.repo {
padding: var(--spacer);
border-radius: var(--border-radius);
background: var(--box-background-color);
display: flex;
flex-wrap: wrap;
align-items: flex-start;
box-shadow: var(--box-shadow);
}
.repo > * {
width: 100%;
}
.repo p {
font-size: var(--font-size-small);
}
.repo p:last-child {
margin: 0;
}
.repoTitle {
font-size: var(--font-size-h5);
margin-bottom: calc(var(--spacer) / 2);
}
.meta {
font-size: var(--font-size-small);
align-self: flex-end;
display: flex;
justify-content: space-between;
}
.meta a {
display: inline-block;
color: var(--text-color-light);
font-variant-numeric: lining-nums;
}
.meta a:hover,
.meta a:focus {
color: var(--brand-cyan);
}
.meta svg {
width: var(--font-size-small);
height: var(--font-size-small);
margin-right: calc(var(--spacer) / 12);
margin-bottom: -0.1rem;
}

View File

@ -1,60 +0,0 @@
@import 'variables';
.repo {
padding: $spacer;
border-radius: $border-radius;
background: rgba(#fff, 0.15);
box-shadow: 0 3px 5px rgba($brand-main, 0.1),
0 5px 16px rgba($brand-main, 0.1);
display: flex;
flex-wrap: wrap;
align-items: flex-start;
:global(.dark) & {
background: darken($body-background-color--dark, 1%);
box-shadow: 0 3px 5px rgba(darken($brand-main, 20%), 0.1),
0 5px 16px rgba(darken($brand-main, 20%), 0.1);
}
> * {
width: 100%;
}
p {
font-size: $font-size-small;
}
p:last-child {
margin: 0;
}
}
.repoTitle {
font-size: $font-size-h4;
margin-bottom: $spacer / 2;
}
.meta {
font-size: $font-size-small;
align-self: flex-end;
display: flex;
justify-content: space-between;
a {
display: inline-block;
color: $brand-grey-light;
font-variant-numeric: lining-nums;
&:hover,
&:focus {
color: $brand-cyan;
}
}
svg {
width: $font-size-small;
height: $font-size-small;
margin-right: $spacer / 12;
margin-bottom: -($spacer / 12);
}
}

View File

@ -3,7 +3,7 @@ import PropTypes from 'prop-types'
import Helmet from 'react-helmet'
import useDarkMode from 'use-dark-mode'
import Icon from '../atoms/Icon'
import styles from './ThemeSwitch.module.scss'
import styles from './ThemeSwitch.module.css'
const ThemeToggle = memo(({ dark }) => (
<span id="toggle" className={styles.checkboxContainer} aria-live="assertive">
@ -49,7 +49,7 @@ const HeadItems = ({ bodyClass, themeColor }) => (
)
HeadItems.propTypes = {
bodyClass: PropTypes.string.isRequired,
bodyClass: PropTypes.string,
themeColor: PropTypes.string.isRequired
}

View File

@ -0,0 +1,77 @@
.themeSwitch {
position: absolute;
top: calc(var(--spacer) / 2);
right: var(--spacer);
z-index: 10;
}
.themeSwitch svg {
stroke: var(--brand-grey-light);
width: var(--font-size-base);
height: var(--font-size-base);
margin-top: -0.05rem;
}
.themeSwitch svg:last-child {
width: calc(var(--font-size-base) * 0.9);
height: calc(var(--font-size-base) * 0.9);
}
@media print {
.themeSwitch {
display: none;
}
}
.checkboxContainer {
display: flex;
align-items: center;
}
.checkboxFake {
--knob-size: 7px;
--knob-space: 1px;
display: block;
position: relative;
width: calc((var(--knob-size) + var(--knob-space) * 2) * 2);
height: calc(var(--knob-size) + var(--knob-space) * 4);
border: 1px solid var(--brand-grey-light);
border-radius: 15rem;
margin-left: calc(var(--spacer) / 3);
margin-right: calc(var(--spacer) / 3);
}
.checkboxFake::after {
content: '';
position: absolute;
top: var(--knob-space);
left: var(--knob-space);
width: var(--knob-size);
height: var(--knob-size);
background-color: var(--brand-grey-light);
border-radius: 15rem;
transition: transform 0.2s var(--easing);
transform: translate3d(0, 0, 0);
}
.checkbox {
position: relative;
cursor: pointer;
}
.checkbox [type='checkbox'],
.checkbox .label {
width: 1px;
height: 1px;
border: 0;
clip: rect(0 0 0 0);
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
}
.checkbox [type='checkbox']:checked + .checkboxContainer .checkboxFake::after {
transform: translate3d(100%, 0, 0);
}

View File

@ -1,85 +0,0 @@
@import 'variables';
.themeSwitch {
position: absolute;
top: $spacer / 2;
right: $spacer;
z-index: 10;
svg {
stroke: $brand-grey-light;
width: $font-size-base;
height: $font-size-base;
margin-top: -0.05rem;
&:last-child {
width: $font-size-base * 0.9;
height: $font-size-base * 0.9;
}
}
@media print {
display: none;
}
}
.checkboxContainer {
display: flex;
align-items: center;
}
$knob-size: 7px;
$knob-space: 1px;
.checkboxFake {
display: block;
position: relative;
width: ($knob-size + ($knob-space * 2)) * 2;
height: $knob-size + ($knob-space * 4);
border: 1px solid $brand-grey-light;
border-radius: 15rem;
margin-left: $spacer / 3;
margin-right: $spacer / 3;
&::after {
content: '';
position: absolute;
top: $knob-space;
left: $knob-space;
width: $knob-size;
height: $knob-size;
background-color: $brand-grey-light;
border-radius: 15rem;
transition: transform 0.2s $easing;
transform: translate3d(0, 0, 0);
}
}
.checkbox {
position: relative;
cursor: pointer;
[type='checkbox'],
.label {
width: 1px;
height: 1px;
border: 0;
clip: rect(0 0 0 0);
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
}
[type='checkbox'] {
&:checked {
+ .checkboxContainer {
.checkboxFake {
&::after {
transform: translate3d(100%, 0, 0);
}
}
}
}
}
}

View File

@ -4,7 +4,7 @@ import { graphql, useStaticQuery } from 'gatsby'
import loadable from '@loadable/component'
import LogoUnit from '../molecules/LogoUnit'
import Networks from '../molecules/Networks'
import styles from './Footer.module.scss'
import styles from './Footer.module.css'
import { useMeta } from '../../hooks/use-meta'
const LazyVcard = loadable(() => import('../atoms/Vcard'))

View File

@ -0,0 +1,30 @@
.footer {
padding: var(--spacer);
padding-top: calc(var(--spacer) * 4);
text-align: center;
color: var(--text-color-light);
}
.footer,
.footer small {
font-size: var(--font-size-mini);
}
.footer > aside {
margin-top: 0;
margin-bottom: calc(var(--spacer) * 2);
}
.actions a {
display: inline-block;
padding: 0 calc(var(--spacer) / 4);
font-size: var(--font-size-small);
margin-left: calc(var(--spacer) / 2);
margin-right: calc(var(--spacer) / 2);
margin-bottom: calc(var(--spacer) / 2);
color: var(--text-color-light);
}
.copyright a {
color: inherit;
}

View File

@ -1,44 +0,0 @@
@import 'variables';
.footer {
padding: $spacer;
padding-top: $spacer * 4;
text-align: center;
color: $text-color-light;
&,
small {
font-size: $font-size-mini;
}
> aside {
margin-top: 0;
margin-bottom: $spacer * 2;
}
:global(.dark) & {
color: $text-color-light--dark;
}
}
.actions {
a {
display: inline-block;
padding: 0 $spacer / 4;
font-size: $font-size-small;
margin-left: $spacer / 2;
margin-right: $spacer / 2;
margin-bottom: $spacer / 2;
color: $text-color-light;
:global(.dark) & {
color: $text-color-light--dark;
}
}
}
.copyright {
a {
color: inherit;
}
}

View File

@ -4,7 +4,7 @@ import Networks from '../molecules/Networks'
import Availability from '../molecules/Availability'
import ThemeSwitch from '../molecules/ThemeSwitch'
import LogoUnit from '../molecules/LogoUnit'
import styles from './Header.module.scss'
import styles from './Header.module.css'
import { useMeta } from '../../hooks/use-meta'
Header.propTypes = {

View File

@ -1,10 +1,8 @@
@import 'variables';
.header {
position: relative;
padding: $spacer;
padding: var(--spacer);
padding-top: 30vh;
min-height: calc(100vh - #{$spacer});
min-height: calc(100vh - var(--spacer));
max-height: 1000px;
text-align: center;
display: flex;
@ -15,6 +13,6 @@
.minimal {
composes: header;
min-height: 0;
padding-top: $spacer * 2;
padding-top: calc(var(--spacer) * 2);
padding-bottom: 0;
}

View File

@ -2,7 +2,7 @@ import React, { memo } from 'react'
import PropTypes from 'prop-types'
import Repository from '../molecules/Repository'
import styles from './Repositories.module.scss'
import styles from './Repositories.module.css'
Repositories.propTypes = {
repos: PropTypes.array

View File

@ -0,0 +1,24 @@
.section {
margin: calc(var(--spacer) * 3) auto 0 auto;
max-width: calc(var(--projectImageMaxWidth) + var(--spacer) * 2);
padding-left: var(--spacer);
padding-right: var(--spacer);
}
.sectionTitle {
font-size: var(--font-size-h3);
margin-bottom: calc(var(--spacer) * 2);
text-align: center;
}
.repos {
display: grid;
grid-template-columns: 1fr;
gap: calc(var(--spacer) * 2);
}
@media (min-width: 18rem) {
.repos {
grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
}
}

View File

@ -1,29 +0,0 @@
@import 'variables';
.section {
max-width: calc(#{$projectImageMaxWidth} - #{$spacer * 2});
margin: $spacer * 3 auto 0 auto;
padding-left: $spacer;
padding-right: $spacer;
}
.sectionTitle {
font-size: $font-size-h3;
margin-bottom: $spacer * 2;
text-align: center;
}
.repos {
display: grid;
grid-template-columns: 1fr;
grid-gap: $spacer * 2;
@media (min-width: $screen-sm) {
grid-template-columns: 1fr 1fr;
grid-gap: $spacer * 2;
}
@media (min-width: $screen-md) {
grid-gap: $spacer * 3;
}
}

View File

@ -7,7 +7,7 @@ import ProjectTechstack from '../molecules/ProjectTechstack'
import ProjectLinks from '../molecules/ProjectLinks'
import ProjectNav from '../molecules/ProjectNav'
import SEO from '../atoms/SEO'
import styles from './Project.module.scss'
import styles from './Project.module.css'
class ProjectMeta extends PureComponent {
static propTypes = {

View File

@ -0,0 +1,50 @@
.imageWrap {
margin-bottom: calc(var(--spacer) * 3);
}
.title {
font-size: var(--font-size-h2);
}
@media (min-width: 30em) {
.imageWrap {
margin-bottom: calc(var(--spacer) * 6);
}
.title {
font-size: var(--font-size-h1);
}
}
.description {
font-size: var(--font-size-base);
margin-bottom: calc(var(--spacer) * 2);
}
.meta {
margin-top: -2rem;
margin-bottom: calc(var(--spacer) * 5);
display: grid;
grid-template-columns: 1fr;
gap: calc(var(--spacer) * 2);
}
@media (min-width: 40em) {
.meta {
grid-template-columns: 2fr 3fr;
gap: calc(var(--spacer) * 2);
}
}
.metatitle {
font-size: var(--font-size-h3);
margin-bottom: calc(var(--spacer) * 1.5);
}
.metatitle span {
display: block;
margin-top: calc(var(--spacer) / 3);
font-size: var(--font-size-base);
font-family: var(--font-family-base);
color: var(--brand-grey-light);
}

View File

@ -1,49 +0,0 @@
@import 'variables';
@import '../components/atoms/ProjectImage.module';
.imageWrap {
margin-bottom: $spacer * 3;
@media (min-width: $screen-xs) {
margin-bottom: $spacer * 6;
}
}
.title {
font-size: $font-size-h2;
@media (min-width: $screen-xs) {
font-size: $font-size-h1;
}
}
.description {
font-size: $font-size-base;
margin-bottom: $spacer * 2;
}
.meta {
margin-top: -($spacer);
margin-bottom: $spacer * 5;
display: grid;
grid-template-columns: 1fr;
grid-gap: $spacer * 2;
@media (min-width: $screen-sm) {
grid-template-columns: 2fr 3fr;
grid-gap: $spacer * 2;
}
}
.metatitle {
font-size: $font-size-h3;
margin-bottom: $spacer * 1.5;
span {
display: block;
margin-top: $spacer / 3;
font-size: $font-size-base;
font-family: $font-family-base;
color: $brand-grey-light;
}
}

View File

@ -2,7 +2,7 @@ import React from 'react'
import { render } from '@testing-library/react'
import { createHistory, createMemorySource } from '@reach/router'
import Project from './Project'
import project from '../../jest/__fixtures__/project.json'
import project from '../../../jest/__fixtures__/project.json'
describe('Project', () => {
const history = createHistory(createMemorySource('/oceanprotocol'))

View File

@ -4,7 +4,7 @@ import { Link } from 'gatsby'
import giphyAPI from 'giphy-js-sdk-core'
import SEO from '../components/atoms/SEO'
import Button from '../components/atoms/Button'
import styles from './404.module.scss'
import styles from './404.module.css'
// Famous last words:
// "It's just the 404 page so why not expose the dev API key"

16
src/pages/404.module.css Normal file
View File

@ -0,0 +1,16 @@
.content {
text-align: center;
height: 100%;
max-width: 35rem;
margin-left: auto;
margin-right: auto;
}
.content video {
display: block;
width: auto;
height: 300px;
box-shadow: 0 3px 5px rgba(var(--brand-main), 0.15),
0 5px 16px rgba(var(--brand-main), 0.15);
margin: calc(var(--spacer) / 4) auto calc(var(--spacer) / 2) auto;
}

View File

@ -1,18 +0,0 @@
@import 'variables';
.content {
text-align: center;
height: 100%;
max-width: 35rem;
margin-left: auto;
margin-right: auto;
video {
display: block;
width: auto;
height: 300px;
box-shadow: 0 3px 5px rgba($brand-main, 0.15),
0 5px 16px rgba($brand-main, 0.15);
margin: $spacer / 4 auto $spacer / 2 auto;
}
}

View File

@ -4,7 +4,7 @@ import { Link, graphql } from 'gatsby'
import shortid from 'shortid'
import SEO from '../components/atoms/SEO'
import ProjectImage from '../components/atoms/ProjectImage'
import styles from './index.module.scss'
import styles from './index.module.css'
import Repositories from '../components/organisms/Repositories'
import Icon from '../components/atoms/Icon'

View File

@ -0,0 +1,81 @@
.projects {
display: grid;
grid-template-columns: 1fr;
gap: calc(var(--spacer) * 3);
max-width: calc(var(--projectImageMaxWidth) + var(--spacer) * 2);
margin: 0 auto;
padding-left: var(--spacer);
padding-right: var(--spacer);
}
@media (min-width: 30rem) {
.projects {
grid-template-columns: repeat(auto-fit, minmax(25rem, 1fr));
}
}
.title {
font-size: var(--font-size-h4);
opacity: 0;
position: absolute;
top: 15%;
left: 0;
margin: 0;
z-index: 2;
padding: calc(var(--spacer) / 3) var(--spacer);
color: #fff !important;
background: var(--brand-cyan);
transform: translate3d(0, -1rem, 0);
transition: transform 0.2s ease-out;
}
.project {
position: relative;
}
.project a {
display: block;
position: relative;
}
.project a::after {
content: '';
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
z-index: 1;
background: transparent;
transition: background 0.2s ease-out;
}
.project a:hover::after,
.project a:focus::after {
background: rgba(var(--brand-cyan), 0.05);
}
.project a:hover .title,
.project a:focus .title,
.project a:hover .imageCount,
.project a:focus .imageCount {
opacity: 1;
transform: translate3d(0, 0, 0);
}
.imageCount {
position: absolute;
bottom: 5%;
right: 2%;
color: var(--brand-cyan);
font-size: var(--font-size-small);
z-index: 10;
opacity: 0;
transform: translate3d(0, calc(var(--spacer) / 2), 0);
transition: transform 0.25s ease-out;
}
.imageCount svg {
width: var(--font-size-base);
height: var(--font-size-base);
}

View File

@ -1,84 +0,0 @@
@import 'variables';
.projects {
display: grid;
grid-template-columns: 1fr;
grid-gap: $spacer * 3;
@media (min-width: $screen-md) {
grid-template-columns: 1fr 1fr;
max-width: calc(#{$projectImageMaxWidth} + #{$spacer * 2});
margin: 0 auto;
padding: $spacer $spacer * 3;
}
}
.title {
font-size: $font-size-h4;
opacity: 0;
position: absolute;
top: 15%;
left: 0;
margin: 0;
z-index: 2;
padding: $spacer / 3 $spacer;
background: rgba($brand-cyan, 0.9);
transform: translate3d(0, -1rem, 0);
transition: transform 0.2s ease-out;
}
.project {
position: relative;
a {
display: block;
position: relative;
&::after {
content: '';
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
z-index: 1;
background: transparent;
transition: background 0.2s ease-out;
}
&:hover,
&:focus {
&::after {
background: rgba($brand-cyan, 0.05);
}
.title {
opacity: 1;
color: #fff;
transform: translate3d(0, 0, 0);
}
.imageCount {
opacity: 1;
transform: translate3d(0, 0, 0);
}
}
}
}
.imageCount {
position: absolute;
bottom: 5%;
right: 2%;
color: $brand-cyan;
font-size: $font-size-small;
z-index: 10;
opacity: 0;
transform: translate3d(0, $spacer / 2, 0);
transition: transform 0.25s ease-out;
svg {
width: $font-size-base;
height: $font-size-base;
}
}

View File

@ -2,7 +2,7 @@ import React from 'react'
import shortid from 'shortid'
import { useResume } from '../../hooks/use-resume'
import Icon from '../../components/atoms/Icon'
import styles from './Header.module.scss'
import styles from './Header.module.css'
export default function Header() {
const { basics, languages } = useResume()

View File

@ -0,0 +1,57 @@
.title {
font-size: var(--font-size-h2);
margin-bottom: calc(var(--spacer) / 4);
}
@media print {
.title {
margin-bottom: 0;
}
}
.label {
font-size: var(--font-size-h3);
color: var(--text-color);
margin-bottom: 0;
}
.contact {
list-style: none;
padding: 0;
}
.contact li,
.contact p {
margin-bottom: calc(var(--spacer) / 4);
}
.contact svg {
stroke: var(--text-color-light);
margin-right: calc(var(--spacer) / 4);
margin-bottom: -0.1rem;
}
@media (min-width: 60em) {
.contact {
margin-top: calc(var(--spacer) * 2.25);
}
}
.languages svg {
display: inline-block;
}
.languages p {
margin-left: calc(var(--spacer) / 1.1);
}
.languages p:first-of-type {
margin-left: 0;
display: inline-block;
}
.languages span {
font-size: var(--font-size-small);
margin-left: calc(var(--spacer) / 4);
color: var(--text-color-light);
}

View File

@ -1,69 +0,0 @@
@import 'variables';
.title {
font-size: $font-size-h2;
margin-bottom: $spacer / 4;
@media print {
margin-bottom: 0;
}
}
.label {
font-size: $font-size-h3;
color: $brand-grey-light;
margin-bottom: 0;
:global(.dark) & {
color: $brand-grey-dimmed;
}
}
.contact {
list-style: none;
padding: 0;
li,
p {
margin-bottom: $spacer / 4;
}
svg {
stroke: $brand-grey-light;
margin-right: $spacer / 4;
margin-bottom: -0.1rem;
:global(.dark) & {
stroke: $brand-grey;
}
}
@media (min-width: $screen-md) {
margin-top: $spacer * 2.25;
}
}
.languages {
svg {
display: inline-block;
}
p {
margin-left: $spacer / 1.1;
&:first-of-type {
margin-left: 0;
display: inline-block;
}
}
span {
font-size: $font-size-small;
margin-left: $spacer / 4;
color: $brand-grey-light;
:global(.dark) & {
color: $brand-grey;
}
}
}

View File

@ -5,7 +5,7 @@ import remark2react from 'remark-react'
import parse from 'remark-parse'
import html from 'remark-html'
import breaks from 'remark-breaks'
import styles from './ResumeItem.module.scss'
import styles from './ResumeItem.module.css'
const markdownOutput = text =>
remark()

View File

@ -0,0 +1,66 @@
.resumeItem {
padding-bottom: calc(var(--spacer) * 3);
padding-left: var(--spacer);
position: relative;
border-left: 0.1rem solid var(--text-color-light);
}
.resumeItem::before {
content: '';
display: block;
width: var(--font-size-mini);
height: var(--font-size-mini);
border-radius: 50%;
background: var(--color-headings);
border: 0.1rem solid var(--color-headings);
position: absolute;
left: -0.4rem;
top: 0.4rem;
}
.resumeItem:last-child {
border: none;
}
.resumeItem p:last-child {
margin-bottom: 0;
}
.title {
margin-bottom: calc(var(--spacer) / 3);
font-size: var(--font-size-h4);
}
.subTitle {
color: var(--text-color-light);
font-size: var(--font-size-h5);
}
.time {
display: block;
margin-bottom: calc(var(--spacer) / 2);
white-space: nowrap;
font-style: italic;
}
@media (min-width: 60em) {
.time {
text-align: right;
position: absolute;
top: -0.3rem;
right: 105%;
}
}
@media print {
.resumeItem {
padding-bottom: calc(var(--spacer) * 2);
}
.time {
text-align: left;
position: relative;
top: auto;
right: auto;
}
}

View File

@ -1,77 +0,0 @@
@import 'variables';
.resumeItem {
padding-bottom: $spacer * 3;
padding-left: $spacer;
position: relative;
border-left: 0.1rem solid rgba($brand-grey-light, 0.25);
&::before {
content: '';
display: block;
width: $font-size-mini;
height: $font-size-mini;
border-radius: 50%;
background: $body-background-color;
border: 0.1rem solid $color-headings;
position: absolute;
left: -($font-size-mini / 1.8);
top: 0.15rem;
:global(.dark) & {
background: $body-background-color--dark;
border-color: $color-headings--dark;
}
}
p:last-child {
margin-bottom: 0;
}
&:last-child {
border: none;
}
}
.title {
margin-bottom: $spacer / 3;
font-size: $font-size-h4;
position: relative;
top: -($spacer / 6);
}
.subTitle {
color: $brand-grey-light;
font-size: $font-size-h5;
:global(.dark) & {
color: $brand-grey-dimmed;
}
}
.time {
display: block;
margin-bottom: $spacer / 2;
white-space: nowrap;
font-style: italic;
@media (min-width: $screen-md) {
text-align: right;
position: absolute;
top: -0.3rem;
right: 105%;
}
}
@media print {
.resumeItem {
padding-bottom: $spacer * 2;
}
.time {
text-align: left;
position: relative;
top: auto;
right: auto;
}
}

View File

@ -3,7 +3,7 @@ import shortid from 'shortid'
import SEO from '../../components/atoms/SEO'
import Icon from '../../components/atoms/Icon'
import { useResume } from '../../hooks/use-resume'
import styles from './index.module.scss'
import styles from './index.module.css'
import Header from './Header'
import ResumeItem from './ResumeItem'

View File

@ -0,0 +1,48 @@
.resume {
padding: var(--spacer);
display: grid;
grid-gap: calc(var(--spacer) * 4);
grid-template-columns: 1fr;
}
@media (min-width: 60em) {
.resume {
grid-template-columns: 1fr 2fr;
max-width: calc(var(--projectImageMaxWidth) + var(--spacer) * 2);
margin: 0 auto;
padding: var(--spacer) calc(var(--spacer) * 3);
}
}
.subTitle {
font-size: var(--font-size-h3);
margin-bottom: 0;
margin-top: -(calc(var(--spacer) / 3));
}
.subTitle svg {
width: var(--font-size-large);
height: var(--font-size-large);
margin-right: calc(var(--spacer) / 4);
stroke: var(--brand-grey-light);
}
@media print {
:global(html) {
font-size: 8pt;
}
:global(body) {
background: #fff !important;
margin: 1cm;
}
p {
color: silver;
}
.resume {
grid-template-columns: 1fr;
max-width: 100%;
}
}

View File

@ -1,47 +0,0 @@
@import 'variables';
.resume {
padding: $spacer;
display: grid;
grid-gap: $spacer * 4;
grid-template-columns: 1fr;
@media (min-width: $screen-md) {
grid-template-columns: 1fr 2fr;
max-width: calc(#{$projectImageMaxWidth} + #{$spacer * 2});
margin: 0 auto;
padding: $spacer $spacer * 3;
}
}
.subTitle {
font-size: $font-size-h3;
margin-bottom: 0;
margin-top: -($spacer / 3);
svg {
width: $font-size-large;
height: $font-size-large;
margin-right: $spacer / 4;
stroke: $brand-grey-light;
}
}
@media print {
:global(html) {
font-size: 8pt;
}
body {
background: #fff !important;
margin: 1cm 1.5cm;
}
p {
color: silver;
}
.resume {
grid-template-columns: 1fr;
}
}

61
src/styles/_variables.css Normal file
View File

@ -0,0 +1,61 @@
:root {
/* Colors */
--brand-main: #015565;
--brand-cyan: #43a699;
--brand-main-light: #88bec8;
--brand-light: #e7eef4;
--brand-grey: #4e5d63;
--brand-grey-light: #70858e;
--brand-grey-dimmed: #97abb3;
/* Backgrounds */
--body-background-color: var(--brand-light);
--box-background-color: rgba(255, 255, 255, 0.2);
/* Text Colors */
--text-color: var(--brand-grey);
--text-color-light: var(--brand-grey-light);
--color-headings: var(--brand-main);
/* Typography */
--font-size-root: 18px;
--font-size-base: 1rem;
--font-size-large: 1.2rem;
--font-size-small: 0.8rem;
--font-size-mini: 0.7rem;
--font-size-h1: 2.5rem;
--font-size-h2: 2rem;
--font-size-h3: 1.65rem;
--font-size-h4: 1.45rem;
--font-size-h5: var(--font-size-large);
--font-size-h6: var(--font-size-base);
--line-height: 1.6;
--line-height-small: 1.1428571429;
--font-family-base: 'ff-tisa-sans-web-pro', 'Trebuchet MS', 'Helvetica Neue',
'Helvetica', 'Arial', 'sans-serif';
--font-weight-base: 400;
--font-family-monospace: 'Menlo', 'Monaco', 'Consolas', 'Courier New',
'monospace';
--font-family-headings: 'brandon-grotesque', 'Avenir Next', 'Helvetica Neue',
'Helvetica', 'Arial', 'sans-serif';
--font-weight-headings: 400;
--line-height-headings: 1.1;
/* Components spacing */
--spacer: 1.5rem;
--border-radius: 0.25rem;
/* Miscellanious */
--projectImageMaxWidth: 1200px;
--easing: cubic-bezier(0.75, 0, 0.08, 1);
--box-shadow: 0 3px 5px rgba(0, 0, 0, 0.05), 0 5px 16px rgba(0, 0, 0, 0.05);
}
.dark {
--text-color: #7e9199;
--text-color-light: var(--brand-grey);
--color-headings: var(--brand-main-light);
--body-background-color: #1d2224;
--box-background-color: rgba(255, 255, 255, 0.03);
--box-shadow: 0 3px 5px rgba(0, 0, 0, 0.25), 0 5px 16px rgba(0, 0, 0, 0.25);
}

View File

@ -1,79 +0,0 @@
$projectImageMaxWidth: 1200px;
$easing: cubic-bezier(0.75, 0, 0.08, 1);
// Colors
/////////////////////////////////////
$brand-main: #015565;
$brand-cyan: #43a699;
$brand-main-light: #88bec8;
$brand-light: #e7eef4;
$brand-grey: #4e5d63;
$brand-grey-light: lighten($brand-grey, 15%);
$brand-grey-dimmed: lighten($brand-grey, 50%);
// Backgrounds
/////////////////////////////////////
$body-background-color: $brand-light;
$body-background-color--dark: darken($brand-grey, 22%);
// Text Colors
/////////////////////////////////////
$text-color: $brand-grey;
$text-color-light: $brand-grey-light;
$text-color--dark: lighten($brand-grey-light, 5%);
$text-color-light--dark: lighten($brand-grey-light, 5%);
// Typography
/////////////////////////////////////
$font-size-root: 18px;
$font-size-base: 1rem;
$font-size-large: 1.2rem;
$font-size-small: 0.8rem;
$font-size-mini: 0.7rem;
$font-size-h1: 2.5rem;
$font-size-h2: 2rem;
$font-size-h3: 1.65rem;
$font-size-h4: 1.45rem;
$font-size-h5: $font-size-large;
$font-size-h6: $font-size-base;
$line-height: 1.5;
$line-height-small: 1.1428571429;
$font-family-base: 'ff-tisa-sans-web-pro', 'Trebuchet MS', 'Helvetica Neue',
'Helvetica', 'Arial', 'sans-serif';
$font-weight-base: 400;
$font-color-base: $text-color;
$font-family-monospace: 'Menlo', 'Monaco', 'Consolas', 'Courier New',
'monospace';
$font-family-headings: 'brandon-grotesque', 'Avenir Next', 'Helvetica Neue',
'Helvetica', 'Arial', 'sans-serif';
$font-weight-headings: 400;
$line-height-headings: 1.1;
$color-headings: $brand-main;
$color-headings--dark: $brand-main-light;
// Components spacing
/////////////////////////////////////
$spacer: ($font-size-base * $line-height);
$border-radius: 0.25rem;
// Responsive breakpoints
/////////////////////////////////////
$screen-xs: 30em;
$screen-sm: 40em;
$screen-md: 60em;
$screen-lg: 70em;

105
src/styles/global.css Normal file
View File

@ -0,0 +1,105 @@
@import '_variables.css';
*,
*::before,
*::after {
box-sizing: border-box;
}
html,
body {
margin: 0;
padding: 0;
}
html {
font-size: var(--font-size-root);
background: var(--body-background-color);
}
body {
font-family: var(--font-family-base);
font-weight: var(--font-weight-base);
font-size: var(--font-size-base);
line-height: var(--line-height);
color: var(--text-color);
text-rendering: optimizeLegibility;
font-feature-settings: 'liga', 'kern';
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
min-height: 100vh;
background: var(--body-background-color);
transition: background 0.2s var(--easing);
}
p,
ul,
ol {
margin: 0 0 var(--spacer);
}
/* Headings */
h1 {
font-size: var(--font-size-h1);
}
h2 {
font-size: var(--font-size-h2);
}
h3 {
font-size: var(--font-size-h3);
}
h4 {
font-size: var(--font-size-h4);
}
h5 {
font-size: var(--font-size-h5);
}
h6 {
font-size: var(--font-size-h6);
}
h1,
h2,
h3,
h4,
h5,
h6 {
font-family: var(--font-family-headings);
line-height: var(--line-height-headings);
color: var(--color-headings);
font-weight: var(--font-weight-headings);
margin: 0 0 var(--spacer);
}
/* Links */
a {
color: var(--brand-cyan);
text-decoration: none;
transition: 0.2s ease-out;
}
a:hover,
a:focus {
color: #5ebeb1;
}
/* Media */
img,
video,
svg {
max-width: 100%;
height: auto;
margin: 0;
}
#___gatsby {
display: flex;
min-height: 100vh;
flex-direction: column;
}

View File

@ -1,119 +0,0 @@
@import 'variables';
*,
*::before,
*::after {
box-sizing: border-box;
}
html,
body {
margin: 0;
padding: 0;
}
html {
font-size: $font-size-root;
background: $body-background-color;
}
body {
font-family: $font-family-base;
font-weight: $font-weight-base;
font-size: $font-size-base;
line-height: $line-height;
color: $font-color-base;
text-rendering: optimizeLegibility;
font-feature-settings: 'liga', 'kern';
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
min-height: 100vh;
background: $body-background-color;
transition: background 0.2s $easing;
&.dark {
background-color: $body-background-color--dark;
color: $text-color--dark;
}
}
p,
ul,
ol {
margin: 0 0 $spacer;
}
// Headings
/////////////////////////////////////
h1 {
font-size: $font-size-h1;
}
h2 {
font-size: $font-size-h2;
}
h3 {
font-size: $font-size-h3;
}
h4 {
font-size: $font-size-h4;
}
h5 {
font-size: $font-size-h5;
}
h6 {
font-size: $font-size-h6;
}
h1,
h2,
h3,
h4,
h5,
h6 {
font-family: $font-family-headings;
line-height: $line-height-headings;
color: $color-headings;
font-weight: $font-weight-headings;
margin: 0 0 $spacer;
.dark & {
color: $color-headings--dark;
}
}
// Links
/////////////////////////////////////
a {
color: $brand-cyan;
text-decoration: none;
transition: 0.2s ease-out;
&:hover,
&:focus {
color: lighten($brand-cyan, 10%);
}
}
// Media
/////////////////////////////////////
img,
video,
svg {
max-width: 100%;
height: auto;
margin: 0;
}
#___gatsby {
display: flex;
min-height: 100vh;
flex-direction: column;
}