-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
78 lines (71 loc) · 3.96 KB
/
index.html
File metadata and controls
78 lines (71 loc) · 3.96 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
<!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="theme-color" content="#000000">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="apple-mobile-web-app-title" content="PaintApp">
<link rel="manifest" href="manifest.json">
<link rel="icon" href="assets/icons/icon.svg" type="image/svg+xml">
<link rel="alternate icon" href="assets/icons/icon-192.png" sizes="192x192">
<link rel="apple-touch-icon" href="assets/icons/icon-192.png">
<link rel="apple-touch-icon" href="assets/icons/icon-512.png">
<link rel="alternate icon" href="assets/icons/icon-512.png" sizes="512x512">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="style.css">
<title>Paint</title>
</head>
<body>
<div class="container">
<div class="panel">
<div class="brushSizes">
<input type="radio" name="size" id="1" onclick="brushSize('1')">
<input type="radio" name="size" id="2" onclick="brushSize('2')">
<input type="radio" name="size" id="3" onclick="brushSize('3')">
</div>
<div class="colors">
<button id="bucket" onclick="toggleBucket()"></button>
<button id="inspector" onclick="toggleInspector()"></button>
<button id="eraser" onclick="clr()"></button>
<button id="clrscr" onclick="clrscr()"></button>
<div class="colors-panel">
<div class="left">
<button id="red" onclick="color('#FF0000')" style="background: #FF0000"></button>
<button id="orange" onclick="color('#FF8000')" style="background: #FF8000"></button>
<button id="yellow" onclick="color('#FFFF00')" style="background: #FFFF00"></button>
<button id="lightGreen" onclick="color('#80FF00')" style="background: #80FF00"></button>
<button id="green" onclick="color('#00FF00')" style="background: #00FF00"></button>
<button id="aqua" onclick="color('#00FF80')" style="background: #00FF80"></button>
</div>
<div class="right">
<button id="cyan" onclick="color('#00FFFF')" style="background: #00FFFF"></button>
<button id="azure" onclick="color('#0080FF')" style="background: #0080FF"></button>
<button id="blue" onclick="color('#0000FF')" style="background: #0000FF"></button>
<button id="Voilet" onclick="color('#8000FF')" style="background: #8000FF"></button>
<button id="magenta" onclick="color('#FF00FF')" style="background: #FF00FF"></button>
<button id="brightPink" onclick="color('#FF0080')" style="background: #FF0080"></button>
</div>
</div>
<button id="black" onclick="color('#000000')" style="background: #000000"></button>
<button id="custom" onclick="custom()"></button>
</div>
</div>
<canvas id="canvas"></canvas>
</div>
<a class="save" id="download" onclick="downloadCanvas(this, 'canvas', 'test.png');"><i class="fa fa-save"></i> Save</a>
<a class="open" id="upload" onclick="defaultFile.click();"><i class="fa fa-upload"></i> Open</a>
<input type="file" id="default-file" hidden />
<script src="app.js"></script>
<script>
if ("serviceWorker" in navigator) {
window.addEventListener("load", () => {
navigator.serviceWorker.register("sw.js")
.catch(err => console.error("SW registration failed:", err));
});
}
</script>
</body>
</html>