Skip to content
This repository was archived by the owner on Nov 18, 2024. It is now read-only.

Commit ab4a363

Browse files
committed
reorganize folder
1 parent 49973b2 commit ab4a363

File tree

12 files changed

+90
-70
lines changed

12 files changed

+90
-70
lines changed

src/components/HomePage.js

Lines changed: 0 additions & 19 deletions
This file was deleted.

src/components/Navigation.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const Navigation = ({ className, buttonClassName }) => (
1111

1212
Navigation.defaultProps = {
1313
className: '',
14-
buttonClassName: 'mdl-button mdl-button--colored mdl-js-button mdl-js-ripple-effect'
14+
buttonClassName: 'c-button'
1515
}
1616

17-
export default Navigation
17+
export default Navigation

src/components/TodoPage.js

Lines changed: 0 additions & 17 deletions
This file was deleted.

src/components/WeatherPage.js

Lines changed: 0 additions & 11 deletions
This file was deleted.

src/pages/Home.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import React from 'react'
2+
import Card from '../components/Card'
3+
4+
const HomePage = () => {
5+
const content = {
6+
title: 'Material Design Lite',
7+
article:
8+
'lets you add a Material Design look and feel to your websites. It doesn’t rely on any JavaScript frameworks and aims to optimize for cross-device use, gracefully degrade in older browsers, and offer an experience that is immediately accessible. Get started now.'
9+
}
10+
11+
return (
12+
<Card title="Index">
13+
<strong>
14+
{content.title}
15+
</strong>
16+
<p>
17+
{content.article}
18+
</p>
19+
</Card>
20+
)
21+
}
22+
23+
export default HomePage

src/pages/Todo.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import React from 'react'
2+
import Card from '../components/Card'
3+
import TodoFooter from '../components/TodoFooter'
4+
import AddTodo from '../containers/AddTodo'
5+
import VisibleTodoList from '../containers/VisibleTodoList'
6+
7+
const TodoPage = () =>
8+
<div>
9+
<Card title="Redux Example - Todo List">
10+
<AddTodo />
11+
<VisibleTodoList />
12+
<TodoFooter />
13+
</Card>
14+
</div>
15+
16+
export default TodoPage

src/pages/Weather.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import React from 'react'
2+
import Weather from '../containers/Weather'
3+
4+
const WeatherPage = () =>
5+
<div>
6+
<h4>Weather Page</h4>
7+
<Weather />
8+
</div>
9+
10+
export default WeatherPage

src/routes.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
import React from 'react'
22
import { Route, IndexRoute } from 'react-router'
33
import App from './components/App'
4-
import HomePage from './components/HomePage'
5-
import TodoPage from './components/TodoPage'
6-
import WeatherPage from './components/WeatherPage'
4+
import Home from './pages/Home'
5+
import Todo from './pages/Todo'
6+
import Weather from './pages/Weather'
77

88
const routes = (
9-
<Route path="/" component={App}>
10-
<IndexRoute component={HomePage}/>
11-
<Route path="home" component={HomePage}/>
12-
<Route path="todo" component={TodoPage}/>
13-
<Route path="weather" component={WeatherPage}/>
14-
</Route>
9+
<Route path="/" component={App}>
10+
<IndexRoute component={Home} />
11+
<Route path="home" component={Home} />
12+
<Route path="todo" component={Todo} />
13+
<Route path="weather" component={Weather} />
14+
</Route>
1515
)
1616

1717
export default routes

src/styles/base/_typography.sass

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
* Typography Settings
44
-----------------------------*/
55
body
6-
//margin: 10px
6+
max-width: 800px
7+
margin: 0 auto
8+
border: solid 1px #eee
9+
box-sizing: border-box
710

811
h1, h2, h3, h4, h5, h6
912
text-align: center
@@ -14,7 +17,7 @@ label
1417
display: block
1518
a
1619
color: inherit
17-
20+
1821
input
1922
width: 100%
2023
height: 40px
@@ -26,7 +29,7 @@ input
2629
&[type="checkbox"]
2730
width: 10px
2831
height: 10px
29-
32+
3033
::-webkit-input-placeholder, :-moz-placeholder, ::-moz-placeholder, :-ms-input-placeholder
3134
color: #ccc
3235
input:focus
@@ -53,4 +56,4 @@ strong
5356
main
5457
width: 100%
5558
max-width: 600px
56-
margin: 0 auto
59+
margin: 0 auto

src/styles/components/_button.sass

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/* BEM naming: component - button */
2+
.c-button
3+
display: inline-block
4+
color:#888
5+
width: 100px
6+
height: 30px
7+
line-height: 30px
8+
border: solid 1px #ccc
9+
border-radius: 3px
10+
text-decoration: none
11+
margin: 0 10px
12+
background-color: #fff
13+
&:hover
14+
background-color: #ddd

0 commit comments

Comments
 (0)