-
Notifications
You must be signed in to change notification settings - Fork 2
/
livechat.html
84 lines (76 loc) · 2.3 KB
/
livechat.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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="css/screen.css" media="screen, projection">
<title>Chat with {Partner Name}</title>
<script>
fakeMessage = function() {
var msg = document.querySelector('.outgoing');
var msgHtml = msg.innerHTML;
var newMsg = document.querySelector('.conversation').appendChild(msg.cloneNode());
newMsg.innerHTML = msgHtml;
var body = document.querySelector('body');
body.scrollTop = body.scrollHeight;
}
</script>
</head>
<body>
<div class="wrapper">
<section class="live-chat">
<header>
<h1>
Chat with
<a class="profile-link" href="viewprofile.html">
<img class="avatar" src="http://placeowl.com/48" width=48 height=48>
<span>{Partner Name}</span>
</a>
</h1>
<form action="livechat.html">
<fieldset>
<select name="language">
<option>Spanish</option>
<option>English</option>
</select>
<input type="submit" value="Next">
</fieldset>
</form>
</header>
<section class="conversation">
<article class="incoming message">
<a href="viewprofile.html"><img class="avatar" src="http://placekitten.com/48" width=48 height=48></a>
<div class="content">
<time pubdate>Three minutes ago</time>
<div class="text">¡Hola!</div>
</div>
</article>
<article class="outgoing message">
<a href="editprofile.html"><img class="avatar" src="http://placeowl.com/48" width=48 height=48></a>
<div class="content">
<time pubdate>Three minutes ago</time>
<div class="text">Hello!</div>
</div>
</article>
<article class="incoming message">
<a href="viewprofile.html"><img class="avatar" src="http://placekitten.com/48" width=48 height=48></a>
<div class="content">
<time pubdate>Two minutes ago</time>
<div class="text">¿Cómo estás?</div>
</div>
</article>
</section>
<footer>
<ul class="links">
<li><a href="http://www.wordreference.com/" target=_blank>WordReference</a></li>
</ul>
<form class="message-composer">
<fieldset>
<input name="message">
<input type="submit" value="Send" onclick="fakeMessage(); return false">
</fieldset>
</form>
</footer>
</section>
</div>
</body>
</html>