This commit is contained in:
King Wang
2021-06-11 16:34:18 +08:00
parent edca2a9bba
commit 69dd082dc8
23 changed files with 683 additions and 0 deletions

View File

@@ -0,0 +1,100 @@
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body>h1 {
text-align: center;
margin-top: 20px;
}
.app {
display: flex;
justify-content: center;
}
.chat-room {
display: flex;
flex-direction: column;
width: 460px;
height: 480px;
margin: 20px;
background: #f7f7f7;
border: 1px solid #454545;
border-radius: 5px;
overflow: hidden;
}
.chat-room>header {
background: #454545;
color: white;
text-align: center;
padding: 10px;
}
.send {
flex: 0 0 40px;
display: flex;
border-top: 1px solid #454545;
}
.send>* {
border: none;
outline: none;
height: 100%;
font-size: 16px;
}
.send>input {
flex: 1;
background: #fff;
padding: 0 10px;
}
.send>button {
flex: 0 0 100px;
background: #215fa4;
color: white;
cursor: pointer;
}
.send>button:hover {
background: #4b80bb;
}
.list {
flex: 1;
overflow-y: auto;
list-style: none;
border-radius: 5px;
padding: 10px;
padding-bottom: 20px;
background: #f2f2f2;
}
.list>li {
margin-bottom: 10px;
padding: 10px;
background: #fff;
line-height: 1.5em;
border-radius: 5px;
}
.list>li>.content {
font-size: 14px;
text-align: left;
white-space: pre-wrap;
word-wrap: break-word;
}
.list>li>.time {
font-size: 12px;
color: #4b80bb;
text-align: right;
}
.list>li:last-child {
border-bottom: none;
margin-bottom: 0;
}

View File

@@ -0,0 +1,37 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>TSRPC Browser</title>
<link rel="stylesheet" href="index.css" />
</head>
<body>
<h1>TSRPC Chatroom</h1>
<div class="app">
<div class="chat-room">
<header>Client #1</header>
<ul class="list"></ul>
<div class="send">
<input placeholder="Say something..." />
<button>Send</button>
</div>
</div>
<div class="chat-room">
<header>Client #2</header>
<ul class="list"></ul>
<div class="send">
<input placeholder="Say something..." />
<button>Send</button>
</div>
</div>
</div>
</body>
</html>