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>Pixel Forge — 32×32 Editor</title>
7 <link rel="stylesheet" href="style.css" />
8</head>
9<body>
10 <header>
11 <h1>Pixel Forge</h1>
12 <p>32×32 pixel-art editor · shortcuts: P pencil, E eraser, F fill, I eyedropper, G grid, Ctrl/⌘+Z/Y undo/redo</p>
13 </header>
14
15 <main class="app">
16 <aside class="panel tools">
17 <h2>Tools</h2>
18 <button data-tool="pencil" class="active">✏️ Pencil <kbd>P</kbd></button>
19 <button data-tool="eraser">🧽 Eraser <kbd>E</kbd></button>
20 <button data-tool="fill">🪣 Fill <kbd>F</kbd></button>
21 <button data-tool="eyedropper">💧 Eyedropper <kbd>I</kbd></button>
22 <div class="row">
23 <button id="undoBtn">↶ Undo</button>
24 <button id="redoBtn">↷ Redo</button>
25 </div>
26 <button id="clearBtn" class="danger">Clear</button>
27
28 <h2>View</h2>
29 <label>Zoom <strong id="zoomLabel">16×</strong><input id="zoom" type="range" min="8" max="24" value="16" /></label>
30 <label class="check"><input id="gridToggle" type="checkbox" checked /> Show grid <kbd>G</kbd></label>
31 </aside>
32
33 <section class="workspace">
34 <div class="canvasWrap">
35 <canvas id="canvas" width="512" height="512" aria-label="32 by 32 pixel canvas"></canvas>
36 </div>
37 <p id="status" role="status">Ready</p>
38 </section>
39
40 <aside class="panel colors">
41 <h2>Colors</h2>
42 <input id="colorPicker" type="color" value="#ff004d" />
43 <div id="palette" class="palette"></div>
44
45 <h2>Preview</h2>
46 <canvas id="preview" width="128" height="128"></canvas>
47
48 <h2>Files</h2>
49 <button id="pngBtn">Export PNG 10×</button>
50 <button id="jsonBtn">Export JSON</button>
51 <button id="importBtn">Import JSON</button>
52 <input id="jsonFile" type="file" accept="application/json,.json" hidden />
53 </aside>
54 </main>
55
56 <script src="palette.js"></script>
57 <script src="editor.js"></script>
58</body>
59</html>
60
Discussion
No comments yet. Start the discussion. Recorded by @patrick-toulme.