diff --git a/README.md b/README.md
index 4862f5df..70553b3f 100644
--- a/README.md
+++ b/README.md
@@ -1,12 +1,6 @@
-[](https://heroku.com/deploy)
+# React Learning Example
-# React Tutorial
-
-This is the React comment box example from [the React tutorial](http://facebook.github.io/react/docs/tutorial.html).
-
-## To use
-
-There are several simple server implementations included. They all serve static files from `public/` and handle requests to `/api/comments` to fetch or add data. Start a server with one of the following:
+This is a example code that inheriented from React tutorial.
### Node
@@ -15,35 +9,6 @@ npm install
node server.js
```
-### Python
-
-```sh
-pip install -r requirements.txt
-python server.py
-```
-
-### Ruby
-```sh
-ruby server.rb
-```
-
-### PHP
-```sh
-php server.php
-```
-
-### Go
-```sh
-go run server.go
-```
-
-### Perl
-
-```sh
-cpan Mojolicious
-perl server.pl
-```
-
And visit . Try opening multiple tabs!
## Changing the port
diff --git a/chatRecords.json b/chatRecords.json
new file mode 100644
index 00000000..e358ac3f
--- /dev/null
+++ b/chatRecords.json
@@ -0,0 +1,23 @@
+[
+ {
+ "id": 1,
+ "name": "Pete Hunt",
+ "body": "Lorem ipsum dolor sit amet, id malorum perpetua has, id eum case appetere.",
+ "avatarURL": "https://avatars0.githubusercontent.com/u/5420789?v=3&s=460",
+ "selfChat": false
+ },
+ {
+ "id": 2,
+ "name": "Haoyu Hunt",
+ "body": "Tantas vituperata et pri, eu appareat inimicus eam",
+ "avatarURL": "https://avatars0.githubusercontent.com/u/5420789?v=3&s=460",
+ "selfChat": false
+ },
+ {
+ "id": 3,
+ "name": "Chen Hunt",
+ "body": "ius audiam voluptaria qualisque. Sed no feugait accusam. Et sed nostrud invidunt, duo tractatos deterruisset ei, nam in voluptua invenire",
+ "avatarURL": "https://avatars0.githubusercontent.com/u/5420789?v=3&s=460",
+ "selfChat": true
+ }
+]
\ No newline at end of file
diff --git a/comments.json b/comments.json
deleted file mode 100644
index 7bef77ad..00000000
--- a/comments.json
+++ /dev/null
@@ -1,12 +0,0 @@
-[
- {
- "id": 1388534400000,
- "author": "Pete Hunt",
- "text": "Hey there!"
- },
- {
- "id": 1420070400000,
- "author": "Paul O’Shannessy",
- "text": "React is *great*!"
- }
-]
diff --git a/public/css/base.css b/public/css/base.css
index bf382be3..bd50d25c 100644
--- a/public/css/base.css
+++ b/public/css/base.css
@@ -1,62 +1,137 @@
-body {
- background: #fff;
- font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
- font-size: 15px;
- line-height: 1.7;
- margin: 0;
- padding: 30px;
+.online-user-list {
+ border: 1px solid #c7b89e;
}
-
-a {
- color: #4183c4;
- text-decoration: none;
+.avatar-chat {
+ border: 2px solid #c7b89e;
+ display: inline-block;
}
-a:hover {
- text-decoration: underline;
+.avatar-chat,
+.avatar-chat img {
+ width: 30px;
+ height: 30px;
+ -webkit-border-radius: 30px;
+ /* Saf3+, Chrome */
+ border-radius: 30px;
+ /* Opera 10.5, IE 9 */
+ /*-moz-border-radius: 30px; Disabled for FF1+ */
}
-code {
- background-color: #f8f8f8;
- border: 1px solid #ddd;
- border-radius: 3px;
- font-family: "Bitstream Vera Sans Mono", Consolas, Courier, monospace;
- font-size: 12px;
- margin: 0 2px;
- padding: 0px 5px;
+/* Chat in Xlbock*/
+.chat-box {
+ font-family:'Helvetica Neue',Helvetica, sans-serif;
+ font-size:14px;
+ margin:0;
}
-h1, h2, h3, h4 {
- font-weight: bold;
- margin: 0 0 15px;
- padding: 0;
+.chat-container {
+ width:400px;
+ display:block;
+ margin:0 auto;
+ box-shadow:0 2px 5px rgba(0,0,0,0.4);
}
-h1 {
- border-bottom: 1px solid #ddd;
- font-size: 2.5em;
- font-weight: bold;
- margin: 0 0 15px;
- padding: 0;
+.chat-box, .enter-message{
+ background:#ECECEC;
+ padding:0 20px;
+ color:#a1a1a1;
}
-
-h2 {
- border-bottom: 1px solid #eee;
- font-size: 2em;
+.chat-box .message-box{
+ padding:18px 0 10px;
+ clear:both;
}
-
-h3 {
- font-size: 1.5em;
+.message-box .picture{
+ float:left;
+ width:50px;
+ display:block;
+ padding-right:10px;
+}
+.picture img{
+ width:43px;
+ height:48px;
+ border-radius:5px;
+}
+.picture span{
+ font-weight:bold;
+ font-size:12px;
+ clear:both;
+ display:block;
+ text-align:center;
+ margin-top:3px;
+}
+.message{
+ background:#fff;
+ display:inline-block;
+ padding:13px;
+ width:274px;
+ border-radius:2px;
+ box-shadow: 0 1px 1px rgba(0,0,0,.04);
+ position:relative;
+}
+.message:before{
+ content:"";
+ position:absolute;
+ display:block;
+ left:0;
+ border-right:6px solid #fff;
+ border-top: 6px solid transparent;
+ border-bottom:6px solid transparent;
+ top:10px;
+ margin-left:-6px;
+}
+.message span{
+ color:#555;
+ font-weight:bold;
+}
+.message p{
+ padding-top:5px;
+}
+.message-box.right-img .picture{
+ float:right;
+ padding:0;
+ padding-left:10px;
+}
+.message-box.right-img .picture img{
+ float:right;
+}
+.message-box.right-img .message:before{
+ left:100%;
+ margin-right:6px;
+ margin-left:0;
+ border-right:6px solid transparent;
+ border-left:6px solid #fff;
+ border-top: 6px solid transparent;
+ border-bottom:6px solid transparent;
}
-h4 {
- font-size: 1.2em;
+.avatar-chat {
+ display: inline-block;
}
-p, ul {
- margin: 15px 0;
+.avatar-chat,
+.avatar-chat img {
+ width: 40px;
+ height: 40px;
+ -webkit-border-radius: 40px;
+ /* Saf3+, Chrome */
+ border-radius: 40px;
+ /* Opera 10.5, IE 9 */
+ /*-moz-border-radius: 30px; Disabled for FF1+ */
}
-ul {
- padding-left: 30px;
+/*.enter-message{
+ padding:13px 0px;
+}
+.enter-message input{
+ border:none;
+ padding:10px 12px;
+ background:#d3d3d3;
+ width:260px;
+ border-radius:2px;
}
+.enter-message a.send{
+ padding:10px 15px;
+ background:#6294c2;
+ border-radius:2px;
+ float:right;
+}*/
\ No newline at end of file
diff --git a/public/index.html b/public/index.html
index c6494446..82637e06 100644
--- a/public/index.html
+++ b/public/index.html
@@ -13,10 +13,6 @@
-
-
+