-
Notifications
You must be signed in to change notification settings - Fork 39
/
index.html
100 lines (96 loc) · 2.32 KB
/
index.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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<!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 {
display: flex;
align-items: center;
justify-content: center;
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, sans-serif;
font-size: 16px;
height: 100vh;
}
.content {
box-shadow: rgba(156, 172, 172, 0.2) 0px 2px 2px, rgba(156, 172, 172, 0.2) 0px 4px 4px, rgba(156, 172, 172, 0.2) 0px 8px 8px, rgba(156, 172, 172, 0.2) 0px 16px 16px, rgba(156, 172, 172, 0.2) 0px 32px 32px, rgba(156, 172, 172, 0.2) 0px 64px 64px;
border-radius: 3px;
height: 100vh;
max-height: 600px;
width: 100vw;
max-width: 400px;
display: flex;
flex-direction: column;
}
.messages {
flex-grow: 1;
padding: 20px 30px;
overflow: auto;
}
.message {
display: flex;
flex-direction: column;
}
.message--mine {
align-items: flex-end;
}
.message--theirs {
align-items: flex-start;
}
.message__name {
padding: 10px 0;
}
.message__bubble {
padding: 20px;
border-radius: 3px;
}
.message--theirs .message__bubble {
background: #6363bf;
color: white;
}
.message--mine .message__bubble {
background: rgba(156, 172, 172, 0.2);
}
.footer {
line-height: 76px;
border-top: 1px solid rgba(156, 172, 172, 0.2);
display: flex;
flex-shrink: 0;
}
input {
height: 76px;
border: none;
flex-grow: 1;
padding: 0 30px;
font-size: 16px;
background: transparent;
}
button {
border: none;
background: transparent;
padding: 0 30px;
font-size: 16px;
cursor: pointer;
}
</style>
</head>
<body>
<div class="content">
<div class="messages">
</div>
<form class="footer" onsubmit="return false;">
<input type="text" placeholder="Your message..">
<button type="submit">Send</button>
</form>
</div>
<template data-template="message">
<div class="message">
<div class="message__name"></div>
<div class="message__bubble"></div>
</div>
</template>
<script src="script.js"></script>
</body>
</html>