-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
445 lines (399 loc) · 15 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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Test</title>
<link rel="stylesheet" href="./style.css" />
</head>
<body id="body">
<div id="cardGenerator">
<h1>Card Generator</h1>
<div id="cardGeneratorWrapper">
<!----------------------------->
<!-- Left Column -->
<!----------------------------->
<div id="leftColumn">
<div id="contentSettings">
<h3>Content Settings</h3>
<select id="sectionSelect">
<option value="card">Card</option>
<option value="top">Top</option>
<option value="bottom">Bottom</option>
<option value="left">Left</option>
<option value="right">Right</option>
<option value="middle">Middle</option>
</select>
<div class="rangeDivWrapper">
<label for="widthSlider">Section Width</label>
<input
type="range"
id="widthSlider"
min="10"
max="2048"
value="500"
/>
<span id="widthSliderValue" class="slider-value">500</span>
<span>px</span>
</div>
<div class="rangeDivWrapper">
<label for="heightSlider">Section Height</label>
<input
type="range"
id="heightSlider"
min="10"
max="2048"
value="500"
/>
<span id="heightSliderValue" class="slider-value">500</span>
<span>px</span>
</div>
<div class="rangeDivWrapper">
<label for="leftPosition">Left Position</label>
<input
type="range"
id="leftPosition"
min="0"
max="100"
value="0"
/>
<span id="leftPositionValue">0</span>
<span>%</span>
</div>
<div class="rangeDivWrapper">
<label for="topPosition">Top Position</label>
<input
type="range"
id="topPosition"
min="0"
max="100"
value="0"
/>
<span id="topPositionValue">0</span>
<span>%</span>
</div>
<div>
<label for="bgColor">Background Color</label>
<input type="color" id="bgColor" value="#0000ff" />
</div>
<div>
<label for="textArea">Set Text</label>
<textarea id="textArea" rows="3" cols="15"></textarea>
</div>
<div>
<button id="addMiddleButton">Add Middle</button>
<button id="deleteMiddleButton">Delete Middle</button>
</div>
<div>
<button id="resetButtonToEmpty" class="resetButton">
Reset to Empty
</button>
<button id="resetButtonToTemplate" class="resetButton">
Reset to Template
</button>
</div>
</div>
<div id="textSettings">
<h3>Text Settings</h3>
<div class="rangeDivWrapper">
<label for="fontSizeSlider">Font Size</label>
<input
type="range"
id="fontSizeSlider"
min="1"
max="256"
value="16"
/>
<span id="fontSizeSliderValue" class="slider-value">16</span>
<span>px</span>
</div>
<div>
<label>Font Family</label>
<select id="fontFamilySelect">
<option value="Arial" style="font-family: Arial">Arial</option>
<option value="Helvetica" style="font-family: Helvetica">
Helvetica
</option>
<option
value="Times New Roman"
style="font-family: 'Times New Roman'"
>
Times New Roman
</option>
<option value="Georgia" style="font-family: Georgia">
Georgia
</option>
<option value="Courier New" style="font-family: 'Courier New'">
Courier New
</option>
<option value="Verdana" style="font-family: Verdana">
Verdana
</option>
<option value="sans-serif" style="font-family: sans-serif">
Sans Serif
</option>
<option value="serif" style="font-family: serif">Serif</option>
</select>
</div>
<div>
<label for="fontColor">Text Color</label>
<input type="color" id="fontColor" value="#0000ff" />
</div>
<div class="rangeDivWrapper">
<label for="wordSpacingSlider">Word Spacing</label>
<input
type="range"
id="wordSpacingSlider"
min="-32"
max="64"
value="0"
/>
<span id="wordSpacingSliderValue" class="slider-value">0</span>
<span>px</span>
</div>
<div class="rangeDivWrapper">
<label for="lineHeightSlider">Line Height</label>
<input
type="range"
id="lineHeightSlider"
min="0"
max="10.0"
step="0.1"
value="1.2"
/>
<span id="lineHeightSliderValue" class="slider-value">1.2</span>
<span>em</span>
</div>
<div>
<label>Text Orientation</label>
<select id="writingModeSelect">
<option value="horizontal-tb">Horizontal</option>
<option value="vertical-rl">Vertical Right to Left</option>
<option value="vertical-lr">Vertical Left to Right</option>
<option value="vertical-rl-upright">
Vertical Right to Left (Upright)
</option>
<option value="vertical-lr-upright">
Vertical Left to Right (Upright)
</option>
</select>
</div>
<div>
<label>Text Alignment</label>
<div class="radioGroup">
<input
type="radio"
id="textAlignLeft"
name="textAlign"
value="left"
checked
/>
<label for="textAlignLeft">Left</label>
<input
type="radio"
id="textAlignCenter"
name="textAlign"
value="center"
/>
<label for="textAlignCenter">Center</label>
<input
type="radio"
id="textAlignRight"
name="textAlign"
value="right"
/>
<label for="textAlignRight">Right</label>
</div>
</div>
<label>Text Formatting</label>
<div class="controlWrapper">
<div class="checkboxGroup">
<label for="boldCheckbox">Bold Text</label>
<input type="checkbox" id="boldCheckbox" />
<label for="italicCheckbox">Italic</label>
<input type="checkbox" id="italicCheckbox" />
<label for="underlineCheckbox">Underline</label>
<input type="checkbox" id="underlineCheckbox" />
<label for="strikethroughCheckbox">Strikethrough</label>
<input type="checkbox" id="strikethroughCheckbox" />
</div>
</div>
</div>
</div>
<!-- end left -->
<!----------------------------->
<!-- Middle Column -->
<!----------------------------->
<div id="middleColumn">
<div id="previewContainer">
<h3>Preview</h3>
<div style="all: unset">
<div id="previewSettings"></div>
</div>
</div>
<div id="outputWrapper">
<h3>HTML Output</h3>
<button id="copyButton">Copy HTML</button>
<div id="htmlOutputSettings"></div>
</div>
</div>
<!-- end middle -->
<!----------------------------->
<!-- Right Column -->
<!----------------------------->
<div id="rightColumn">
<div id="borderSettings">
<h3>Border Settings</h3>
<div>
<div class="controlWrapper">
<label>Border Sides</label>
<div class="checkboxGroup">
<label for="topBorderCheckbox">Top Border</label>
<input type="checkbox" id="topBorderCheckbox" />
<label for="rightBorderCheckbox">Right Border</label>
<input type="checkbox" id="rightBorderCheckbox" />
<label for="bottomBorderCheckbox">Bottom Border</label>
<input type="checkbox" id="bottomBorderCheckbox" />
<label for="leftBorderCheckbox">Left Border</label>
<input type="checkbox" id="leftBorderCheckbox" />
</div>
</div>
<div>
<label>Border Type</label>
<select id="borderTypeSelect">
<option value="solid">Solid</option>
<option value="dashed">Dashed</option>
<option value="dotted">Dotted</option>
<option value="double">Double</option>
<option value="groove">Groove</option>
<option value="ridge">Ridge</option>
<option value="inset">Inset</option>
<option value="outset">Outset</option>
</select>
</div>
<div class="rangeDivWrapper">
<label for="borderSizeSlider">Border Size</label>
<input
type="range"
id="borderSizeSlider"
min="0"
max="128"
value="1"
/>
<span id="borderSizeSliderValue" class="slider-value">1</span>
<span>px</span>
</div>
<div class="rangeDivWrapper">
<label for="borderRadiusSliderValue">Roundend Corners</label>
<input
type="range"
id="borderRadiusSlider"
min="0"
max="128"
value="0"
/>
<span id="borderRadiusSliderValue" class="slider-value">0</span>
<span>px</span>
</div>
<div>
<label for="borderColor">Border Color</label>
<input type="color" id="borderColor" value="#0000ff" />
</div>
</div>
<div>
<label>Shadow Settings</label>
<div class="controlWrapper">
<div class="checkboxGroup">
<label for="shadowCheckbox">Shadow</label>
<input type="checkbox" id="shadowCheckbox" />
<label for="insetShadowCheckbox">Inset Shadow</label>
<input type="checkbox" id="insetShadowCheckbox" />
</div>
</div>
<div class="rangeDivWrapper">
<label for="shadowShiftRightSlider">Shadow Shift Right</label>
<input
type="range"
id="shadowShiftRightSlider"
min="-20"
max="20"
value="0"
/>
<span id="shadowShiftRightSliderValue" class="slider-value"
>0</span
>
<span>px</span>
</div>
<div class="rangeDivWrapper">
<label for="shadowShiftDownSlider">Shadow Shift Down</label>
<input
type="range"
id="shadowShiftDownSlider"
min="-20"
max="20"
value="0"
/>
<span id="shadowShiftDownSliderValue" class="slider-value"
>0</span
>
<span>px</span>
</div>
<div class="rangeDivWrapper">
<label for="shadowSpreadSlider">Shadow Spread</label>
<input
type="range"
id="shadowSpreadSlider"
min="0"
max="20"
value="0"
/>
<span id="shadowSpreadSliderValue" class="slider-value">0</span>
<span>px</span>
</div>
<div class="rangeDivWrapper">
<label for="shadowBlurSlider">Shadow Blur</label>
<input
type="range"
id="shadowBlurSlider"
min="0"
max="20"
value="0"
/>
<span id="shadowBlurSliderValue" class="slider-value">0</span>
<span>px</span>
</div>
<div class="rangeDivWrapper">
<label for="shadowOpacitySlider">Shadow Opacity</label>
<input
type="range"
id="shadowOpacitySlider"
min="0"
max="100"
value="50"
/>
<span id="shadowOpacitySliderValue" class="slider-value"
>50</span
>
<span>%</span>
</div>
<div>
<label for="shadowColor">Shadow Color</label>
<input type="color" id="shadowColor" value="#0000ff" />
</div>
</div>
</div>
<div id="helpSection">
<h3>Help</h3>
No help available.
</div>
</div>
<!-- end right -->
</div>
<!-- end grid -->
</div>
<!-- end container -->
<script type="module" src="js/state.js"></script>
<script type="module" src="js/generateHTML.js"></script>
<script type="module" src="js/main.js"></script>
</body>
</html>