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
href="https://fonts.googleapis.com/css?family=Martel:300,400&display=swap"
rel="stylesheet"
/>
<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}`),
)
}
</script>
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>
</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="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 id="rectangle"></div>
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
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
<div id="palette" class="properties">
<div class="palette-selector">
<svg
id="wheel"
viewBox="0 0 100 100"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
>
<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>
<use xlink:href="#piePiece" fill="#2D8633" />
<use
xlink:href="#piePiece"
transform="rotate(30,50,50)"
fill="#43a1cd"
/>
<use
xlink:href="#piePiece"
transform="rotate(60,50,50)"
fill="#639b47"
/>
<use
xlink:href="#piePiece"
transform="rotate(90,50,50)"
fill="#9ac147"
/>
<use
xlink:href="#piePiece"
transform="rotate(120,50,50)"
fill="#e1e23b"
/>
<use
xlink:href="#piePiece"
transform="rotate(150,50,50)"
fill="#f7941e"
/>
<use
xlink:href="#piePiece"
transform="rotate(180,50,50)"
fill="#ba3e2e"
/>
<use
xlink:href="#piePiece"
transform="rotate(210,50,50)"
fill="#9a1d34"
/>
<use
xlink:href="#piePiece"
transform="rotate(240,50,50)"
fill="#662a6c"
/>
<use
xlink:href="#piePiece"
transform="rotate(270,50,50)"
fill="#272b66"
/>
<use
xlink:href="#piePiece"
transform="rotate(300,50,50)"
fill="#2d559f"
/>
<use
xlink:href="#piePiece"
transform="rotate(330,50,50)"
fill="#A9AA39"
/>
</svg>
</div>
</div>
<button id="eraser-tool"><i class="fa fa-eraser"></i></button>
<div id="connected-room-info">
You are connected to a room: <span id="connected-room-id"></span>
<svg id="canvas"></svg>
Moritz Langenstein
committed
<script src="js/app.js"></script>
</body>
</html>