-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
319 lines (225 loc) · 12.3 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
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
<!DOCTYPE html>
<html lang="fr">
<head>
<!-- Défintion des metas -->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Titre de la page -->
<title>Paint APP</title>
<!-- Appel du favicon -->
<link rel="shortcut icon" type="image/png" href="img/paint.ico">
<!-- Appel de Bootstrap -->
<link rel="stylesheet" href="bootstrap-4.4.1-dist/css/bootstrap.min.css">
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js"
integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n"
crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"
integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo"
crossorigin="anonymous"></script>
<script src="bootstrap-4.4.1-dist/js/bootstrap.min.js"></script>
<!-- Appel de la police d'écriture Indie Flower -->
<link href="https://fonts.googleapis.com/css2?family=Indie+Flower&display=swap" rel="stylesheet">
<!-- Appel du fontawesome -->
<script defer src="fontawesome-free-5.13.0-web/js/all.js"></script>
<!-- Appel du CSS -->
<link rel="stylesheet" type="text/css" href="css/main.css">
</head>
<body>
<div class="row justify-content-center mb-5">
<!-- Vide pour ne pas que le titre soit collé tout en haut -> pas propre -> passer par du css plus tard -->
<div class="title position-absolute text-nowrap c_title">
<h1></h1>
</div>
<!-- Fin du vide -->
</div>
<div class="container-fluid">
<div class="row justify-content-center mb-5">
<div class="title position-absolute text-nowrap c_title">
<h1>Paint APP</h1>
</div>
<button class="btn btn-outline-light ml-auto" type="button" data-toggle="collapse" id="btControles">
Contrôles
</button>
<button class="btn btn-outline-light" type="button" data-toggle="collapse" data-target="#menu" id="btMenu">
Menu
</button>
</div>
<div class="row mb-5">
<div class="collapse show col" id="menu">
<div class="row p-3">
<!-- Inputs pour les Couleurs -->
<div class="col-sm-6 col-md-4 col-xl-2 mb-3">
<div class="row">
<div class="col">
<h5>Couleurs</h5>
</div>
</div>
<!-- Si le mode gomme est désactivé -> Couleurs normales -->
<div class="row" id="colornormal">
<div class="col-2 p-1">
Pinceau<input type="color" id="strokecolor" value="#003E90">
</div>
<div class="col-2 p-1">
Remplissage<input type="color" id="fillcolor" value="#4e932a">
</div>
</div>
<!-- Si le mode gomme est activé -> Couleurs blanches -->
<div class="row" id="colorblanc">
<div class="col-2 p-1">
Mode gomme activé<input disabled type="color" id="strokecolorblanc" value="#ffffff">
</div>
<div class="col-2 p-1">
Mode gomme activé<input disabled type="color" id="fillcolorblanc" value="#ffffff">
</div>
</div>
</div>
<!-- Couleurs prédefinies -->
<div class="col-sm-6 col-md-4 col-xl-3 mb-3">
<div class="row">
<div class="col text-center">
<h5 id="coulPredefPinc">Couleurs prédefinies du pinceau <span id="flechePinceau"><i class="fas fa-arrow-alt-circle-right"></i></span></h5>
<h5 id="coulPredefRemp"><span id="flecheRemp"><i class="fas fa-arrow-alt-circle-left"></i></span> Couleurs prédefinies de remplissage</h5>
<small id="smallPredef">Attention : Cette action changera la couleur actuelle de votre pinceau</small>
<br/><br/>
</div>
</div>
<div class="row justify-content-around align-items-center">
<button class="btn btn-outline-light" type="button" id="coul1"> </button>
<button class="btn btn-outline-light" type="button" id="coul2"> </button>
<button class="btn btn-outline-light" type="button" id="coul3"> </button>
<button class="btn btn-outline-light" type="button" id="coul4"> </button>
<button class="btn btn-outline-light" type="button" id="coul5"> </button>
</div>
<div class="row justify-content-around align-items-center">
<button class="btn btn-outline-light" type="button" id="coul6"> </button>
<button class="btn btn-outline-light" type="button" id="coul7"> </button>
<button class="btn btn-outline-light" type="button" id="coul8"> </button>
<button class="btn btn-outline-light" type="button" id="coul9"> </button>
<button class="btn btn-outline-light" type="button" id="coul10"> </button>
</div>
</div>
<!-- Formes -->
<div class="col-sm-6 col-md-4 col-xl-3 mb-3">
<div class="row">
<div class="col text-center">
<h5>Outils et Formes</h5>
<small>Attention : Cette action changera votre outil actuel</small>
<br/><br/>
</div>
</div>
<div class="row justify-content-around align-items-center">
<button class="btn btn-outline-light" type="button" id="pinceau">Pinceau</button>
<button class="btn btn-outline-light" type="button" id="ligne">Ligne</button>
<button class="btn btn-outline-light" type="button" id="carre">Carré</button>
</div>
<div class="row justify-content-around align-items-center">
<button class="btn btn-outline-light" type="button" id="rectangle">Rectangle</button>
<button class="btn btn-outline-light" type="button" id="cercle">Cercle</button>
<button class="btn btn-outline-light" type="button" id="ellipse">Ellipse</button>
</div>
</div>
<!-- Taille du pinceau -->
<div class="col-sm-6 col-md-4 col-xl-2 mb-3">
<div class="row">
<div class="col">
<h5>Taille du pinceau</h5>
</div>
</div>
<div class="row">
<div class="col">
<form class="w-100">
<input type="range" id="lineweight" min="1" max="80" value="8" step="1" >
<output for="lineweight" id="rangeSize">8</output>
</form>
</div>
</div>
<div class="row" style="height: 70px">
<div class="col align-self-center">
<div id="brush_size_box" class="mx-auto"></div>
</div>
</div>
</div>
<!-- Clear -->
<div class="col-sm-3 col-md-4 col-xl-1 mb-3">
<div class="row">
<div class="col text-center">
<h5>Effacer</h5>
</div>
</div>
<div class="row">
<div id="clearbtn" class="col c_icon_button text-center">
<i class="fas fa-times"></i>
</div>
</div>
</div>
<!-- Sauvegarde -->
<div class="col-sm-3 col-md-4 col-xl-1 mb-3">
<div class="row">
<div class="col text-center">
<h5>Sauvegarder</h5>
</div>
</div>
<div class="row">
<div id="save" class="col c_icon_button text-center">
<i class="far fa-save"></i>
</div>
</div>
</div>
<!-- Coordonnées -->
<div class="col-sm-6 col-md-2 col-xl-2">
<div class="row">
<div id="coos" class="col c_icon_button">
<p><u>Coordonnées :</u></p>
<div>
<span id="x1">0</span> ;
<span id="y1">0</span>
</div>
</div>
</div>
</div>
<!-- Undo / Redo -->
<div class="col-sm-6 col-md-2 col-xl-3">
<div class="row">
<div class="col text-center">
<h5>Undo redo</h5>
</div>
</div>
<div class="row">
<div id="undoredo" class="col c_icon_button text-center">
<button class="btn btn-outline-light" type="button" id="undo"><i class="fas fa-undo"></i></button>
<button class="btn btn-outline-light" type="button" id="redo"><i class="fas fa-redo"></i></button>
</div>
</div>
</div>
<!-- Mode Gomme -->
<div class="col-sm-6 col-md-2 col-xl-3">
<div class="row">
<div class="col text-center">
<h5>Mode gomme <i class="fas fa-eraser"></i></h5>
</div>
</div>
<div class="row">
<div id="gomme" class="col c_icon_button text-center">
<button class="btn btn-outline-light" type="button" id="btOn">On</button>
<button class="btn btn-outline-light" type="button" id="btOff">Off</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Canevas -->
<div class="row justify-content-center">
<section id="container">
<canvas id="canvas" ></canvas>
</section>
</div>
<div class="row justify-content-center">
<br/><br/><br/><br/>
</div>
<!-- Appel du JS -->
<script src="js/script.js"></script>
</body>
</html>