-
Notifications
You must be signed in to change notification settings - Fork 0
/
day4.html
78 lines (71 loc) · 2.02 KB
/
day4.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Fullstackreact Tutorials Day 4</title>
<!-- Script tags including React -->
<script crossorigin src="https://unpkg.com/react@16/umd/react.production.min.js"></script>
<script crossorigin src="https://unpkg.com/react-dom@16/umd/react-dom.production.min.js"></script>
<script crossorigin src="https://unpkg.com/babel-standalone/babel.min.js"></script>
<!-- css -->
<link href="timeline.css" rel="stylesheet" type="text/css" />
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="demo">
<div id="app"></div>
</div>
<script type="text/babel">
{/* Header */}
class Header extends React.Component{
render(){
return(
<div className="header">
<div className="fa fa-more"></div>
<span className="title">Timeline</span>
<input type="text" className="searchInput" placeholder="Search ..."/>
<div className="fa fa-search searchIcon"></div>
</div>
)
}
}
{/* Content */}
class Content extends React.Component{
render(){
return(
<div className="content">
<div className="line"></div>
{/* Timeline item */}
<div className="item">
<div className="avatar">
<img src="http://www.croop.cl/UI/twitter/images/doug.jpg" alt="Doug" />
Doug
</div>
<span className="time">An hour ago</span>
<p>Ate lunch</p>
<div className="commentCount">2</div>
</div>
{/*...*/}
</div>
)
}
}
{/* container */}
class App extends React. Component{
render(){
return (
<div className="notificationsFrame">
<div className="panel">
{/* content goes here */}
<Header/>
<Content/>
</div>
</div>
)
}
}
var mount = document.querySelector('#app');
ReactDOM.render(<App/>,mount);
</script>
</body>
</html>