-
-
Save herkyl/d169f0cb5e97c4f2bb8c7a70c88566f5 to your computer and use it in GitHub Desktop.
Scaledrone chat room tutorial
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<script type='text/javascript' src='https://cdn.scaledrone.com/scaledrone.min.js'></script> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<style> | |
body { | |
box-sizing: border-box; | |
margin: 0; | |
padding: 13px; | |
display: flex; | |
flex-direction: column; | |
max-height: 100vh; | |
font-family: -apple-system, BlinkMacSystemFont, sans-serif; | |
} | |
.members-count, | |
.members-list, | |
.messages { | |
border: 1px solid #e4e4e4; | |
padding: 15px; | |
margin-bottom: 15px; | |
} | |
.messages { | |
flex-shrink: 1; | |
overflow: auto; | |
} | |
.message { | |
padding: 5px 0; | |
} | |
.message .member { | |
display: inline-block; | |
} | |
.member { | |
padding-right: 10px; | |
position: relative; | |
} | |
.message-form { | |
display: flex; | |
flex-shrink: 0; | |
} | |
.message-form__input { | |
flex-grow: 1; | |
border: 1px solid #dfdfdf; | |
padding: 10px 15px; | |
font-size: 16px; | |
} | |
.message-form__button { | |
margin: 10px; | |
} | |
</style> | |
</head> | |
<body> | |
<div class="members-count"></div> | |
<div class="members-list"></div> | |
<div class="messages"></div> | |
<form class="message-form" onsubmit="return false;"> | |
<input class="message-form__input" placeholder="Type a message.." type="text"/> | |
<input class="message-form__button" value="Send" type="submit"/> | |
</form> | |
<script src="./script.js"></script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment