-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
258 lines (244 loc) · 14.9 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
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
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
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Toodle</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous">
<link href="./css/all.css" rel="stylesheet">
<link rel="stylesheet" href="./style.css">
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.3/umd/popper.min.js" integrity="sha384-vFJXuSJphROIrBnz7yo7oB41mKfc8JzQZiCq4NCceLEaO4IHwicKwpJf9c9IpFgh" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/js/bootstrap.min.js" integrity="sha384-alpBpkh1PFOepccYVYDB4do5UnbKysX5WZXm3XxPqe5iKTfUKjNkCk9SaVuEZflJ" crossorigin="anonymous"></script>
<script defer src="index.js"></script>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-light">
<a class="navbar-brand brand" href="#">
<i class="fas fa-palette"></i>
Toodle
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav">
<li class="nav-item">
<a id="my-doodles" class="nav-link" href="#">My Doodles <span class="sr-only">(current)</span></a>
</li>
</ul>
<div class="d-flex justify-content-center" style="width: 70%;">
<input type="text" id="image-title" class="navbar-text" value="">
</div>
</div>
<div id="account-options">
<div>
<button id="login-btn" type="button" class="btn authentication-btn mr-2" data-toggle="modal" data-target="#loginModal">
Login
</button>
<button id="signup-btn" type="button" class="btn authentication-btn mr-3" data-toggle="modal" data-target="#loginModal">
Sign Up
</button>
<button id="edit-profile-btn" type="button" class="btn authentication-btn mr-3" data-toggle="modal" data-target="#loginModal" hidden>
Edit Profile
</button>
<button id="logout-btn" type="button" class="btn authentication-btn mr-3" data-toggle="modal" data-target="#loginModal" hidden>
Logout
</button>
</div>
</div>
</nav>
<div class="container-fluid">
<div class="d-flex columns">
<div class="sidebar-left container-sm">
<div class="row d-flex justify-content-around" id="tools">
<div class="d-flex flex-column">
<div class="commands d-flex flex-wrap justify-content-center">
<div class="flexitem" data-command="new" title="new"><i class="fas fa-plus"></i></div>
<div class="flexitem" data-command="clear" title="clear"><i class="fas fa-trash"></i></div>
<div class="flexitem" data-command="save" title="save"><i class="fas fa-save"></i></div>
<div class="flexitem" data-command="download" title="download"><i class="fas fa-download"></i></div>
<div class="flexitem" data-command="undo" title="undo"><i class="fas fa-undo"></i></div>
<div class="flexitem" data-command="redo" title="redo"><i class="fas fa-redo"></i></i></div>
</div>
<div class="tools d-flex flex-wrap justify-content-center">
<div class="flexitem" data-tool="line" title="line"><i class="fas fa-minus"></i></div>
<div class="flexitem" data-tool="rectangle" title="rectangle"><i class="fas fa-square"></i></div>
<div class="flexitem" data-tool="circle" title="circle"><i class="fas fa-circle"></i></div>
<div class="flexitem" data-tool="triangle" title="triangle">▲</div>
<div class="flexitem" data-tool="ellipse" title="ellipse">⬬</div>
<div class="flexitem" data-tool="star" title="star"><i class="fas fa-star"></i></div>
<div class="flexitem" data-tool="polygon" title="polygon"><i class="fas fa-certificate"></i></div>
<div class="flexitem activetool" data-tool="brush" title="brush"><i class="fas fa-paint-brush"></i></div>
<div class="flexitem" data-tool="eraser" title="eraser"><i class="fas fa-eraser"></i></div>
<div class="flexitem" data-tool="bucket" title="paint bucket"><i class="fas fa-fill-drip"></i></div>
<div class="flexitem" data-tool="text" title="text"><i class="fas fa-font"></i></div>
<div class="flexitem" data-tool="photo" title="photo"><i class="fas fa-camera-retro"></i></div>
<div id="stroke-color-options" class="color-picker">
<input type="color" title="stroke color" class="color-input" id="stroke-color-input">
<input type="color" title="fill color" value="#FFFFFF"class="color-input" id="fill-color-input">
</div>
</div>
<br>
</div>
</div>
<div class="row d-flex justify-content-center" id="tool-options-container">
<div id="tool-options" class="d-flex flex-column align-items-between">
<template id="text-options-template">
<div id="text-options" class="d-flex flex-column justify-content-center">
<br>
<div class="d-flex justify-content-between">
<input type="text" value="" name="text-input" id="text-input" placeholder="Enter text here" class="btn"><br>
</div><br>
<div class="d-flex">
<select id="text-font-family" class="btn select-option">
<option value="Arial">Arial</option>
<option value="Arial Narrow">Arial Narrow</option>
<option value="Calibri">Calibri</option>
<option value="Cambria">Cambria</option>
<option value="Candara">Candara</option>
<option value="Comic Sans MS">Comic Sans MS</option>
<option value="Courier">Courier</option>
<option value="Courier New">Courier New</option>
<option value="Garamond">Garamond</option>
<option value="Geneva">Geneva</option>
<option value="Helvetica">Helvetica</option>
<option value="Monaco">Monaco</option>
<option value="Sans-serif">Sans-serif</option>
<option value="Tahoma">Tahoma</option>
<option value="Times">Times</option>
<option value="Times New Roman">Times New Roman</option>
<option value="Verdana">Verdana</option>
</select>
<input id="text-font-size" type="number" value="12" class="btn option-input selection-input">
<span id="text-span">px</span>
</div>
</div>
</template>
<template id="shape-fill-options-template">
<div id="shape-fill-options" class="d-flex justify-content-between">
<label for="shape-fill" class="select-label">Fill</label>
<select id="shape-fill-select" class="btn select-option">
<option value="outline">Outline</option>
<option value="fill">Fill</option>
<option value="outlineFill">Outline and fill</option>
</select>
</div>
</template>
<template id="blend-options-template">
<div id="stroke-blend-options" class="d-flex justify-content-between">
<label for="stroke-blend" class="select-label">Blend</label>
<select id="stroke-blend-select" class="btn select-option">
<option value="source-over">Normal</option>
<option value="multiply">Multiply</option>
<option value="screen">Screen</option>
<option value="lighten">Lighten</option>
<option value="darken">Darken</option>
<option value="difference">Difference</option>
</select>
</div>
</template>
<template id="stroke-size-options-template">
<div id="stroke-size-options" class="stroke-options">
<label for="stroke-size">Size</label><br>
<input type="range" min="1" max="100" value="5" id="stroke-size-slider">
<input type="number" min="0" max="100" value="5" onClick="this.select();" class="btn option-input" id="stroke-size-input">
<span>px</span>
</div>
</template>
<template id="stroke-opacity-options-template">
<div id="opacity-options" class="stroke-options">
<label for="opacity">Opacity</label><br>
<input type="range" min="0" max="100" value="100" name="opacity"id="stroke-opacity-slider">
<input type="number" min="0" max="100" value="100" onClick="this.select();" class="btn option-input" id="stroke-opacity-input">
<span>%</span>
</div>
</template>
<template id="star-points-options-template">
<div id="star-points-options" class="stroke-options">
<label for="star-points">Points</label><br>
<input type="range" min="1" max="100" value="5" id="star-points-slider">
<input type="number" min="0" max="100" value="5" onClick="this.select();" class="btn option-input" id="star-points-input">
</div>
</template>
<template id="inner-radius-options-template">
<div id="inner-radius-options" class="stroke-options">
<label for="inner-radius">Inner Radius</label><br>
<input type="range" min="1" max="100" value="50" id="inner-radius-slider">
<input type="number" min="0" max="100" value="50" onClick="this.select();" class="btn option-input" id="inner-radius-input">
</div>
</template>
<template id="filter-options-template">
<div id="filter-options" class="d-flex justify-content-between">
<label for="filter" class="select-label">Filter</label>
<select id="filter-select" class="btn select-option">
<option value="noFilter">No Filter</option>
<option value="redShift">Red Shift</option>
<option value="greenShift">Green Shift</option>
<option value="blueShift">Blue Shift</option>
<option value="scramble">Scramble</option>
<option value="blackAndWhite">B&W</option>
<option value="negative">Negative</option>
</select>
</div>
</template>
<template id="photo-buttons-template">
<div id="photo-buttons">
<button id="start-webcam-btn">Start Webcam</button>
<button id="stop-webcam-btn" hidden>Stop Webcam</button>
<br>
<button id="capture-btn">Take Photo</button>
<br>
</div>
</template>
</div>
</div>
</div>
<div class="columns">
<div id="form-div">
<form id="form">
<div class="form-group">
<label for="username">User Name</label>
<input type="text" class="form-control" id="username">
</div>
<div class="form-group">
<label for="password">Password</label>
<input type="password" class="form-control" id="password">
</div>
<div class="form-group" hidden>
<label for="confirm-password">Confirm Password</label>
<input type="password" class="form-control" id="confirm-password">
</div>
<div class="form-group form-submit-div">
<button type="submit" class="btn btn-primary" id="form-submit" value="login">Login</button>
</div>
</form>
<form id="form-edit" hidden>
<div class="form-group">
<label for="username">User Name</label>
<input type="text" class="form-control" id="username-edit">
</div>
<div class="form-group form-submit-div">
<button type="submit" class="btn btn-primary" id="form-submit-edit" value="update">Update</button>
</div>
</form>
<div id="form-error" hidden>
<p>wrong username or password</p>
</div>
<div id="form-success" hidden>
<p></p>
</div>
</div>
<div id="images" class="elements-container d-flex flex-wrap"></div>
<div class="canvas-container grid">
<canvas width="700" height="500" class="canvas" id="drawing-canvas"></canvas>
<div id="canvas-message">
<p></p>
</div>
<video id="webcam-video" hidden></video>
</div>
</div>
</div>
</div>
</body>
</html>