about summary refs log tree commit diff stats
path: root/js/pixel-art/pixel/index.html
blob: 91f18138d788f7c5b8bfd30b6c444ea87b7befd4 (plain) (blame)
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
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Pixel Pixel Pixel Pixel Pixel Pixel</title>
    <meta name="description" content="Draw me a goblin, please.">
    <style>
        body, html {
            margin: 0;
            padding: 0;
            overflow: hidden;
            background-color: teal;
        }
        button {
            padding: 4px 10px;
            font-size: 16px;
            cursor: pointer;
        }
        #canvas {
            display: block;
        }
        #palette {
            position: absolute;
            top: 10px;
            right: 10px;
            background-color: beige;
            padding: 10px;
            border: 1px solid #ccc;
            border-radius: 5px;
            width: 150px;
        }

        #palette label,
        #palette input,
        #palette button {
            display: block;
            margin-bottom: 10px;
            width: 100%;
        }

        .color-history {
            display: flex;
            flex-wrap: wrap;
        }

        .color-history div {
            width: 20px;
            height: 20px;
            border: 1px solid #000;
            cursor: pointer;
            margin-right: 5px;
            margin-bottom: 5px;
        }

        .color-history {
            display: flex;
            margin-top: 10px;
        }
        .color-history div {
            width: 20px;
            height: 20px;
            border: 1px solid #000;
            cursor: pointer;
            margin-right: 5px;
        }
    </style>
</head>
<body>
    <canvas id="canvas"></canvas>
    <div id="palette">
        <label for="gridWidth">Grid Width:</label>
        <input type="number" id="gridWidth" value="16" min="1">
        <label for="gridHeight">Grid Height:</label>
        <input type="number" id="gridHeight" value="16" min="1">
        <br>
        <label for="colorPicker">Select Color:</label>
        <input type="color" id="colorPicker" value="#000000">
        <div id="colorHistory" class="color-history"></div>
        <button id="exportBtn">Export as PNG</button>
        <button id="resetBtn">Reset</button>
        <!--<input type="file" id="importBtn" accept="image/png">-->
    </div>
    <script src="app.js"></script>
</body>
</html>