-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
264 lines (264 loc) · 8.21 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta
name="description"
content="Etch-a-Sketch App: the web version of the classic drawing tool. Create Pixel Art using your mobile or desktop device."
/>
<link
rel="apple-touch-icon"
sizes="180x180"
href="./public/img/apple-touch-icon.png"
/>
<link
rel="icon"
type="image/png"
sizes="32x32"
href="./public/img/favicon-32x32.png"
/>
<link
rel="icon"
type="image/png"
sizes="16x16"
href="./public/img/favicon-16x16.png"
/>
<link rel="manifest" href="./public/img/site.webmanifest" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Fuzzy+Bubbles:wght@400;700&display=swap"
rel="preload"
as="style"
/>
<link
href="https://fonts.googleapis.com/css2?family=Fuzzy+Bubbles:wght@400;700&display=swap"
rel="stylesheet"
media="print"
onload="this.onload=null;this.removeAttribute('media')"
data-html2canvas-ignore
/>
<link
rel="stylesheet"
href="./public/css/style.css"
data-html2canvas-ignore
/>
<script src="./public/js/main.js" type="module"></script>
<title>Etch-a-Sketch App</title>
</head>
<body>
<header>
<h1>Etch-a-Sketch</h1>
<p class="header-main-content">
If you're into pixel art or perhaps just love coloring things around,
come and let your artistic self flow in this pixelated canvas!
</p>
<div class="divider" aria-hidden="true"></div>
<section id="instructions" class="instructions-area box">
<h2 class="instructions__header">
<span id="instructions-h" class="toggable">Instructions </span>
<img
style="display: none"
width="16"
height="16"
class="toggle-instructions"
title="Click to hide/show the instructions"
src="./public/img/arrows-up.png"
alt="Toggle instructions"
tabindex="0"
target-selector=".toggable"
role="button"
aria-label="Hide or Show Instructions"
data-html2canvas-ignore
/>
</h2>
<article id="instructions-content" class="toggable">
<p>
Choose a color from the palette and
<b>click the canvas</b> to start painting. Click inside the canvas
again to turn off the brush.
</p>
<p>You can also experiment with <b>different color modes:</b></p>
<p>
Use <strong>Random Colors</strong> for a psychedelic multicolored
effect,
</p>
<p>incrementally <strong>Darken</strong> the selected color or</p>
<p>choose <strong>Ligthen</strong> to get the opposite effect.</p>
<p>
If you want to
<b>change the size of the pixels,</b> a greater number of columns
will generate a canvas with smaller pixels and vice versa.
</p>
<p>Have fun!</p>
<div class="divider" aria-hidden="true"></div>
</article>
</section>
<section id="download" class="box">
<p>Share your artwork:</p>
<img
width="32"
height="32"
src="./public/img/download-icon.png"
alt="Click to download your sketch"
title="Click to download your sketch"
id="download-icon"
tabindex="0"
role="button"
aria-label="Download Your Sketch"
data-html2canvas-ignore
/>
</section>
</header>
<main>
<div id="msg-area">
<p
class="msg-area__text"
aria-label="Error Messages Area"
role="alert"
aria-live="assertive"
></p>
</div>
<section id="reset-canvas" class="transition">
<p>
<label for="number-of-columns"> Choose number of columns: </label>
<input
type="text"
name="number-of-columns"
id="number-of-columns"
class="columns-input"
placeholder="..."
maxlength="3"
pattern="\d{1,3}"
inputmode="numeric"
/>
<button id="reset-canvas-btn">Reset Canvas</button>
</p>
</section>
<div>
<section
id="color-picker"
class="color-picker transition"
aria-label="Colors Pallete"
></section>
</div>
<section
id="mode-selection"
class="transition"
aria-label="Color Modes and Options"
>
<div class="mode-selection__options" aria-labelledby="mode-selection">
<label id="erase-mode__label" for="erase-mode"
>Erase
<input
class="color-mode-selector"
type="checkbox"
name="mode-selector"
id="erase-mode"
/>
<span
class="color-mode-picker"
tabindex="0"
role="checkbox"
aria-labelledby="erase-mode__label"
aria-checked="false"
></span>
</label>
<label id="random-color-mode__label" for="random-color-mode"
>Random Colors
<input
class="color-mode-selector"
type="checkbox"
name="mode-selector"
id="random-color-mode"
/>
<span
class="color-mode-picker"
tabindex="0"
role="checkbox"
aria-labelledby="random-color-mode__label"
aria-checked="false"
></span>
</label>
<label
id="progressive-darkening-mode__label"
for="progressive-darkening-mode"
>Darken
<input
class="color-mode-selector"
type="checkbox"
name="mode-selector"
id="progressive-darkening-mode" />
<span
class="color-mode-picker"
tabindex="0"
role="checkbox"
aria-labelledby="progressive-darkening-mode__label"
aria-checked="false"
></span></label
><label
id="progressive-lighten-mode__label"
for="progressive-lighten-mode"
>Lighten
<input
class="color-mode-selector"
type="checkbox"
name="mode-selector"
id="progressive-lighten-mode" />
<span
class="color-mode-picker"
tabindex="0"
role="checkbox"
aria-labelledby="progressive-lighten-mode__label"
aria-checked="false"
></span></label
><label for="toggle-grid" id="grid-state"
>Hide Grid
<input
class="color-mode-selector"
type="checkbox"
name="toggle-grid"
id="toggle-grid" />
<span
class="color-mode-picker"
tabindex="0"
role="checkbox"
aria-labelledby="grid-state"
aria-checked="false"
></span
></label>
</div>
</section>
<section
id="canvas"
class="grid"
title="Click to start coloring"
tabindex="0"
aria-label="Drawing Area. Can only be interacted via mouselike devices or touchscreen."
></section>
</main>
<footer>
<p>
Created by: Igor Soares
<a
class="github-icon"
target="_blank"
href="https://github.com/igormsoares"
>
<img
width="32"
height="32"
src="./public/img/github-icon.png"
alt="GitHub icon"
title="Check my other projects on GitHub!"
class="github-icon"
data-html2canvas-ignore
/>
</a>
</p>
<p class="divider"></p>
</footer>
</body>
</html>