-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
356 lines (310 loc) · 13.3 KB
/
index.html
File metadata and controls
356 lines (310 loc) · 13.3 KB
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
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Pixel Art Maker</title>
<!--Favicon Icon-->
<link rel="shortcut icon" href="favicon-32x32.png" type="image/x-icon" />
<!--Calling External CSS Stylesheet files -->
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Monoton">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300">
<link rel="stylesheet" href="css/styles.css">
<!--Calling javascript libraries from external CDN-->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
<!--Linking external html2canvas javascript file-->
<script "text/javascript" src="js/html2canvas.js"></script>
<style>
/* NOTE: The styles were added inline for the custom color picker,
because Prefixfree needs access to your styles and they must be inlined
*/
.button {
/*left: 22.5px;*/
margin: auto;
width: 250px;
height: 250px;
border-radius: 3em;
position: relative;
background-image: linear-gradient(to bottom, #dddddd, #d5d5d5);
box-shadow: inset 0 3px 7px 0px #FFF, inset 0 -5px 5px 0px rgba(0, 0, 0, 0.2), 0 8px 30px 0 rgba(0, 0, 0, 0.6);
}
.button:before,
.button:after {
box-sizing: border-box;
display: block;
}
.button:before {
content: "";
position: absolute;
border-radius: 50%;
left: calc(50% - 6.5em);
top: calc(50% - 6.5em);
width: 13em;
height: 13em;
background-image: linear-gradient(to bottom, #ffffff, #aaaaaa);
-webkit-filter: blur(4px);
}
.button:after {
content: "";
position: absolute;
border-radius: 50%;
left: calc(50% - 5.5em);
top: calc(50% - 5.5em);
width: 11em;
height: 11em;
background-image: linear-gradient(to bottom, #c5c5c5, #dddddd 80%);
box-shadow: 0 4px 28px -10px rgba(0, 0, 0, 0.2);
}
.wheel,
.colors,
.color {
content: "";
position: absolute;
border-radius: 50%;
left: calc(50% - 4.75em);
top: calc(50% - 4.75em);
width: 9.5em;
height: 9.5em;
}
.wheel {
display: block;
z-index: 1;
box-shadow: inset 0 16px 32px 14px rgba(0, 0, 0, 0.7);
}
.colors {
list-style: none;
background: #ddd;
position: relative;
-webkit-filter: blur(10px);
transform: rotate(170deg) scaleX(-1);
}
.color {
clip: rect(0px, 9.5em, 9.5em, 4.75em);
}
.color:after {
content: "";
position: absolute;
border-radius: 50%;
left: calc(50% - 4.75em);
top: calc(50% - 4.75em);
width: 9.5em;
height: 9.5em;
clip: rect(0px, 4.75em, 9.5em, 0px);
}
.color:nth-child(1):after {
background-color: #9ED110;
z-index: 12;
transform: rotate(30deg);
}
.color:nth-child(2):after {
background-color: #50B517;
z-index: 11;
transform: rotate(60deg);
}
.color:nth-child(3):after {
background-color: #179067;
z-index: 10;
transform: rotate(90deg);
}
.color:nth-child(4):after {
background-color: #476EAF;
z-index: 9;
transform: rotate(120deg);
}
.color:nth-child(5):after {
background-color: #9f49ac;
z-index: 8;
transform: rotate(150deg);
}
.color:nth-child(6):after {
background-color: #CC42A2;
z-index: 7;
transform: rotate(180deg);
}
.color:nth-child(7):after {
background-color: #FF3BA7;
z-index: 6;
transform: rotate(180deg);
}
.color:nth-child(8):after {
background-color: #fe0048;
z-index: 5;
transform: rotate(210deg);
}
.color:nth-child(9):after {
background-color: #fe3000;
z-index: 4;
transform: rotate(240deg);
}
.color:nth-child(10):after {
background-color: #fe6c00;
z-index: 3;
transform: rotate(270deg);
}
.color:nth-child(11):after {
background-color: #FFCC00;
z-index: 2;
transform: rotate(300deg);
}
.color:nth-child(12):after {
background-color: #EDE604;
z-index: 1;
transform: rotate(330deg);
}
.color:nth-child(n+7) {
transform: rotate(180deg);
}
.center {
content: "";
position: absolute;
border-radius: 50%;
left: calc(50% - 3.15em);
top: calc(50% - 3.15em);
width: 6.3em;
height: 6.3em;
z-index: 2;
background-image: linear-gradient(to bottom, #eeeeee, #cccccc);
box-shadow: inset 0 3px 7px 0px #FFF, 0 25px 30px -5px rgba(0, 0, 0, 0.5);
}
.center:before {
content: "";
position: absolute;
border-radius: 50%;
left: calc(50% - 2.1em);
top: calc(50% - 2.1em);
width: 4.2em;
height: 4.2em;
background-image: linear-gradient(to bottom, #ffffff 20%, #aaaaaa);
box-shadow: 0 25px 30px -5px rgba(0, 0, 0, 0.5);
}
.center:after {
content: "";
position: absolute;
border-radius: 50%;
left: calc(50% - 1.5em);
top: calc(50% - 1.5em);
width: 3em;
height: 3em;
background-image: linear-gradient(to bottom, #aaaaaa, #f5f5f5 80%);
box-shadow: inset 0 -1px 4px 0px #FFF;
}
.wrapper__pin {
transform: rotate(0deg);
transform-origin: 50px 50px;
-ms-transform-origin: 50px 50px;
-webkit-transform-origin: 50px 50px;
/* Safari and Chrome */
z-index: -1;
position: absolute;
transition: all 1s ease;
}
.pin {
width: 2.1em;
height: 2.1em;
transform: rotate(50deg) skew(30deg, 20deg);
box-shadow: inset 0px 0px 4px 1px rgba(0, 0, 0, 0.1), 0 0 12px 3px rgba(0, 0, 0, 0.2);
background: #FFF;
position: absolute;
z-index: -1;
left: 32px;
top: 3px;
}
</style>
</head>
<body>
<!--Website Header-->
<div id="box1" class="box">
<h1>Pixel Art Maker</h1>
</div>
<!--Design Canvas Selection Parameters-->
<div id="box2" class="box">
<h2>Choose Grid Dimensions</h2>
<!--Design Canvas Width and Height Input Form-->
<form id="size-picker">
Height:
<input type="number" id="input-height" name="height" min="1" max="25" value="1">
Width:
<input type="number" id="input-width" name="width" min="1" value="1">
</form>
<h2 id = "pick-color-header" class="p-color-heading">Pick A Color</h2>
<br>
<!--Custom Color Picker-->
<div class="button" title="Pick a Colour" id="button">
<div class="center" id="color-wheel-center">
<div class="wrapper__pin">
<div class="pin"></div>
</div>
</div>
<div class="wheel">
<ul class="colors">
<li class="color"></li>
<li class="color"></li>
<li class="color"></li>
<li class="color"></li>
<li class="color"></li>
<li class="color"></li>
<li class="color"></li>
<li class="color"></li>
<li class="color"></li>
<li class="color"></li>
<li class="color"></li>
<li class="color"></li>
</ul>
</div>
</div>
<!--Selected Color's RGB Value Output-->
<div class="values">
<span>R: <span class="value--r"></span></span>
<span>G: <span class="value--g"></span></span>
<span>B: <span class="value--b"></span></span>
</div>
<br>
<!--Hidden div to store color chosen from my cutom color picker-->
<div id="col" style="display: none;"></div>
<!--Submit Button-->
<input id="create-table" type="submit" value="Create Design Canvas"> <br>
<!--Help Icon with Instructions Tooltip-->
<div class="tool-tips">
<img src="images/64x64-clean3d-blue-help.png"> <span class="tool-tip-text"><kbd>Ctrl</kbd> + Mouse Hover a Cell to Paint it.<br><br><kbd>Shift</kbd> + Mouse Hover a Cell to Erase its Paint. <br><br>Click the Download Canvas Button to Download your Design Canvas as an Image.</span>
</div>
</div>
<!--Design Canvas-->
<div id="box3" class="box">
<h2 id="design-canvas-heading">Design Canvas</h2>
<table id="pixel-canvas"></table>
<!--Design Canvas Reset Button-->
<button id = "reset-canvas" class="canvas-control">Reset Canvas</button>
<!--Design Canvas Download Preview Button-->
<button id = "preview-canvas" class="canvas-control">Preview Canvas</button>
<!--Design Canvas Download Button-->
<button id = "download-canvas" class="canvas-control">Download Canvas</button>
<!--Code Triggered Link for Design Canvas Download-->
<a id="start-download" download="Design Canvas.png"></a>
</div>
<!--Design Canvas Download Preview in Modal Box-->
<div id="my-modal" class="modal">
<span id="close-modal" class="close">×</span>
<img class="modal-content" id="img01" alt="Design Canvas Download Preview">
<div id="caption"></div>
</div>
<!--Footer-->
<div id="box4" ><br>
<p>
Developed by <strong>Oluwatobiloba Olusoga</strong> - Aspiring Front End Developer
</p>
<br>
<!--Social Media Links-->
<a id="social-media-links" href="https://github.com/thaDev404/"><img src="images/Github.png"></a>
<a id="social-media-links" href="https://twitter.com/thaDev404"><img src="images/twitter.png"></a>
<a id="social-media-links" href="https://www.facebook.com/thadev404"><img src="images/facebook.png"></a>
<br>
<small>
Copyright © 2018 Oluwatobiloba Olusoga
</small>
</div>
<!--Calling External Javascript Files-->
<script src="js/main.js"></script>
<script src="js/customcolorpicker.js"></script>
</body>
</html>