-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
121 lines (113 loc) · 3.25 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
<!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, maximum-scale=1.0, user-scalable=no"
/>
<title>Flower Paint</title>
<link rel="stylesheet" href="./style.css" />
</head>
<body>
<canvas id="canvas"></canvas>
<button id="size-btn" class="corner-btn" onclick="openSizeOverlay()">
<p>Size</p>
</button>
<button id="color-btn" class="corner-btn" onclick="openColorOverlay()">
<p>Colors</p>
</button>
<button id="clear-btn" class="corner-btn" onclick="openClearOverlay()">
<p>Clear</p>
</button>
<a id="download-link" href="" download="myimage.png">
<button id="download-btn" class="corner-btn">Download</button>
</a>
<div id="clear-overlay" onclick="closeClearOverlay()">
<p style="background-color: #e9e9ed">Clear drawing?</p>
<div>
<button onclick="clearCanvas()" style="background-color: lightcoral">
<p>Yes</p>
</button>
<button
onclick="closeClearOverlay()"
style="background-color: lightgreen"
>
<p>No</p>
</button>
</div>
</div>
<div id="color-overlay" onclick="closeColorOverlay()">
<div>
<button
id="blue"
class="color-btn"
style="background-color: blue"
></button>
<button
id="green"
class="color-btn"
style="background-color: green"
></button>
<button
id="orange"
class="color-btn"
style="background-color: orange"
></button>
<button
id="pink"
class="color-btn"
style="background-color: pink"
></button>
<button
id="purple"
class="color-btn"
style="background-color: purple"
></button>
<button
id="red"
class="color-btn"
style="background-color: red"
></button>
<button
id="yellow"
class="color-btn"
style="background-color: yellow"
></button>
<button
id="rainbow"
class="color-btn"
style="
background: rgb(255, 0, 0);
background: radial-gradient(
circle,
rgba(255, 0, 0, 1) 0%,
rgba(252, 173, 0, 1) 15%,
rgba(251, 255, 0, 1) 35%,
rgba(0, 255, 26, 1) 50%,
rgba(0, 32, 255, 1) 66%,
rgba(105, 17, 255, 1) 82%,
rgba(231, 87, 255, 1) 100%
);
"
></button>
</div>
</div>
<div id="size-overlay" onclick="closeSizeOverlay()">
<button id="small" class="size-btn" onclick="setFlowerSize('small')">
Small
</button>
<button id="medium" class="size-btn" onclick="setFlowerSize('medium')">
Medium
</button>
<button id="large" class="size-btn" onclick="setFlowerSize('large')">
Large
</button>
<button id="xlarge" class="size-btn" onclick="setFlowerSize('xlarge')">
XLarge
</button>
</div>
<script src="./script.js"></script>
</body>
</html>