This repository has been archived by the owner on Jun 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* JRW-137 chore: Updated browserlist * JRW-137 chore: A little bit of this, a bit of that.
- Loading branch information
1 parent
d9cd27f
commit e5e1b8f
Showing
31 changed files
with
323 additions
and
183 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
import React from 'react'; | ||
import React from 'react'; | ||
import { ThemeProvider } from './src/context/ThemeContext'; | ||
|
||
require('prismjs/plugins/line-numbers/prism-line-numbers.css'); | ||
require('prismjs/plugins/command-line/prism-command-line.css'); | ||
|
||
export const wrapRootElement = ({ element }) => ( | ||
export const wrapRootElement = ({ element }: any) => ( | ||
<ThemeProvider>{element}</ThemeProvider> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import React from "react" | ||
import {graphql, StaticQuery} from "gatsby"; | ||
|
||
export const CarbonFootprint = () => { | ||
return <StaticQuery | ||
query={graphql` | ||
query CarbonFootprintQuery { | ||
carbonFootprint { | ||
green | ||
cleanerThan | ||
timestamp | ||
statistics { | ||
adjustedBytes | ||
co2 { | ||
grid { | ||
grams | ||
litres | ||
} | ||
renewable { | ||
grams | ||
litres | ||
} | ||
} | ||
energy | ||
} | ||
} | ||
} | ||
`} | ||
render={data => { | ||
|
||
const { carbonFootprint } = data; | ||
|
||
const carbonFootprintInGrams = carbonFootprint.statistics.co2.grid.grams; | ||
const cleanerThan = carbonFootprint.cleanerThan; | ||
|
||
return ( | ||
<p> | ||
This website is estimated to produce <strong>{ carbonFootprintInGrams.toFixed(2) }g | ||
of CO2</strong>, <em>everytime</em> someone visits. Which is estimated to be cleaner | ||
than { cleanerThan * 100 }% of the internet, find out more with | ||
the <a | ||
href="https://www.websitecarbon.com/website/jamesrwilliams-ca/" | ||
target={'_blank'} | ||
rel={"noopener"} | ||
>Website Carbon Calculator</a>. | ||
</p> | ||
) | ||
}} | ||
/> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
import styled from "styled-components"; | ||
import {mediaQuery, textGradient} from "../../theme/variables"; | ||
import {OutboundLink} from "gatsby-plugin-google-analytics"; | ||
|
||
export const HeroWrapper = styled.div` | ||
position: relative; | ||
font-weight: 200; | ||
height: calc(100vh - 85px); | ||
display: flex; | ||
color: ${({theme}) => theme.headingColor}; | ||
align-items: center; | ||
background: ${({theme}) => theme.hero.background}; | ||
@media screen and ${mediaQuery.minMd} { | ||
height: calc(100vh - 55px); | ||
} | ||
.lead, | ||
.gradient { | ||
font-size: 25px; | ||
font-weight: 400; | ||
@media screen and ${mediaQuery.minMd} { | ||
font-size: 45px; | ||
} | ||
} | ||
.lead { | ||
margin-right: .7ch; | ||
font-weight: 200; | ||
transition: all 1s ease; | ||
margin-bottom: 1rem; | ||
} | ||
.intro { | ||
font-size: 16px; | ||
@media screen and ${mediaQuery.minMd} { | ||
max-width: 650px; | ||
font-size: 18px; | ||
padding-bottom: 2rem; | ||
} | ||
} | ||
.gradient { | ||
display: block; | ||
margin-top: 0; | ||
text-decoration: none; | ||
margin-bottom: 2rem; | ||
${textGradient} | ||
} | ||
`; | ||
|
||
export const StyledEmployerLink = styled(OutboundLink)` | ||
color: inherit; | ||
text-decoration: none; | ||
position: relative; | ||
overflow: hidden; | ||
&:after { | ||
content: ""; | ||
display: block; | ||
position: absolute; | ||
left: .1ch; | ||
right: .1ch; | ||
bottom: 0; | ||
height: 2px; | ||
background: linear-gradient(to right, #fff0, #fff0, #0ba7fd, #01d8d1); | ||
background-size: 300% 200%; | ||
transition: all 1s ease; | ||
} | ||
&:hover:after { | ||
background-position: 100% 0; | ||
} | ||
`; |
Oops, something went wrong.