Skip to content

Commit 73c65e2

Browse files
Malek Hakimlorensr
authored andcommitted
Redesign with the header on the left side, fixes #5 (#7)
* Redesign the layout vertically * Refactor: LogoLI component * Header :animate from left and center vertically * Fix right side styles * Style improvements, add iOS and Android logos
1 parent 751009f commit 73c65e2

File tree

6 files changed

+204
-150
lines changed

6 files changed

+204
-150
lines changed

components/SubscribeForm.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class SubscribeForm extends React.Component {
4747
return (
4848
<form
4949
style={{
50-
margin: '10px 0 40px 0',
50+
margin: '0 0 20px 0',
5151
display: 'flex',
5252
flexDirection: 'column',
5353
alignItems: 'center',

components/book-li.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { Component } from 'react'
1+
import React, { Component, PropTypes } from 'react'
22
import stylePropType from 'react-style-proptype'
33

44
import Emoji from './emoji'
@@ -36,9 +36,9 @@ const BookLI = ({ style, children }) => {
3636

3737
BookLI.propTypes = {
3838
style: stylePropType,
39-
children: React.PropTypes.oneOfType([
40-
React.PropTypes.element,
41-
React.PropTypes.string,
39+
children: PropTypes.oneOfType([
40+
PropTypes.element,
41+
PropTypes.string,
4242
]).isRequired,
4343
}
4444

components/emoji.js

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
// https://developer.github.com/v3/emojis/
22
// http://www.webpagefx.com/tools/emoji-cheat-sheet/
3-
import React from 'react'
3+
import { PropTypes } from 'react'
4+
import stylePropType from 'react-style-proptype'
45

5-
const Emoji = ({ name, size, ...props }) => {
6+
const Emoji = ({ name, size, style, ...props }) => {
67
const src = `https://github.global.ssl.fastly.net/images/icons/emoji/${name}.png?v5`
78

89
return (
@@ -12,6 +13,7 @@ const Emoji = ({ name, size, ...props }) => {
1213
style={{
1314
width: size,
1415
height: size,
16+
...style,
1517
}}
1618
className="emoji"
1719
{...props}
@@ -21,13 +23,15 @@ const Emoji = ({ name, size, ...props }) => {
2123

2224
Emoji.defaultProps = {
2325
size: '1.5em',
26+
style: {},
2427
}
2528

2629
Emoji.propTypes = {
27-
name: React.PropTypes.string.isRequired,
28-
size: React.PropTypes.oneOfType([
29-
React.PropTypes.string,
30-
React.PropTypes.number,
30+
name: PropTypes.string.isRequired,
31+
style: stylePropType,
32+
size: PropTypes.oneOfType([
33+
PropTypes.string,
34+
PropTypes.number,
3135
]),
3236
}
3337

components/logo-li.js

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import { PropTypes } from 'react'
2+
3+
const LogoLI = ({ name, children }) => (
4+
<div
5+
style={{
6+
display: 'flex',
7+
flexDirection: 'column',
8+
alignItems: 'center',
9+
textAlign: 'center',
10+
padding: 20,
11+
borderRadius: 20,
12+
}}
13+
className="logo"
14+
>
15+
<div className="svg-wrapper">
16+
{children}
17+
</div>
18+
<div
19+
style={{
20+
color: '#737373',
21+
marginTop: 10,
22+
}}
23+
>
24+
{name}
25+
</div>
26+
</div>
27+
)
28+
29+
30+
LogoLI.propTypes = {
31+
name: PropTypes.string.isRequired,
32+
children: PropTypes.oneOfType([
33+
PropTypes.element,
34+
PropTypes.string,
35+
]).isRequired,
36+
}
37+
38+
export default LogoLI

css/raw.js

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,16 +50,22 @@ a:hover {
5050
fill: ${white};
5151
}
5252
53-
.logo-collection > .logo {
54-
position: relative;
55-
width: 150px;
56-
height: 150px;
53+
#apple-logo * {
54+
fill: #aaaaaa;
55+
}
56+
57+
.logo-collection .svg-wrapper {
58+
width: 100px;
59+
height: 100px;
5760
}
58-
.logo-collection > .logo > svg {
61+
.logo-collection svg {
5962
width: 100%;
6063
height: 100%;
6164
}
62-
.logo-collection > .logo:hover > svg {
65+
.logo-collection > .logo:hover {
66+
background-color: white;
67+
}
68+
.logo-collection > .logo:hover svg {
6369
animation: spin 3s linear infinite;
6470
}
6571
@keyframes spin {
@@ -112,6 +118,9 @@ a.-grey:hover {
112118
-webkit-transform: scale(1.3);
113119
transform: scale(1.3);
114120
}
121+
.hvr-grow-shadow:hover {
122+
background-color: white;
123+
}
115124
116125
.hvr-float-shadow {
117126
display: inline-block;

0 commit comments

Comments
 (0)