-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathindex.html
296 lines (260 loc) · 19.8 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
---
# this is an empty front matter
---
<!doctype html>
<html lang="en">
<head>
<style>
@font-face {
font-family: 'rodchenkoctt';
src: url('rodchenkoctt.woff') format('woff');
font-weight: normal;
font-style: normal;
}
label {
cursor: pointer;
}
</style>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, shrink-to-fit=no, user-scalable=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<title>Warcry Fighter Card Creator (ALPHA)</title>
</head>
<body>
<div class="font-hack" style="font-family:'rodchenkoctt'; visibility: hidden">nothing to see here, move along</div>
<img id="cardBackground" style="display: none" src="card-bg.png">
<img id="weaponStatBlock" style="display: none" src="statblock.png">
<img id="runemarkBg" style="display: none" src="runemark-bg.png">
<div class="container">
<canvas id="myCanvas" width="630" height="450" style="
border:1px solid #000000;
width: 100%;
max-width: max-content;
height: auto;">
There should be a Canvas here.
</canvas>
</div>
<br/>
<div class="container" style="
border: 1px solid #00000080;
background-color: #c8c8c880;
padding: 20px;
border-radius: 2px;
">
<div style="display: grid; grid-template-columns: auto auto auto">
<label for="slotNameInput">Name:</label>
<input type="text" id="saveNameInput">
<input type="button" id="saveButton" value="Save" onclick="onSaveClicked()">
</div>
<br/>
<div style="display: grid; grid-template-columns: auto auto auto auto">
<label for="saveSlotsSelect">Local File:</label>
<select id="saveSlotsSelect">
</select>
<input type="button" value="Load" onclick="onLoadClicked()">
<input type="button" value="Delete" onclick="onDeleteClicked()">
</div>
</div>
</br>
<div class="container" style="
border: 1px solid #00000080;
background-color: #c8c8c880;
padding: 20px;
border-radius: 2px;
">
<label for="imageSelect">Choose Image:</label>
<input type="file" id="imageSelect" oninput="onAnyChange()" style="padding-bottom: 10px;">
<br>
<div style="display: grid; grid-template-columns: auto auto auto auto auto auto;">
<label for="imageOffsetX">Offset X:</label>
<input type="number" id="imageOffsetX" oninput="onAnyChange()" value="0" style="max-width: 50px;">
<label for="imageOffsetY">Offset Y:</label>
<input type="number" id="imageOffsetY" oninput="onAnyChange()" value="0" style="max-width: 50px;">
<label for="imageScalePercent">Scale %:</label>
<input type="number" id="imageScalePercent" oninput="onAnyChange()" min="0" max="300" value="100" style="max-width: 50px;">
</div>
</div>
<br/>
<div class="container" style="
border: 1px solid #00000080;
background-color: #c8c8c880;
padding: 20px;
border-radius: 2px;
">
<label for="factionRunemarkSelect">Faction Runemark:</label>
<div id="factionRunemarkSelect" class="d-flex flex-wrap">
{% include runemarkSelectRadio.html radioGroup="faction" backgroundColor="black" imgSrc="runemarks/factions/warbands/iron-golems.svg" title="Iron Golems" %}
{% include runemarkSelectRadio.html radioGroup="faction" backgroundColor="black" imgSrc="runemarks/factions/warbands/untamed-beasts.svg" title="Untamed Beasts" %}
{% include runemarkSelectRadio.html radioGroup="faction" backgroundColor="black" imgSrc="runemarks/factions/warbands/corvus-cabal.svg" title="Corvus Cabal" %}
{% include runemarkSelectRadio.html radioGroup="faction" backgroundColor="black" imgSrc="runemarks/factions/warbands/cypher-lords.svg" title="Cypher Lords" %}
{% include runemarkSelectRadio.html radioGroup="faction" backgroundColor="black" imgSrc="runemarks/factions/warbands/the-unmade.svg" title="The Unmade" %}
{% include runemarkSelectRadio.html radioGroup="faction" backgroundColor="black" imgSrc="runemarks/factions/warbands/scions-of-the-flame.svg" title="Scions of the Flame" %}
{% include runemarkSelectRadio.html radioGroup="faction" backgroundColor="black" imgSrc="runemarks/factions/warbands/spire-tyrants.svg" title="Spire Tyrants" %}
{% include runemarkSelectRadio.html radioGroup="faction" backgroundColor="black" imgSrc="runemarks/factions/warbands/splintered-fang.svg" title="Splintered Fang" %}
{% include runemarkSelectRadio.html radioGroup="faction" backgroundColor="black" imgSrc="runemarks/factions/chaos/khorne-demons.svg" title="Khorne (demons)" %}
{% include runemarkSelectRadio.html radioGroup="faction" backgroundColor="black" imgSrc="runemarks/factions/chaos/khorne-humans.svg" title="Khorne (humans)" %}
{% include runemarkSelectRadio.html radioGroup="faction" backgroundColor="black" imgSrc="runemarks/factions/chaos/tzeentch-demons.svg" title="Tzeentch (demons)" %}
{% include runemarkSelectRadio.html radioGroup="faction" backgroundColor="black" imgSrc="runemarks/factions/chaos/tzeentch-humans.svg" title="Tzeentch (humans)" %}
{% include runemarkSelectRadio.html radioGroup="faction" backgroundColor="black" imgSrc="runemarks/factions/chaos/nurgle-demons.svg" title="Nurgle (demons)" %}
{% include runemarkSelectRadio.html radioGroup="faction" backgroundColor="black" imgSrc="runemarks/factions/chaos/nurgle-humans.svg" title="Nurgle (humans)" %}
{% include runemarkSelectRadio.html radioGroup="faction" backgroundColor="black" imgSrc="runemarks/factions/chaos/slaanesh.svg" title="Slaanesh" %}
{% include runemarkSelectRadio.html radioGroup="faction" backgroundColor="black" imgSrc="runemarks/factions/chaos/slaves-to-darkness.svg" title="Slaves to Darkness" %}
{% include runemarkSelectRadio.html radioGroup="faction" backgroundColor="black" imgSrc="runemarks/factions/chaos/beasts-of-chaos.svg" title="Beasts of Chaos" %}
{% include runemarkSelectRadio.html radioGroup="faction" backgroundColor="black" imgSrc="runemarks/factions/chaos/skaven.svg" title="Skaven" %}
{% include runemarkSelectRadio.html radioGroup="faction" backgroundColor="black" imgSrc="runemarks/factions/death/legions-of-nagash.svg" title="Legions of Nagash" %}
{% include runemarkSelectRadio.html radioGroup="faction" backgroundColor="black" imgSrc="runemarks/factions/death/nighthaunt.svg" title="Nighthaunt" %}
{% include runemarkSelectRadio.html radioGroup="faction" backgroundColor="black" imgSrc="runemarks/factions/death/flesh-eater-courts.svg" title="Flesh Eater Courts" %}
{% include runemarkSelectRadio.html radioGroup="faction" backgroundColor="black" imgSrc="runemarks/factions/destruction/ironjawz.svg" title="Ironjawz" %}
{% include runemarkSelectRadio.html radioGroup="faction" backgroundColor="black" imgSrc="runemarks/factions/destruction/bonesplitterz.svg" title="Bonesplitterz" %}
{% include runemarkSelectRadio.html radioGroup="faction" backgroundColor="black" imgSrc="runemarks/factions/destruction/gloomspite-gitz.svg" title="Gloomspite Gitz" %}
{% include runemarkSelectRadio.html radioGroup="faction" backgroundColor="black" imgSrc="runemarks/factions/destruction/ogor-mawtribes.svg" title="Ogor Mawtribes" %}
{% include runemarkSelectRadio.html radioGroup="faction" backgroundColor="black" imgSrc="runemarks/factions/order/sacrosanct-chamber.svg" title="Stormcast Eternals Sacrosanct Chamber" %}
{% include runemarkSelectRadio.html radioGroup="faction" backgroundColor="black" imgSrc="runemarks/factions/order/vanguard-chamber.svg" title="Stormcast Eternals Vanguard Chamber" %}
{% include runemarkSelectRadio.html radioGroup="faction" backgroundColor="black" imgSrc="runemarks/factions/order/warrior-chamber.svg" title="Stormcast Eternals Warrior Chamber" %}
{% include runemarkSelectRadio.html radioGroup="faction" backgroundColor="black" imgSrc="runemarks/factions/order/daughters-of-khaine.svg" title="Daughters of Khaine" %}
{% include runemarkSelectRadio.html radioGroup="faction" backgroundColor="black" imgSrc="runemarks/factions/order/idoneth-deepkin.svg" title="Idoneth Deepkin" %}
{% include runemarkSelectRadio.html radioGroup="faction" backgroundColor="black" imgSrc="runemarks/factions/order/fyreslayers.svg" title="Fyreslayers" %}
{% include runemarkSelectRadio.html radioGroup="faction" backgroundColor="black" imgSrc="runemarks/factions/order/kharadron-overlords.svg" title="Kharadron Overlords" %}
{% include runemarkSelectRadio.html radioGroup="faction" backgroundColor="black" imgSrc="runemarks/factions/order/seraphon.svg" title="Seraphon" %}
{% include runemarkSelectRadio.html radioGroup="faction" backgroundColor="black" imgSrc="runemarks/factions/order/sylvaneth.svg" title="Sylvaneth" %}
{% include runemarkSelectRadio.html radioGroup="faction" backgroundColor="black" imgSrc="runemarks/factions/monsters/chaotic-beasts.svg" title="Chaotic Beast" %}
{% include runemarkSelectRadio.html radioGroup="faction" backgroundColor="black" imgSrc="runemarks/factions/monsters/death-monster.svg" title="Monster (Death)" %}
{% include runemarkSelectRadio.html radioGroup="faction" backgroundColor="black" imgSrc="runemarks/factions/monsters/destruction-monster.svg" title="Monster (Destruction)" %}
{% include runemarkSelectRadio.html radioGroup="faction" backgroundColor="black" imgSrc="runemarks/factions/monsters/order-monster.svg" title="Monster (Order)" %}
{% include runemarkSelectRadio.html radioGroup="faction" backgroundColor="black" imgSrc="runemarks/factions/allies/allies-khorne.svg" title="Khorne (allies)" %}
{% include runemarkSelectRadio.html radioGroup="faction" backgroundColor="black" imgSrc="runemarks/factions/allies/allies-tzeentch.svg" title="Tzeentch (allies)" %}
{% include runemarkSelectRadio.html radioGroup="faction" backgroundColor="black" imgSrc="runemarks/factions/allies/allies-nurgle.svg" title="Nurgle (allies)" %}
{% include runemarkSelectRadio.html radioGroup="faction" backgroundColor="black" imgSrc="runemarks/factions/allies/allies-slaves-to-darkness.svg" title="Slaves to Darkness (allies)" %}
{% include runemarkSelectRadio.html radioGroup="faction" backgroundColor="black" imgSrc="runemarks/factions/allies/allies-beasts-of-chaos.svg" title="Beasts of Chaos (allies)" %}
{% include runemarkSelectRadio.html radioGroup="faction" backgroundColor="black" imgSrc="runemarks/factions/allies/allies-skaven.svg" title="Skaven (allies)" %}
{% include runemarkSelectRadio.html radioGroup="faction" backgroundColor="black" imgSrc="runemarks/factions/allies/allies-legions-of-nagash.svg" title="Legions of Nagash (allies)" %}
{% include runemarkSelectRadio.html radioGroup="faction" backgroundColor="black" imgSrc="runemarks/factions/allies/allies-nighthaunt.svg" title="Nighthaunt (allies)" %}
{% include runemarkSelectRadio.html radioGroup="faction" backgroundColor="black" imgSrc="runemarks/factions/allies/allies-flesh-eater-courts.svg" title="Flesh Eater Courts (allies)" %}
{% include runemarkSelectRadio.html radioGroup="faction" backgroundColor="black" imgSrc="runemarks/factions/allies/allies-ironjawz.svg" title="Ironjawz (allies)" %}
{% include runemarkSelectRadio.html radioGroup="faction" backgroundColor="black" imgSrc="runemarks/factions/allies/allies-bonesplitterz.svg" title="Bonesplitterz (allies)" %}
{% include runemarkSelectRadio.html radioGroup="faction" backgroundColor="black" imgSrc="runemarks/factions/allies/allies-gloomspite-gitz.svg" title="Gloomspite Gitz (allies)" %}
{% include runemarkSelectRadio.html radioGroup="faction" backgroundColor="black" imgSrc="runemarks/factions/allies/allies-warrior-chamber.svg" title="Stormcast Eternals Warrior Chamber (allies)" %}
{% include runemarkSelectRadio.html radioGroup="faction" backgroundColor="black" imgSrc="runemarks/factions/allies/allies-daughters-of-khaine.svg" title="Daughters of Khaine (allies)" %}
{% include runemarkSelectRadio.html radioGroup="faction" backgroundColor="black" imgSrc="runemarks/factions/allies/allies-idoneth-deepkin.svg" title="Idoneth Deepkin (allies)" %}
</div>
<label for="additionalFactionMarkSelect">Load Runemark:</label>
<input type="file" id="additionalFactionMarkSelect" oninput="onFactionRunemarkFileSelect()">
</div>
<br/>
<div class="container" style="
border: 1px solid #00000080;
background-color: #c8c8c880;
padding: 20px;
border-radius: 2px;
display: grid;
grid-template-columns: auto auto auto auto;
">
<label for="numWounds">Wounds:</label>
<input type="number" id="numWounds" name="numWounds" min="1" max="1000", value="10", style="max-width: 50px;", oninput="onAnyChange()">
<label for="toughness">Toughness:</label>
<input type="number" id="toughness" name="toughness" min="0" max="100", value="3", style="max-width: 50px;", oninput="onAnyChange()">
<label for="movement">Movement:</label>
<input type="number" id="movement" name="movement" min="0" max="100", value="4", style="max-width: 50px;", oninput="onAnyChange()">
<label for="pointCost">Point Cost:</label>
<input type="number" id="pointCost" name="pointCost" min="0" max="9999", value="100", style="max-width: 50px;", oninput="onAnyChange()">
</div>
<br/>
<div class="container" style="
border: 1px solid #00000080;
background-color: #c8c8c880;
padding: 20px;
border-radius: 2px;
">
<label for="tagRunemarkSelect">Tag Runemarks:</label>
<div id="tagRunemarkSelect" class="d-flex flex-wrap">
{% include runemarkSelectCheckbox.html backgroundColor="white" imgSrc="runemarks/black/agile.svg" title="Agile" %}
{% include runemarkSelectCheckbox.html backgroundColor="white" imgSrc="runemarks/black/champion.svg" title="Champion" %}
{% include runemarkSelectCheckbox.html backgroundColor="white" imgSrc="runemarks/black/beast.svg" title="Beast" %}
{% include runemarkSelectCheckbox.html backgroundColor="white" imgSrc="runemarks/black/berzerker.svg" title="Berzerker" %}
{% include runemarkSelectCheckbox.html backgroundColor="white" imgSrc="runemarks/black/brute.svg" title="Brute" %}
{% include runemarkSelectCheckbox.html backgroundColor="white" imgSrc="runemarks/black/bulwark.svg" title="Bulwark" %}
{% include runemarkSelectCheckbox.html backgroundColor="white" imgSrc="runemarks/black/destroyer.svg" title="Destroyer" %}
{% include runemarkSelectCheckbox.html backgroundColor="white" imgSrc="runemarks/black/elite.svg" title="Elite" %}
{% include runemarkSelectCheckbox.html backgroundColor="white" imgSrc="runemarks/black/fly.svg" title="Fly" %}
{% include runemarkSelectCheckbox.html backgroundColor="white" imgSrc="runemarks/black/gargantuan.svg" title="Gargantuan" %}
{% include runemarkSelectCheckbox.html backgroundColor="white" imgSrc="runemarks/black/icon-bearer.svg" title="Icon Bearer" %}
{% include runemarkSelectCheckbox.html backgroundColor="white" imgSrc="runemarks/black/leader.svg" title="Leader" %}
{% include runemarkSelectCheckbox.html backgroundColor="white" imgSrc="runemarks/black/minion.svg" title="Minion" %}
{% include runemarkSelectCheckbox.html backgroundColor="white" imgSrc="runemarks/black/mount.svg" title="Mount" %}
{% include runemarkSelectCheckbox.html backgroundColor="white" imgSrc="runemarks/black/mystic.svg" title="Mystic" %}
{% include runemarkSelectCheckbox.html backgroundColor="white" imgSrc="runemarks/black/scout.svg" title="Scout" %}
{% include runemarkSelectCheckbox.html backgroundColor="white" imgSrc="runemarks/black/sentience.svg" title="Sentience" %}
{% include runemarkSelectCheckbox.html backgroundColor="white" imgSrc="runemarks/black/thrall.svg" title="Thrall" %}
{% include runemarkSelectCheckbox.html backgroundColor="white" imgSrc="runemarks/black/trapper.svg" title="Trapper" %}
{% include runemarkSelectCheckbox.html backgroundColor="white" imgSrc="runemarks/black/warrior.svg" title="Warrior" %}
</div>
<label for="additionalTagMarkSelect">Load Runemark:</label>
<input type="file" id="additionalTagMarkSelect" oninput="onTagRunemarkFileSelect()">
</div>
<br/>
<div id="weapon1" class="container" style="
border: 1px solid #00000080;
background-color: #c8c8c880;
padding: 20px;
border-radius: 2px;
">
<input type="checkbox", id="weaponEnabled" oninput="onWeaponControlsToggled(this)" checked>Weapon 1</input>
<div id="weaponInputs" style="display:block">
{% include weaponInputs.html weapon="weapon1" %}
</div>
</div>
<br/>
<div id="weapon2" class="container" style="
border: 1px solid #00000080;
background-color: #c8c8c880;
padding: 20px;
border-radius: 2px;
">
<input type="checkbox", id="weaponEnabled" oninput="onWeaponControlsToggled(this)">Weapon 2</input>
<div id="weaponInputs" style="display:none">
{% include weaponInputs.html weapon="weapon2" %}
</div>
</div>
<br/>
<div class="container" style="
border: 1px solid #00000080;
background-color: #c8c8c880;
padding: 20px;
border-radius: 2px;
">
<div style="display:grid; grid-template-columns: auto auto">
<input type="button" value="Clear All Saves!!!" id="clearCacheButton" onclick="onClearCache()">
</div>
</div>
<br/>
<div class="container">
<small>
<p>
Here you can create your own fighter cards for use in <a href="https://ageofsigmar.com/warcry/">Warcry</a> - simply modify the fighter's stats, runemarks and picture as you see fit, then save the resulting image.
</p>
<p>
<b>Warning! This is an unfinished work-in-progress, with more features and a better interface on the way!</b>
</p>
<p>
If you find a bug or have any suggestions please get in touch with me on <a href="https://www.twitter.com/nershly">Twitter</a> or create an issue on the GitHub repo <a href="https://github.com/rachelnertia/warcry-card-creator">here</a>. This is an open-source project: feel free to fork it, make pull requests, and do whatever you wish with it!
</p>
</small>
</div>
<br/>
<div class="container">
<small>
<p>
<b>Disclaimer:</b> This web application is in no way endorsed or sanctioned by Games Workshop - it is entirely unofficial in every sense. Imagary, logos, colour schemes etc have been sourced/borrowed from a variety of locations and I take absolutely no credit for their creation. Should the owner wish to authorise or cease useage then please contact me.
</p>
<p>
GW, Games Workshop, Warhammer, Warhammer Age of Sigmar, Warcry and all associated logos, illustrations, images, names, creatures, races, locations and the distinctive likenesses thereof are either ® or TM, and/or © Games Workshop Limited, variably registered around the world.
</p>
</small>
</div>
<script src="scripts/jquery-3.4.1.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
<script src="scripts/main.js"></script>
</body>
</html>