Skip to content

Commit dda1dd0

Browse files
committed
Add animations, adjust style
1 parent 256d947 commit dda1dd0

31 files changed

+20901
-68
lines changed

.eslintrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"arrow-body-style": 0,
1212
"react/jsx-filename-extension": 0,
1313
"react/react-in-jsx-scope": 0,
14-
"react/jsx-closing-bracket-location": [1, "props-aligned"]
14+
"react/jsx-closing-bracket-location": [1, "props-aligned"],
15+
"react/no-find-dom-node": 0
1516
}
1617
}

components/delay.js

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import { Component, PropTypes } from 'react'
2+
3+
class Delay extends Component {
4+
static propTypes = {
5+
children: PropTypes.func.isRequired,
6+
ms: PropTypes.number.isRequired, // eslint-disable-line
7+
initial: PropTypes.bool.isRequired,
8+
}
9+
10+
state = {
11+
value: this.props.initial,
12+
}
13+
14+
componentDidMount() {
15+
this.refresh(this.props)
16+
}
17+
18+
componentWillReceiveProps(props) {
19+
this.refresh(props)
20+
}
21+
22+
refresh({ value, ms }) {
23+
setTimeout(() => this.setState({
24+
value,
25+
}), ms)
26+
}
27+
28+
render() {
29+
return this.props.children(this.state.value)
30+
}
31+
}
32+
33+
export default Delay

components/email.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,16 @@ export default class Email extends Component {
131131
}
132132
}
133133

134+
componentDidMount() {
135+
console.log(this.props, this.textHanlder)
136+
if (this.props.autoFocus) {
137+
// textHandler is undefined at time of mounting
138+
setTimeout(() => {
139+
this.textHandler.focus()
140+
}, 1000)
141+
}
142+
}
143+
134144
// https://github.com/callemall/material-ui/issues/705
135145
render() {
136146
return (

css/raw.js

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
1-
import { fontFamily, color } from '../lib/styles'
1+
import { grey200 } from 'material-ui/styles/colors'
2+
3+
import { fontFamily, color, white, black, grey } from '../lib/styles'
4+
5+
const background = '#f2f2f2'
26

37
export default `
48
body {
59
font-family: ${fontFamily};
6-
color: #333;
10+
color: ${black};
11+
background-color: ${background};
712
font-size: 18px;
813
line-height: 1.7;
914
}
@@ -30,14 +35,16 @@ a:hover {
3035
position: absolute;
3136
border: 1px solid #f3f3f3;
3237
pointer-events: none;
38+
z-index: 1;
39+
will-change: opacity, transform;
3340
}
3441
3542
#logo > svg {
3643
width: 200px;
3744
height: 200px;
3845
}
3946
#logo > svg * {
40-
fill: #f2f2f2;
47+
fill: ${white};
4148
}
4249
4350
.logo-collection > svg {
@@ -54,4 +61,18 @@ a:hover {
5461
.st2 {
5562
fill:#FFFFFF;
5663
}
64+
65+
svg.twitter {
66+
width: 30px;
67+
height: 30px;
68+
margin-left: 6px;
69+
}
70+
svg.twitter * {
71+
fill: ${grey};
72+
}
73+
74+
a.-grey:hover {
75+
text-decoration: none;
76+
color: ${grey200};
77+
}
5778
`

lib/muitheme.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,16 @@ import React from 'react'
22
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider'
33
import getMuiTheme from 'material-ui/styles/getMuiTheme'
44

5-
import { fontFamily, color } from './styles'
5+
import { fontFamily, color, white } from './styles'
66

77
// overwrite anything in:
88
// https://github.com/callemall/material-ui/blob/master/src/styles/baseThemes/lightBaseTheme.js
99
const muiTheme = getMuiTheme({
1010
fontFamily,
1111
palette: {
1212
primary1Color: color,
13+
alternateTextColor: white,
14+
canvasColor: white,
1315
},
1416
})
1517

lib/styles.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
// import { cyan500 } from 'material-ui/styles/colors'
1+
import { darkBlack, grey400 } from 'material-ui/styles/colors'
22

33
export const fontFamily = 'Roboto, sans-serif'
44
// export const fontFamily = '"Helvetica Neue", Helvetica, Arial, sans-serif'
5-
export const white = '#f2f2f2'
5+
export const white = '#f9f9f9'
66
export const color = '#E10098'
7+
export const black = darkBlack
8+
export const grey = grey400

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,12 @@
2626
"graphql": "^0.8.2",
2727
"graphql-server-express": "^0.4.4",
2828
"graphql-tools": "^0.9.0",
29+
"gsap": "^1.19.1",
2930
"lodash": "^4.17.4",
3031
"material-ui": "^0.16.6",
3132
"next": "^2.0.0-beta",
3233
"react": "^15.4.2",
34+
"react-dom": "^15.4.2",
3335
"react-email-autocomplete": "^1.0.2",
3436
"react-motion": "^0.4.7",
3537
"react-style-proptype": "^1.4.0",

0 commit comments

Comments
 (0)