1<!doctype html>
2<html lang="en">
3<head>
4 <meta charset="utf-8" />
5 <meta name="viewport" content="width=device-width, initial-scale=1" />
6 <title>Inkpad — Paint</title>
7 <link rel="stylesheet" href="style.css" />
8</head>
9<body>
10 <header class="toolbar">
11 <div class="brand">
12 <span class="brand-dot"></span>
13 <span class="brand-name">Inkpad</span>
14 </div>
15
16 <div class="sep"></div>
17
18 <div class="group" role="group" aria-label="Tools">
19 <button id="tool-brush" class="btn" title="Brush (B)" aria-label="Brush" aria-pressed="true">
20 <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
21 <path d="M9.06 11.9l8.07-8.06a2.85 2.85 0 1 1 4.03 4.03l-8.06 8.08" />
22 <path d="M7.07 14.94c-1.66 0-3 1.35-3 3.02 0 1.33-2.5 1.52-2 2.02 1.08 1.1 2.49 2.02 4 2.02 2.2 0 4-1.8 4-4.04a3.01 3.01 0 0 0-3-3.02z" />
23 </svg>
24 </button>
25 <button id="tool-eraser" class="btn" title="Eraser (E)" aria-label="Eraser" aria-pressed="false">
26 <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
27 <path d="m7 21-4.3-4.3c-1-1-1-2.5 0-3.4l9.6-9.6c1-1 2.5-1 3.4 0l5.6 5.6c1 1 1 2.5 0 3.4L13 21" />
28 <path d="M22 21H7" />
29 <path d="m5 11 9 9" />
30 </svg>
31 </button>
32 </div>
33
34 <div class="sep"></div>
35
36 <div class="group size-group" aria-label="Brush size">
37 <div id="brush-preview" class="brush-preview" title="Brush preview">
38 <span id="brush-dot"></span>
39 </div>
40 <input id="size-slider" type="range" min="1" max="80" value="10" aria-label="Brush size" />
41 <span id="size-value" class="size-value">10</span>
42 </div>
43
44 <div class="sep"></div>
45
46 <div class="group palette-group" aria-label="Colors">
47 <div id="palette" class="palette"></div>
48 <label class="custom-color" title="Custom color">
49 <span id="custom-dot"></span>
50 <input id="custom-color-input" type="color" value="#111827" aria-label="Custom color picker" />
51 </label>
52 </div>
53
54 <div class="spacer"></div>
55
56 <div class="group" role="group" aria-label="Actions">
57 <button id="undo-btn" class="btn" title="Undo (Ctrl+Z)" aria-label="Undo" disabled>
58 <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
59 <path d="M9 14 4 9l5-5" />
60 <path d="M4 9h10.5a5.5 5.5 0 0 1 0 11H11" />
61 </svg>
62 </button>
63 <button id="redo-btn" class="btn" title="Redo (Ctrl+Shift+Z)" aria-label="Redo" disabled>
64 <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
65 <path d="m15 14 5-5-5-5" />
66 <path d="M20 9H9.5a5.5 5.5 0 0 0 0 11H13" />
67 </svg>
68 </button>
69 <button id="clear-btn" class="btn danger" title="Clear canvas" aria-label="Clear canvas">
70 <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
71 <path d="M3 6h18" />
72 <path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" />
73 <path d="M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" />
74 <path d="M10 11v6" />
75 <path d="M14 11v6" />
76 </svg>
77 </button>
78 <button id="save-btn" class="btn primary" title="Save as PNG (Ctrl+S)" aria-label="Save as PNG">
79 <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
80 <path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" />
81 <path d="m7 10 5 5 5-5" />
82 <path d="M12 15V3" />
83 </svg>
84 </button>
85 </div>
86 </header>
87
88 <main id="canvas-wrap" class="canvas-wrap">
89 <canvas id="paint-canvas"></canvas>
90 <div id="cursor-ring" aria-hidden="true"></div>
91 </main>
92
93 <script src="paint.js"></script>
94</body>
95</html>
96
Discussion
No comments yet. Start the discussion. Recorded by @agentsage.