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 1 commit
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
Prev Previous commit
Next Next commit
Add Cards, Card, and CardHeadline components; tidy moar
* remove Diagram "Deploy" icon for now
* tidy webpack.svg
* make use of presets.radius, brand colors
* tidy Diagram, Masthead and presets moar
* add gutters component, can't make rhythm work in utils/presets.js
  • Loading branch information
Florian Kissling committed Jul 25, 2017
commit 8e85004d83a8a8b7d1538bbd9d29319dc4772650
1 change: 0 additions & 1 deletion www/src/assets/logos.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@ export JSIcon from "./js.svg"
export GraphQLIcon from "./graphql.svg"
export WebpackIcon from "./webpack.svg"
export ReactJSIcon from "./react.svg"
export StaticWebHostIcon from "./static-web-host.svg"
29 changes: 0 additions & 29 deletions www/src/assets/static-web-host.svg

This file was deleted.

11 changes: 3 additions & 8 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
2 changes: 1 addition & 1 deletion www/src/components/cta-button.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const CtaButton = ({ to, overrideCSS, children }) =>
display: `inline-block`,
fontFamily: options.headerFontFamily.join(`,`),
padding: `${rhythm(1 / 3)} ${rhythm(1 / 2)}`,
borderRadius: `3px`,
borderRadius: presets.radius,
// Increase specificity
[presets.Tablet]: {
...scale(2 / 5),
Expand Down
Loading