Newer
Older
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="manifest" href="manifest.json" />
<link rel="shortcut icon" href="logo.png" />
<link rel="apple-touch-icon" href="logo.png" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"
/>
<script>
if (navigator.serviceWorker) {
navigator.serviceWorker.register("service-worker.js").then(
(registration) =>
console.log(
`Service worker registered on scope ${registration.scope}`,
),
(reason) =>
console.log(`Service worker failed to register ~ ${reason}`),
)
Your client ID: <input id="user-id" type="text" value="" readonly="" />
</div>
Enter peer ID: <input id="peer-id" type="text" value="" />
<button id="peer-connect">Connect</button>
</div>
<div id="top-panel">
<div class="top-bar">
<div class="dropdown">
<button class="dropdown-peers"><i class="fa fa-bars"></i></button>
<div class="peers">
Moritz Langenstein
committed
<ul id="connected-peers">
No peers are connected
</ul>
<div id="overall-status-icon" class="synchronised">
<img
id="overall-status-icon-img"
src="synchronised.svg"
alt="Synchronisation status icon"
/>
</div>
<input
id="room-id"
type="text"
value=""
placeholder="Enter a room to connect to"
size="25"
color="gray"
/>
<button id="room-connect">Connect <i class="fa fa-link"></i></button>
</div>
<div id="tools-panel">
<button id="pen-tool" class="selectable-tool selected">
<i class="fa fa-paint-brush"></i>
</button>
<div id="pen-properties" class="properties">
<div class="pen-contents">
<div class="pen-header">
<span class="close">×</span>
<h2>Pen properties</h2>
</div>
<div class="pen-body">
<div id="brush-colour">
<h3>Brush colour</h3>
</div>
<div class="pen-body">
<div id="brush-colour">
<h3>Brush size</h3>
</div>
<div class="slide-size">
<input
type="range"
min="1"
max="10"
class="slider"
id="range"
/>
<p style="text-align: center; margin: 0px">
Size: <span id="value"></span>
</p>
</div>
</div>
<div id="palette" class="properties" style="padding-top: 150px">
<div class="wheel-header">
<span class="close">×</span>
<h2>Select a colour from the palette</h2>
</div>
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
style="@media only screen and (max-width: 600px) { viewBox: -50 10 200 100 }"
>
<defs>
<path
id="piePiece"
d="M 42.2,78.9 46.1,64.4 Q 50,65 53.88,64.48 L 57.7,78.9 Q 50,80 42.2,78.9Z"
/>
</defs>
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
<a href="#">
<use class="wheelPiece" xlink:href="#piePiece" fill="#329739" />
<use
class="wheelPiece"
xlink:href="#piePiece"
transform="rotate(30,50,50)"
fill="#639b47"
/>
<use
class="wheelPiece"
xlink:href="#piePiece"
transform="rotate(60,50,50)"
fill="#9ac147"
/>
<use
class="wheelPiece"
xlink:href="#piePiece"
transform="rotate(90,50,50)"
fill="#A9AA39"
/>
<use
class="wheelPiece"
xlink:href="#piePiece"
transform="rotate(120,50,50)"
fill="#e1e23b"
/>
<use
class="wheelPiece"
xlink:href="#piePiece"
transform="rotate(150,50,50)"
fill="#f7941e"
/>
<use
class="wheelPiece"
xlink:href="#piePiece"
transform="rotate(180,50,50)"
fill="#ba3e2e"
/>
<use
class="wheelPiece"
xlink:href="#piePiece"
transform="rotate(210,50,50)"
fill="#9a1d34"
/>
<use
class="wheelPiece"
xlink:href="#piePiece"
transform="rotate(240,50,50)"
fill="#662a6c"
/>
<use
class="wheelPiece"
xlink:href="#piePiece"
transform="rotate(270,50,50)"
fill="#272b66"
/>
<use
class="wheelPiece"
xlink:href="#piePiece"
transform="rotate(300,50,50)"
fill="#2d559f"
/>
<use
class="wheelPiece"
xlink:href="#piePiece"
transform="rotate(330,50,50)"
fill="#43a1cd"
/>
</a>
<input id="other-colours" type="color" />
<button id="eraser-tool" class="selectable-tool">
<i class="fa fa-eraser"></i>
</button>
<button id="recognition-mode" class="selectable-tool">
<i class="fa fa-square"></i>
</button>
<div class="spacer"></div>
<button id="fast-undo-tool" class="disabled selectable-tool">
<i class="fa fa-fast-backward"></i>
<button id="undo-tool" class="disabled selectable-tool">
<i class="fa fa-backward"></i>
<span id="connected-room-id"></span>
</div>
<div id="user-avatar"></div>
<svg id="canvas"></svg>
Moritz Langenstein
committed
<script src="js/app.js"></script>
</body>
</html>