Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[www] Refactor Homepage and Navigation & convert diagram to html/css #1605

Merged
merged 21 commits into from
Jul 27, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed www/src/argyle.png
Binary file not shown.
21 changes: 21 additions & 0 deletions www/src/assets/graphql.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions www/src/assets/js.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions www/src/assets/logos.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export JSIcon from "./js.svg"
export GraphQLIcon from "./graphql.svg"
export WebpackIcon from "./webpack.svg"
export ReactJSIcon from "./react.svg"
11 changes: 11 additions & 0 deletions www/src/assets/react.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions www/src/assets/webpack.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions www/src/components/card-headline.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import presets from "../utils/presets"
import { rhythm, scale, options } from "../utils/typography"

const CardHeadline = ({ children }) =>
<h2
css={{
...scale(2 / 5),
lineHeight: 1.2,
marginTop: 0,
[presets.Tablet]: {
fontSize: scale(1 / 10).fontSize,
},
[presets.Desktop]: {
fontSize: scale(3 / 10).fontSize,
},
[presets.VHd]: {
fontSize: scale(5 / 10).fontSize,
},
[presets.VVHd]: {
fontSize: scale(7 / 10).fontSize,
},
}}
>
{children}
</h2>

export default CardHeadline
57 changes: 57 additions & 0 deletions www/src/components/card.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
import presets from "../utils/presets"
import { rhythm, scale, options } from "../utils/typography"
import { vP, vPHd, vPVHd, vPVVHd } from "../components/gutters"

const Card = ({ children }) =>
<div
css={{
boxSizing: `border-box`,
display: `flex`,
[presets.Tablet]: {
flex: `0 0 50%`,
maxWidth: `50%`,
boxShadow: `0 1px 0 0 ${presets.veryLightPurple}`,
"&:nth-child(5),&:nth-child(6)": {
boxShadow: `none`,
},
"&:nth-child(2n)": {
borderLeft: `1px solid ${presets.veryLightPurple}`,
},
},
[presets.Hd]: {
flex: `0 0 33.33333333%`,
maxWidth: `33.33333333%`,
borderLeft: `1px solid ${presets.veryLightPurple}`,
"&:nth-child(4)": {
boxShadow: `none`,
},
"&:nth-child(3n+1)": {
borderLeft: 0,
},
},
}}
>
<div
css={{
padding: rhythm(presets.gutters.default / 2),
paddingBottom: 0,
[presets.Mobile]: {
padding: vP,
paddingBottom: 0,
},
[presets.Phablet]: {
padding: vP,
},
[presets.VHd]: {
padding: vPHd,
},
[presets.VVHd]: {
padding: vPVHd,
},
}}
>
{children}
</div>
</div>

export default Card
19 changes: 19 additions & 0 deletions www/src/components/cards.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import presets from "../utils/presets"
import { rhythm, scale, options } from "../utils/typography"
import { vP, vPHd, vPVHd, vPVVHd } from "../components/gutters"

const Cards = ({ children }) =>
<div
css={{
display: `flex`,
flex: `0 1 auto`,
flexWrap: `wrap`,
background: `rgba(255, 255, 255, 0.975)`,
borderRadius: presets.radiusLg,
boxShadow: `0 5px 20px rgba(25, 17, 34, 0.1)`,
}}
>
{children}
</div>

export default Cards
51 changes: 51 additions & 0 deletions www/src/components/cta-button.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import Link from "gatsby-link"
import { rhythm, scale, options } from "../utils/typography"
import presets from "../utils/presets"

import { css } from "glamor"

let stripeAnimation = css.keyframes({
"0%": { backgroundPosition: `0 0` },
"100%": { backgroundPosition: `30px 60px` },
})

const CtaButton = ({ to, overrideCSS, children }) =>
<Link
css={{
...overrideCSS,
...scale(1 / 5),
display: `inline-block`,
fontFamily: options.headerFontFamily.join(`,`),
padding: `${rhythm(1 / 3)} ${rhythm(1 / 2)}`,
borderRadius: presets.radius,
// Increase specificity
[presets.Phablet]: {
...scale(2 / 5),
padding: `${rhythm(1 / 2)} ${rhythm(1)}`,
},
"&&": {
border: `1px solid ${presets.brand}`,
boxShadow: `none`,
color: presets.brand,
backgroundColor: `transparent`,
backgroundSize: `30px 30px`,
transiton: `all .15s ease-out`,
":hover": {
backgroundSize: `30px 30px`,
backgroundColor: presets.brand,
backgroundImage: `linear-gradient(45deg, rgba(0,0,0, 0.1) 25%, transparent 25%, transparent 50%, rgba(0,0,0, 0.1) 50%, rgba(0,0,0, 0.1) 75%, transparent 75%, transparent)`,
color: `white`,
animation: `${stripeAnimation} 2.8s linear infinite`,
},
":after": {
content: ``,
display: `block`,
},
},
}}
to={to}
>
{children}
</Link>

export default CtaButton
Loading