-
Notifications
You must be signed in to change notification settings - Fork 0
/
lwsh.html
122 lines (113 loc) · 3.28 KB
/
lwsh.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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
<head>
<title>study hall</title>
<meta charset=utf-8>
<link rel=stylesheet href=fa/css/font-awesome.min.css>
<link href=http://fonts.googleapis.com/css?family=Open+Sans rel=stylesheet>
<link rel=icon href=/favicon.ico>
</head>
<body>
<header>study hall</header>
{{> cameras}}
{{> pomostatus}}
{{> chatbox}}
</body>
<template name="cameras">
<section id=cameras>
{{#each activeCameras}}
{{> camera}}
{{else}}
<div id=nocameras>
<div class="icons fa-stack">
<i class="fa fa-camera fa-stack-1x"></i>
<i class="fa fa-ban fa-stack-2x"></i>
</div>
<div>
Nobody has their camera turned on ;_;
</div>
</div>
{{/each}}
</section>
<div id=camerabuttons>
<a href=# id=enablecam title="Start/stop broadcasting">
<span class="fa fa-camera"></span>
</a>
<a href=# id=expandcollapse title="Show/hide cameras">
<span class="fa fa-chevron-up"></span>
</a>
</div>
</template>
<template name="camera">
<div class=camera-frame>
<span class=title>
{{#if nick}}
{{nick}}
{{else}}
{{uid}}
{{/if}}
</span>
<canvas class=camera width=320 height=240></canvas>
</div>
</template>
<template name="pomostatus">
<section id=pomostatus>
{{#if status}}
<span id=status-name>{{toStateName status.type}}</span> for <time
datetime={{toISO status.ends}}><span class=minutes></span> minutes
and <span class=seconds></span> seconds</time>.
{{else}}
No pomodoro running.
{{/if}}
</section>
</template>
<template name="chatbox">
<section id=chatbox>
<table height=500px>
<tr>
<td id=users-wrapper>
<div id=users>
{{#each occupants}}
<div class=user>
{{#if nick}}
{{nick}}
{{else}}
{{uid}}
{{/if}}
</div>
{{/each}}
</div>
</td>
<td id=scrollback-wrapper>
<div id=scrollback>
{{#each messages}}
{{> message}}
{{/each}}
</div>
</td>
</tr>
<tr>
<td id=mynick>
<input type=text placeholder="Enter nick">
</td>
<td>
<input type=text placeholder="Type away!" id=msgin>
</td>
</tr>
</table>
</section>
</template>
<template name="message">
{{#if nick}}
<div class=entry>
<div class=uid>
{{nick}}:
</div>
<div class=message>
{{message}}
</div>
</div>
{{else}}
<div class=announcement>
{{message}}
</div>
{{/if}}
</template>