-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.html
289 lines (279 loc) · 11.2 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
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></meta>
<title>CardPen</title>
<script src="lib/bind.min.js"></script>
<script src="lib/codemirror.js"></script>
<script src="mode/simple.js"></script>
<script src="mode/multiplex.js"></script>
<script src="mode/matchbrackets.js"></script>
<script src="mode/css/css.js"></script>
<script src="mode/javascript/javascript.js"></script>
<script src="mode/xml/xml.js"></script>
<script src="mode/htmlmixed/htmlmixed.js"></script>
<script src="mode/handlebars/handlebars.js"></script>
<script src="mode/markdown/markdown.js"></script>
<script src="mode/spreadsheet/spreadsheet.js"></script>
<script src="lib/FileSaver.min.js"></script>
<script src="lib/handlebars.min.js"></script>
<script src="lib/mustache.min.js"></script>
<script src="lib/papaparse.min.js"></script>
<script src="lib/underscore-min.js"></script>
<script src="lib/marked.js"></script>
<script src="lib/unidecode.js"></script>
<link href="css/codemirror.css" rel="stylesheet">
<link href="css/ambiance.css" rel="stylesheet">
<link href="css/main.css" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Montserrat|Raleway" rel="stylesheet">
</head>
<body>
<main>
<section id="header" class="thin">
<subsection>
<img class="icon" src="css/icon-joker.svg">
<div style="display:inline-block;"><span class="cpIcon">CardPen</span><br />
an HTML playing card generator</div>
</subsection>
<subsection class="double">
<subsubsection>
<h4>View:
<span class="nw">
<button type="button" class="small view cardsView" data-view="cardsView">Cards Only</button>
<button type="button" class="small view selected editorView" data-view="editorView">Editor</button>
<button type="button" class="small view settingsView" data-view="settingsView">Advanced</button>
<button type="button" class="small view help" data-view="help">Help</button>
</span>
</h4>
</subsubsection>
<subsubsection>
<h4>Project:
<span class="nw">
<button type="button" class="small load" id="clear">New</button>
<button type="button" class="small load" id="stored">Saved</button>
<button type="button" class="small load" id="eg">Examples</button>
<button type="button" class="small load" id="load">Load</button>
</span>
<form id="exampleForm">
<span class="projectToggle nw up" id="egSubsubsection" style="display:none;">
Load example:
<select id="exampleList" data-type="example"></select>
</span>
</form>
<form id="loadForm">
<span class="projectToggle nw up" id="loadSubsubsection" style="display:none;">
Load project file:
<input type="file" id="import" class="upload" data-type="import">
</span>
</form>
</h4>
</subsubsection>
</subsection>
</section>
<section class="indent thin settings" style="display:none;">
<subsection>
<h4>Project name:
<input type="text" id="projectName" value=""/>
<span>
<button type="button" id="export" class="small" title="Export this project to a file.">Export</button>
</span>
</h4>
<h4>Notes:
<textarea id="notes"></textarea>
</h4>
<h4 id="idkSection">BGG username:
<input type="text" id="username" placeholder="BGG username" style="width:25%;" value=""/>
<button type="button" id="idkFetch" class="small" title="Fetch your BGG collection as a card list for making I Don't Know, What Do You Want To Play? cards or other purposes.">Get Games</button>
</h4>
</subsection>
<subsection>
<h4>Bleed:
<input type="text" id="blsize" size="4" value=""/>
<span>
<input type="radio" id="blin" value="in" name="blunit"><label for="blin">in</label>
<input type="radio" id="blmm" value="mm" name="blunit"><label for="blmm">mm</label>
<input type="radio" id="blpx" value="px" name="blunit"><label for="blpx">px</label>
</span>
</h4>
<h4>Safe:
<input type="text" id="ssize" size="4" value=""/>
<span>
<input type="radio" id="sin" value="in" name="sunit"><label for="sin">in</label>
<input type="radio" id="smm" value="mm" name="sunit"><label for="sqmm">mm</label>
<input type="radio" id="spx" value="px" name="sunit"><label for="spx">px</label>
</span>
</h4>
<h4>Corner radius:
<span>
<input type="text" id="bradius" size="4" value=""/>
<input type="radio" id="brin" value="in" name="brunit"><label for="brin">in</label>
<input type="radio" id="brmm" value="mm" name="brunit"><label for="brmm">mm</label>
</span>
</h4>
<h4 title="Externtal stylesheet URL (e.g. Google Fonts)">
URL: <input type="text" id="extCSS" value=""/>
</h4>
</subsection>
<subsection>
<h4 id="csizeWrapper" class="indent">
Card size:
<select id="csize" style="width:50%;"></select>
<button type="button" class="small view sizes" data-view="sizes" id="viewSizes">View sizes</button>
<span class="nw" id="customize" style="display:none;">
<input id="cwidth" placeholder="width" type="text" size="6"> x <input id="cheight" placeholder="height" type="text" size="6">
<input type="radio" id="cin" value="in" name="cunit"><label for="cin">in</label>
<input type="radio" id="cmm" value="mm" name="cunit"><label for="cmm">mm</label>
<input type="radio" id="cpx" value="px" name="cunit"><label for="cpx">px</label>
<input type="checkbox" id="ccircle"><label for="ccircle">circular</label>
</span>
</h4>
<h4 class="indent">
Orientation:
<span>
<span class="nw">
<input type="radio" id="cportrait" value="portrait" name="cori">
<label for="cportrait">Portrait</label>
</span>
<span class="nw">
<input type="radio" id="clandscape" value="landscape" name="cori">
<label for="clandscape">Landscape</label>
</span>
</span>
</h4>
<h4 class="indent">
Card classes:
<input type="text" id="cardClass" value="" />
</h4>
<h4 class="indent" title="Optionally make single cards out of more than one spreadsheet line.">
Rowsets: <input type="text" id="rscount" style="width:2em;" maxlength="3" value="" title="row(s)/card" />
<span class="nw">
<input type="radio" id="rBunch" name="rsstyle" value="bunch" /> <label for="rBunch" title="(1 2 3) (4 5 6) (7 8 9)">bunch</label>
</span>
<span class="nw">
<input type="radio" id="rCycle" name="rsstyle" value="cycle" /> <label for="rCycle" title="(1 4 7) (2 5 8) (3 6 9)">cycle</label>
</span>
<span class="nw">
<input type="radio" id="rRandom" name="rsstyle" value="random" /> <label for="rRandom" title="(4 9 7) (2 1 6) (5 3 8)">random</label>
</span>
</h4>
<h4 class="indent" title="Optionally select specific card indexes to render .">
Cards: <input type="text" id="cindices" style="width:10em;" maxlength="15" value="" title="card indices" />
</h4>
</subsection>
</section>
<section id="textareas">
<subsection id="cpCSV">
<h4>Your cards
<span style="padding-left:50%;">
<button type="button" id="addCard" title="Add a card.">+</button>
<button type="button" id="removeCard" title="Remove the last card.">-</button>
</span>
</h4>
<textarea id="csv"></textarea>
<span class="nw up">Load csv:
<input type="file" id="csvUpload" class="upload" data-type="csv">
</span>
</subsection>
<subsection id="cpCSS">
<h4>Your styles (optional)</h4>
<textarea id="css"></textarea>
<span class="nw up">Load css:
<input type="file" id="cssUpload" class="upload" data-type="css">
</span>
</subsection>
<subsection id="cpTMPL">
<h4>Your template
<span class="settings nw" style="padding-left:20%;display:none;">
<input type="checkbox" id="useMustache" title="Use Mustache instead of Handlebars."> mustache
</span>
</h4>
<textarea id="mustache"></textarea>
<span class="nw up">Load template:
<input type="file" id="mustacheUpload" class="upload" data-type="mustache">
</span>
</subsection>
</section>
<section class="indent thin settings" style="display:none;">
<subsection>
<h4>Image DPI:
<span class="nw">
<input type="text" id="dpi" size="5" value="300"/>
(<span id="expectedSize" title="Size of generated images in pixels."></span>)
</span>
</h4>
<h4 title="An opacity of 1 is solid, 0 is transparent.">
<input type="checkbox" id="overlay"> Overlay
Opacity: <input type="text" id="oopa" size="4" value=""/>
</h4>
<h4 title="The URL of a template image to be overlaid over each card. Reduce opacity as necessary.">
URL: <input type="text" id="oURL" value=""/>
</h4>
</subsection>
<subsection>
<h4>Margins:
<span>
<input type="text" id="msize" size="4" value=""/>
<input type="radio" id="min" value="in" name="munit"><label for="min">in</label>
<input type="radio" id="mmm" value="mm" name="munit"><label for="mmm">mm</label>
</span>
</h4>
<h4>Gutters:
<span>
<input type="text" id="gsize" size="4" value=""/>
<input type="radio" id="gin" value="in" name="gunit"><label for="gin">in</label>
<input type="radio" id="gmm" value="mm" name="gunit"><label for="gmm">mm</label>
</span>
</h4>
<h4>
<input type="checkbox" id="cutline"> Cut line
</h4>
</subsection>
<subsection>
<h4>Page size:
<select id="psize"></select>
</h4>
<h4>Orientation:
<span>
<span class="nw">
<input type="radio" id="pportrait" value="portrait" name="pori">
<label for="pportrait">Portrait</label>
</span>
<span class="nw">
<input type="radio" id="plandscape" value="landscape" name="pori">
<label for="plandscape">Landscape</label>
</span>
</span>
</h4>
<h4>
<input type="checkbox" id="live"><label title="Update HTML rendering as you type."> Live HTML</label>
</h4>
</subsection>
</section>
<section id="buttons">
<subsection class="double buttons">
<subsubsection class="show" style="display:none;">
<h4 class="nw">View:
<button type="button" class="small view cardsView" data-view="cardsView">Cards Only</button>
<button type="button" class="small view selected editorView" data-view="editorView">Editor</button>
<button type="button" class="small view settingsView" data-view="settingsView">Advanced</button>
<button type="button" class="small view help" data-view="help">Help</button>
</h4>
</subsubsection>
<subsubsection id="outputButtons">
<h4 class="nw">Format:
<button type="button" class="small format image" data-format="image" title="Convert cards to PNGs.">Images</button>
<button type="button" class="small format html" data-format="html" title="(Re)generate HTML output.">HTML</button>
<button type="button" class="small format print" data-format="print" title="Print HTML output from your browser.">Print</button>
</h4>
</subsubsection>
</subsection>
</section>
</main>
<output>
<iframe id="cpOutput"></iframe>
</output>
<script src="js/const.js"></script>
<script src="js/main.js"></script>
</body>
</html>