summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cards.css12
-rw-r--r--create.html26
-rw-r--r--images/background.png (renamed from background.png)bin28112 -> 28112 bytes
-rw-r--r--images/cavalry1.png (renamed from cavalry1.png)bin47326 -> 47326 bytes
-rw-r--r--images/cavalry2.png (renamed from cavalry2.png)bin42698 -> 42698 bytes
-rw-r--r--images/die_black_pips.svg (renamed from die_black_pips.svg)0
-rw-r--r--images/die_white_pips.svg (renamed from die_white_pips.svg)0
-rw-r--r--images/inf-cav.pngbin0 -> 140676 bytes
-rw-r--r--images/infantry1.png (renamed from infantry1.png)bin27165 -> 27165 bytes
-rw-r--r--images/infantry2.png (renamed from infantry2.png)bin24723 -> 24723 bytes
-rw-r--r--images/link_left.svg (renamed from link_left.svg)0
-rw-r--r--images/link_right.svg (renamed from link_right.svg)0
-rw-r--r--info/aoa-cover.jpgbin0 -> 120270 bytes
-rw-r--r--info/aoa-cover.pngbin0 -> 602160 bytes
-rw-r--r--info/base-cover.jpgbin0 -> 156810 bytes
-rw-r--r--info/base-cover.pngbin0 -> 467331 bytes
-rw-r--r--info/cal-cover.jpgbin0 -> 78651 bytes
-rw-r--r--info/cal-cover.pngbin0 -> 458689 bytes
-rw-r--r--info/ecw-cover.jpgbin0 -> 87372 bytes
-rw-r--r--info/ecw-cover.pngbin0 -> 516857 bytes
-rw-r--r--info/getty-cover.jpgbin0 -> 123236 bytes
-rw-r--r--info/getty-cover.pngbin0 -> 635304 bytes
-rw-r--r--info/tga-cover.jpgbin0 -> 138393 bytes
-rw-r--r--info/tga-cover.pngbin0 -> 690197 bytes
-rw-r--r--info/wotr-cover.jpgbin0 -> 123366 bytes
-rw-r--r--info/wotr-cover.pngbin0 -> 346587 bytes
-rw-r--r--play.html4
27 files changed, 32 insertions, 10 deletions
diff --git a/cards.css b/cards.css
index 716d526..e629c05 100644
--- a/cards.css
+++ b/cards.css
@@ -55,19 +55,19 @@
}
.link.left {
- background-image: url(link_left.svg);
+ background-image: url(images/link_left.svg);
left: 0px;
}
.link.right {
- background-image: url(link_right.svg);
+ background-image: url(images/link_right.svg);
right: 0px;
}
-.symbol.infantry1 { background-image: url(infantry1.png); }
-.symbol.infantry2 { background-image: url(infantry2.png); }
-.symbol.cavalry1 { background-image: url(cavalry1.png); }
-.symbol.cavalry2 { background-image: url(cavalry2.png); }
+.symbol.infantry1 { background-image: url(images/infantry1.png); }
+.symbol.infantry2 { background-image: url(images/infantry2.png); }
+.symbol.cavalry1 { background-image: url(images/cavalry1.png); }
+.symbol.cavalry2 { background-image: url(images/cavalry2.png); }
.strength {
position: absolute;
diff --git a/create.html b/create.html
index 48c6db3..e1bb4f4 100644
--- a/create.html
+++ b/create.html
@@ -1,8 +1,27 @@
<link rel="stylesheet" href="/table-battles/cards.css">
<style>
-.card { box-shadow: var(--drop-shadow) }
+.card { box-shadow: var(--drop-shadow); background-size: 240px 336px; }
+.card.exp0 { background-image: url(/table-battles/info/base-cover.jpg); }
+.card.exp1 { background-image: url(/table-battles/info/wotr-cover.jpg); }
+.card.exp2 { background-image: url(/table-battles/info/aoa-cover.jpg); }
+.card.exp3 { background-image: url(/table-battles/info/getty-cover.jpg); }
+.card.exp4 { background-image: url(/table-battles/info/ecw-cover.jpg); }
+.card.exp5 { background-image: url(/table-battles/info/tga-cover.jpg); }
+.card.exp6 { background-image: url(/table-battles/info/cal-cover.jpg); }
</style>
-<div id="preview"></div>
+<div style="display:none">
+<div class="card exp0" data-scenario="Random"></div>
+<div class="card exp0" data-scenario="Random - Table Battles"></div>
+<div class="card exp1" data-scenario="Random - Wars of the Roses"></div>
+<div class="card exp2" data-scenario="Random - Age of Alexander"></div>
+<div class="card exp3" data-scenario="Random - Gettysburg"></div>
+<div class="card exp4" data-scenario="Random - English Civil War"></div>
+<div class="card exp5" data-scenario="Random - The Grand Alliance"></div>
+<div class="card exp6" data-scenario="Random - Charles Alexander of Lorraine"></div>
+</div>
+<div id="preview">
+<div class="card exp0"></div>
+</div>
<script>
var select = document.querySelector("select[name='scenario']")
@@ -14,12 +33,15 @@ window.onload = async function () {
.then(r => r.text())
.then(html => {
list = (new DOMParser()).parseFromString(html, "text/html")
+ select.onchange()
})
}
select.onchange = function (evt) {
if (list) {
let node = list.getElementById("scenario_" + parseInt(select.value))
+ if (!node)
+ node = document.querySelector(`[data-scenario='${select.value}']`)
if (node)
preview.replaceChildren(node.cloneNode(true))
else
diff --git a/background.png b/images/background.png
index b74a38b..b74a38b 100644
--- a/background.png
+++ b/images/background.png
Binary files differ
diff --git a/cavalry1.png b/images/cavalry1.png
index d559314..d559314 100644
--- a/cavalry1.png
+++ b/images/cavalry1.png
Binary files differ
diff --git a/cavalry2.png b/images/cavalry2.png
index fed27ef..fed27ef 100644
--- a/cavalry2.png
+++ b/images/cavalry2.png
Binary files differ
diff --git a/die_black_pips.svg b/images/die_black_pips.svg
index 4b2f538..4b2f538 100644
--- a/die_black_pips.svg
+++ b/images/die_black_pips.svg
diff --git a/die_white_pips.svg b/images/die_white_pips.svg
index efc864b..efc864b 100644
--- a/die_white_pips.svg
+++ b/images/die_white_pips.svg
diff --git a/images/inf-cav.png b/images/inf-cav.png
new file mode 100644
index 0000000..0005d7b
--- /dev/null
+++ b/images/inf-cav.png
Binary files differ
diff --git a/infantry1.png b/images/infantry1.png
index d6e3904..d6e3904 100644
--- a/infantry1.png
+++ b/images/infantry1.png
Binary files differ
diff --git a/infantry2.png b/images/infantry2.png
index f4bcc90..f4bcc90 100644
--- a/infantry2.png
+++ b/images/infantry2.png
Binary files differ
diff --git a/link_left.svg b/images/link_left.svg
index 2db1ef2..2db1ef2 100644
--- a/link_left.svg
+++ b/images/link_left.svg
diff --git a/link_right.svg b/images/link_right.svg
index 4520f3d..4520f3d 100644
--- a/link_right.svg
+++ b/images/link_right.svg
diff --git a/info/aoa-cover.jpg b/info/aoa-cover.jpg
new file mode 100644
index 0000000..3b2b537
--- /dev/null
+++ b/info/aoa-cover.jpg
Binary files differ
diff --git a/info/aoa-cover.png b/info/aoa-cover.png
new file mode 100644
index 0000000..fd25c97
--- /dev/null
+++ b/info/aoa-cover.png
Binary files differ
diff --git a/info/base-cover.jpg b/info/base-cover.jpg
new file mode 100644
index 0000000..d89f416
--- /dev/null
+++ b/info/base-cover.jpg
Binary files differ
diff --git a/info/base-cover.png b/info/base-cover.png
new file mode 100644
index 0000000..c1dd7e8
--- /dev/null
+++ b/info/base-cover.png
Binary files differ
diff --git a/info/cal-cover.jpg b/info/cal-cover.jpg
new file mode 100644
index 0000000..a86ca75
--- /dev/null
+++ b/info/cal-cover.jpg
Binary files differ
diff --git a/info/cal-cover.png b/info/cal-cover.png
new file mode 100644
index 0000000..c8c1221
--- /dev/null
+++ b/info/cal-cover.png
Binary files differ
diff --git a/info/ecw-cover.jpg b/info/ecw-cover.jpg
new file mode 100644
index 0000000..2cce24f
--- /dev/null
+++ b/info/ecw-cover.jpg
Binary files differ
diff --git a/info/ecw-cover.png b/info/ecw-cover.png
new file mode 100644
index 0000000..12540fc
--- /dev/null
+++ b/info/ecw-cover.png
Binary files differ
diff --git a/info/getty-cover.jpg b/info/getty-cover.jpg
new file mode 100644
index 0000000..b04c20b
--- /dev/null
+++ b/info/getty-cover.jpg
Binary files differ
diff --git a/info/getty-cover.png b/info/getty-cover.png
new file mode 100644
index 0000000..17d8f93
--- /dev/null
+++ b/info/getty-cover.png
Binary files differ
diff --git a/info/tga-cover.jpg b/info/tga-cover.jpg
new file mode 100644
index 0000000..dfd5942
--- /dev/null
+++ b/info/tga-cover.jpg
Binary files differ
diff --git a/info/tga-cover.png b/info/tga-cover.png
new file mode 100644
index 0000000..3100362
--- /dev/null
+++ b/info/tga-cover.png
Binary files differ
diff --git a/info/wotr-cover.jpg b/info/wotr-cover.jpg
new file mode 100644
index 0000000..b9b2659
--- /dev/null
+++ b/info/wotr-cover.jpg
Binary files differ
diff --git a/info/wotr-cover.png b/info/wotr-cover.png
new file mode 100644
index 0000000..1d330ac
--- /dev/null
+++ b/info/wotr-cover.png
Binary files differ
diff --git a/play.html b/play.html
index ba7f5f4..2ae21fc 100644
--- a/play.html
+++ b/play.html
@@ -21,7 +21,7 @@
main {
background-color: #666;
- background-image: url(background.png);
+ background-image: url(images/background.png);
background-attachment: local;
box-shadow: inset 0 0 8px #0008;
}
@@ -217,7 +217,7 @@ main[data-scenario="5"] {
background-size: 600% 100%;
background-repeat: no-repeat;
- background-image: url(die_black_pips.svg);
+ background-image: url(images/die_black_pips.svg);
background-color: #ccc;
border-color: #e5e5e5 #a0a0a0 #a0a0a0 #e5e5e5;
box-shadow: 0 0 0 1px #333, 1px 2px 3px 1px #0004;