-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
113 lines (104 loc) · 2.99 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
<!DOCTYPE html>
<html lang="en">
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.7.0/p5.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.7.0/addons/p5.sound.min.js"></script>
<link rel="stylesheet" type="text/css" href="style.css" />
<meta charset="utf-8" />
<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=Pixelify+Sans&display=swap" rel="stylesheet" />
<style>
body,
html {
margin: 0;
padding: 0;
overflow: hidden;
border: 0;
}
.rounded-box {
position: absolute;
background: rgba(230, 230, 230, 0.8);
border-radius: 15px;
padding: 10px;
margin: 0px;
}
#info-box {
top: 10px;
left: 10px;
max-width: 300px;
max-height: 200px;
text-align: center;
}
#controls-box {
top: 250px;
left: 10px;
width: 150px;
}
#canvas-container {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
display: flex;
justify-content: center;
align-items: center;
border-style: none;
border: 0;
}
canvas {
border: 0;
border-style: none;
border-radius: 15px;
}
#emoji-select,
#brush-select {
width: 100%;
font-size: 1em;
}
</style>
</head>
<body>
<div id="canvas-container"></div>
<div id="info-box" class="rounded-box">
<h1>Paintmoji!</h1>
<h2>💠 v0.1.3 💠</h2>
<div class="instructions">
<span style="font-size: 1.2em">Click to draw!</span>
<br />
• Press <span style="color: blue">BACKSPACE to clear</span> • Press
<span style="color: blue">ENTER to save screenshot</span> • Press
<span style="color: blue">'u' to undo, 'r' to redo</span> • <br />
</div>
</div>
<div id="controls-box" class="rounded-box">
<label for="brush-size">Brush Size:</label>
<input type="range" id="brush-size" min="5" max="100" value="20" />
<br />
<label for="brush-select">Brush Type:</label>
<select id="brush-select">
<option value="emoji">Emoji</option>
<option value="circle">Circle</option>
<option value="square">Square</option>
<option value="triangle">Triangle</option>
<option value="star">Star</option>
</select>
<br />
<label for="emoji-select">Choose Emoji:</label>
<select id="emoji-select">
<option value="127802">🌺</option>
<option value="128152">💘</option>
<option value="127806">🌾</option>
<option value="128640">🚀</option>
<option value="127819">🍋</option>
<option value="127754">🌊</option>
<option value="128184">💸</option>
<option value="128142">💎</option>
<option value="127807">🌿</option>
<option value="128172">💬</option>
</select>
</div>
<script src="sketch.js"></script>
</body>
</html>