김지훈

Modify : client desgin

...@@ -8,7 +8,8 @@ ...@@ -8,7 +8,8 @@
8 "dependencies": { 8 "dependencies": {
9 "axios": "^0.15.2", 9 "axios": "^0.15.2",
10 "react": "^15.3.2", 10 "react": "^15.3.2",
11 - "react-dom": "^15.3.2" 11 + "react-dom": "^15.3.2",
12 + "react-spinjs": "^3.0.0"
12 }, 13 },
13 "scripts": { 14 "scripts": {
14 "start": "react-scripts start", 15 "start": "react-scripts start",
......
...@@ -2,23 +2,10 @@ ...@@ -2,23 +2,10 @@
2 text-align: center; 2 text-align: center;
3 } 3 }
4 4
5 -.App-logo { 5 +.shorten {
6 - animation: App-logo-spin infinite 20s linear; 6 + margin-left: 10px;
7 - height: 80px; 7 + margin-right: 10px;
8 -} 8 + margin-bottom: 20px;
9 - 9 + font-size: 16px;
10 -.App-header { 10 + color : #555555;
11 - background-color: #222;
12 - height: 150px;
13 - padding: 20px;
14 - color: white;
15 -}
16 -
17 -.App-intro {
18 - font-size: large;
19 -}
20 -
21 -@keyframes App-logo-spin {
22 - from { transform: rotate(0deg); }
23 - to { transform: rotate(360deg); }
24 } 11 }
......
1 import React, { Component } from 'react'; 1 import React, { Component } from 'react';
2 -import logo from './logo.png';
3 import './App.css'; 2 import './App.css';
4 import axios from 'axios'; 3 import axios from 'axios';
4 +import ReactSpinner from 'react-spinjs';
5 +import Header from './Components/Header';
5 6
6 class App extends Component { 7 class App extends Component {
7 constructor(props){ 8 constructor(props){
8 super(props); 9 super(props);
9 this.state = { 10 this.state = {
10 - shorten : [] 11 + shorten : undefined
11 }; 12 };
12 13
13 this.fetchShorten = this.fetchShorten.bind(this); 14 this.fetchShorten = this.fetchShorten.bind(this);
...@@ -37,22 +38,26 @@ class App extends Component { ...@@ -37,22 +38,26 @@ class App extends Component {
37 printShorten() { 38 printShorten() {
38 if(this.state.shorten){ 39 if(this.state.shorten){
39 return ( 40 return (
40 - <div> 41 + <div className="shorten">
41 <p>1 : {this.state.shorten[0]}</p> 42 <p>1 : {this.state.shorten[0]}</p>
42 <p>2 : {this.state.shorten[1]}</p> 43 <p>2 : {this.state.shorten[1]}</p>
43 <p>3 : {this.state.shorten[2]}</p> 44 <p>3 : {this.state.shorten[2]}</p>
44 </div> 45 </div>
45 ); 46 );
47 + } else {
48 + return (
49 + <div>
50 + <ReactSpinner top="50%" left="50%"/>
51 + </div>
52 + );
46 } 53 }
47 } 54 }
48 55
49 render() { 56 render() {
57 +
50 return ( 58 return (
51 <div className="App"> 59 <div className="App">
52 - <div className="App-header"> 60 + <Header />
53 - <img src={logo} className="App-logo" alt="logo"/>
54 - <h2>Redesigned by 3Line</h2>
55 - </div>
56 <div className="App-intro"> 61 <div className="App-intro">
57 {this.printShorten()} 62 {this.printShorten()}
58 </div> 63 </div>
......
1 +.navbar {
2 + height : 50px;
3 + background-color: #F5C53A;
4 + box-shadow: 0px 2px 8px #AAAAAA;
5 +}
6 +
7 +.right {
8 + margin-right: 3%;
9 +}
10 +
11 +.left {
12 + margin-left: 3%;
13 +}
14 +
15 +ul {
16 + list-style-type: none;
17 + margin: 0;
18 + padding: 0;
19 +}
20 +
21 +li {
22 +
23 + width : 60px;
24 + height : 50px;
25 + vertical-align: middle;
26 + display: table-cell;
27 +}
28 +
29 +li a {
30 + text-decoration: none;
31 + color : black;
32 +}
33 +
34 +#logo {
35 + width : 42px;
36 + padding-top: 4px;
37 +}
38 +
39 +.right {
40 + top:0;
41 + right: 0;
42 +}
1 +import React, { Component, PropTypes } from 'react';
2 +import './Header.css';
3 +import logo from './logo.png';
4 +
5 +class Header extends React.Component {
6 + constructor(props) {
7 + super(props);
8 + }
9 +
10 + render() {
11 + return(
12 + <div>
13 + <div className="navbar">
14 + <ul id="nav-button">
15 + <li>
16 + <a href="#">
17 + <img id="logo" src={logo} />
18 + </a>
19 + </li>
20 + </ul>
21 +
22 + </div>
23 + </div>
24 + );
25 + }
26 +}
27 +
28 +export default Header;
...@@ -2,6 +2,7 @@ body { ...@@ -2,6 +2,7 @@ body {
2 margin: 0; 2 margin: 0;
3 padding: 0; 3 padding: 0;
4 font-family: sans-serif; 4 font-family: sans-serif;
5 - width : 400px; 5 + width : 430px;
6 min-height: 250px; 6 min-height: 250px;
7 + background-color: #EEEEEE;
7 } 8 }
......