-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
171 lines (147 loc) · 4.96 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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title id="headtitle">Grid Lines Generator | FlyingKatsu</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
<link href="css/normalize.css" rel="stylesheet" media="all">
<link href="css/styles.css" rel="stylesheet" media="all">
<!--[if lt IE 9]><script src="js/html5shiv-printshiv.js" media="all"></script><![endif]-->
<script src="js/concrete.min.js" media="all"></script>
<script defer src="js/main.js" media="all"></script>
<style>
#canvasWrapper {
text-align: center;
}
#canvasWrapper > canvas {
border: 1px solid;
}
header {
background: #000;
color: #fff;
padding: 1em;
margin-bottom: 1em;
}
header > h1 {
margin: 0;
}
#wrap {
width: 64em;
margin: 0 auto;
}
#controlMenu, #canvasWrapper {
display: inline-block;
vertical-align: top;
}
#controlMenu {
width: 28em;
}
legend {
font-weight: bold;
}
input {
width: 4em;
}
.inputset {
margin: 0.75em 0;
}
#buttons {
margin: 1em 0;
}
fieldset > fieldset {
margin: 1em 0;
}
#bgError {
background-color: #ffaaaa;
font-weight: bold;
}
#bgError p {
padding: 0.25em;
}
#bgError p::before {
content: '⚠️ ';
}
#bgSettings input {
width: 100%;
}
</style>
</head>
<body>
<header role="banner">
<h1 id="bodytitle">Grid Lines Generator</h1>
</header>
<div class="wrap">
<main role="main">
<div id="controlMenu">
<fieldset class="controls">
<legend>Controls</legend>
<div id="buttons">
<button id="reset">Reset Defaults</button>
<button id="download">Download Image</button>
</div>
<fieldset>
<legend>Canvas Dimensions</legend>
<div class="inputset">
<label for="ppu">Pixels per Unit (PPU)</label>
<input type="number" id="ppu" name="ppu">
<label for="canvasUnits">Canvas Units</label>
<select id="canvasUnits" name="canvasUnits">
<option value="pixels">Pixels</option>
<option value="units">Units</option>
</select>
</div>
<div class="inputset" id="pxUnit">
<label for="width">Width (px)</label>
<input type="number" id="width" name="width">
<label for="height">Height (px)</label>
<input type="number" id="height" name="height">
</div>
<div class="inputset" id="customUnit">
<label for="unitWidth">Width (units)</label>
<input type="number" id="unitWidth" name="unitWidth">
<label for="unitHeight">Height (units)</label>
<input type="number" id="unitHeight" name="unitHeight">
</div>
<div class="inputset">
<label for="offsetX">Offset X (px)</label>
<input type="number" id="offsetX" name="offsetX">
<label for="offsetY">Offset Y (px)</label>
<input type="number" id="offsetY" name="offsetY">
<label for="autocenter">Auto-Center Grid</label>
<input type="checkbox" id="autocenter" name="autocenter">
</div>
<div class="inputset">
<label for="scale">Scale</label>
<input type="number" id="scale" name="scale">
</div>
</fieldset>
<fieldset>
<legend>Grid Style</legend>
<label for="color">Line Color</label>
<input type="color" id="color" name="color">
<label for="thickness">Line Width</label>
<input type="number" id="thickness" name="thickness">
</fieldset>
<fieldset id="bgSettings">
<legend>Background Image</legend>
<div class="inputset">
<button id="toggleBG">Hide BG</button>
<button id="clearBG">Clear BG</button>
</div>
<div class="inputset">
<label for="bgImgURL">Image URL</label>
<input type="text" id="bgImgURL" name="bgImgURL">
</div>
<div id="bgError"></div>
<div class="inputset">
<label for="bgImgFile">Image File Upload</label>
<input type="file" id="bgImgFile" name="bgImgFile">
</div>
</fieldset>
</fieldset>
</div>
<div id="canvasWrapper"></div>
</main>
</div>
</body>
</html>