Organize public directory contents into assets folders

This commit is contained in:
Catalin Constantin Mititiuc 2025-06-16 22:41:29 -07:00
parent 49d77d249d
commit 17e28ba214
45 changed files with 20 additions and 123 deletions

BIN
map1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 MiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 6.5 KiB

View File

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

View File

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

View File

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 31 KiB

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

@ -2,17 +2,12 @@
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg viewBox="-18 -150 2320 3360" xmlns="http://www.w3.org/2000/svg"> <svg viewBox="-18 -150 2320 3360" xmlns="http://www.w3.org/2000/svg">
<link xmlns="http://www.w3.org/1999/xhtml" rel="stylesheet" href="map.css" type="text/css"/> <link xmlns="http://www.w3.org/1999/xhtml" rel="stylesheet" href="../css/map.css" type="text/css"/>
<style> <style>
g[data-edge="north"] { --i: -2; } g[data-edge="north"] { --i: -2; }
g[data-edge="south"] { --i: 52; } g[data-edge="south"] { --i: 52; }
</style> </style>
<defs> <defs>
<!-- <g id="hex">
<polygon points="0,10 8.66,5 8.66,-5 0,-10 -8.66,-5 -8.66,5"/>
<circle cx="0" cy="0" r="1" fill="black"/>
</g> -->
<polygon id="hex" points="0,10 8.66,5 8.66,-5 0,-10 -8.66,-5 -8.66,5"/> <polygon id="hex" points="0,10 8.66,5 8.66,-5 0,-10 -8.66,-5 -8.66,5"/>
<circle id="counter-base" cx="0" cy="0" r="5"/> <circle id="counter-base" cx="0" cy="0" r="5"/>
@ -1919,5 +1914,5 @@
</g> </g>
</g> </g>
</g> </g>
<script href="map.js"></script> <script href="../../map.js"></script>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 82 KiB

After

Width:  |  Height:  |  Size: 82 KiB

View File

@ -2,7 +2,7 @@
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg viewBox="-150 -150 600 800" xmlns="http://www.w3.org/2000/svg"> <svg viewBox="-150 -150 600 800" xmlns="http://www.w3.org/2000/svg">
<link xmlns="http://www.w3.org/1999/xhtml" rel="stylesheet" href="map.css" type="text/css"/> <link xmlns="http://www.w3.org/1999/xhtml" rel="stylesheet" href="../css/map.css" type="text/css"/>
<style> <style>
#image-maps image { #image-maps image {
transform: none; transform: none;
@ -93,5 +93,5 @@
</g> </g>
<g class="grid"/> <g class="grid"/>
</g> </g>
<script href="map.js" data-cols="33" data-rows="77"></script> <script href="../../map.js" data-cols="33" data-rows="77"></script>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

@ -2,7 +2,7 @@
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg viewBox="-150 -150 600 800" xmlns="http://www.w3.org/2000/svg"> <svg viewBox="-150 -150 600 800" xmlns="http://www.w3.org/2000/svg">
<link xmlns="http://www.w3.org/1999/xhtml" rel="stylesheet" href="map.css" type="text/css"/> <link xmlns="http://www.w3.org/1999/xhtml" rel="stylesheet" href="../css/map.css" type="text/css"/>
<style> <style>
#image-maps image { #image-maps image {
transform: translate(-10px, 0px); transform: translate(-10px, 0px);
@ -90,5 +90,5 @@
</g> </g>
<g class="grid"/> <g class="grid"/>
</g> </g>
<script href="map.js" data-cols="33" data-rows="25"></script> <script href="../../map.js" data-cols="33" data-rows="25"></script>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

@ -2,7 +2,7 @@
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg viewBox="-150 -150 600 800" xmlns="http://www.w3.org/2000/svg"> <svg viewBox="-150 -150 600 800" xmlns="http://www.w3.org/2000/svg">
<link xmlns="http://www.w3.org/1999/xhtml" rel="stylesheet" href="map.css" type="text/css"/> <link xmlns="http://www.w3.org/1999/xhtml" rel="stylesheet" href="../css/map.css" type="text/css"/>
<defs> <defs>
<polygon id="hex" points="0,10 8.66,5 8.66,-5 0,-10 -8.66,-5 -8.66,5"/> <polygon id="hex" points="0,10 8.66,5 8.66,-5 0,-10 -8.66,-5 -8.66,5"/>
@ -45,5 +45,5 @@
<g class="grid"/> <g class="grid"/>
</g> </g>
<script href="map.js" data-cols="33" data-rows="25"></script> <script href="../../map.js" data-cols="33" data-rows="25"></script>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Before

Width:  |  Height:  |  Size: 7.6 KiB

After

Width:  |  Height:  |  Size: 7.6 KiB

View File

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

View File

Before

Width:  |  Height:  |  Size: 378 KiB

After

Width:  |  Height:  |  Size: 378 KiB

View File

Before

Width:  |  Height:  |  Size: 366 KiB

After

Width:  |  Height:  |  Size: 366 KiB

View File

Before

Width:  |  Height:  |  Size: 402 KiB

After

Width:  |  Height:  |  Size: 402 KiB

View File

Before

Width:  |  Height:  |  Size: 368 KiB

After

Width:  |  Height:  |  Size: 368 KiB

View File

Before

Width:  |  Height:  |  Size: 227 KiB

After

Width:  |  Height:  |  Size: 227 KiB

View File

Before

Width:  |  Height:  |  Size: 271 KiB

After

Width:  |  Height:  |  Size: 271 KiB

View File

Before

Width:  |  Height:  |  Size: 273 KiB

After

Width:  |  Height:  |  Size: 273 KiB

View File

Before

Width:  |  Height:  |  Size: 183 KiB

After

Width:  |  Height:  |  Size: 183 KiB

View File

Before

Width:  |  Height:  |  Size: 241 B

After

Width:  |  Height:  |  Size: 241 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

View File

@ -2,11 +2,11 @@
<html> <html>
<head> <head>
<title>Infantry Combat Solo Basic</title> <title>Infantry Combat Solo Basic</title>
<link rel="stylesheet" href="style.css"> <link rel="stylesheet" href="assets/css/style.css">
</head> </head>
<body> <body>
<template id="damage-block"> <template id="damage-block">
<link rel="stylesheet" href="damage_block.css"> <link rel="stylesheet" href="assets/css/damage_block.css">
<slot name="block-number"></slot> <slot name="block-number"></slot>
<span class="damage-effect-indicator"> <span class="damage-effect-indicator">
@ -16,7 +16,7 @@
</template> </template>
<template id="soldier-record-block"> <template id="soldier-record-block">
<link rel="stylesheet" href="soldier_record_block.css"> <link rel="stylesheet" href="assets/css/soldier_record_block.css">
<p class="physical-status-track"> <p class="physical-status-track">
<span is="damage-block"> <span is="damage-block">
@ -104,7 +104,7 @@
Loading... Loading...
</div> </div>
<object type="image/svg+xml" data="map1.svg"></object> <object type="image/svg+xml" data="assets/images/map1.svg"></object>
<div id="status"> <div id="status">
<span id="hex-counter">Distance: <span id="hex-count">-</span></span> <span id="hex-counter">Distance: <span id="hex-count">-</span></span>
@ -124,16 +124,16 @@
<span style="white-space: nowrap;"> <span style="white-space: nowrap;">
Prone: <input type="checkbox" id="toggle-prone-counter" /> Prone: <input type="checkbox" id="toggle-prone-counter" />
<button type="button" class="set-firing-arc" data-size="small"> <button type="button" class="set-firing-arc" data-size="small">
<img src="firing_arc_small.png" height="12" /> 2 MP <img src="assets/images/firing_arc_small.png" height="12" /> 2 MP
</button> </button>
<button type="button" class="set-firing-arc" data-size="medium"> <button type="button" class="set-firing-arc" data-size="medium">
<img src="firing_arc_medium.png" height="12" /> 4 MP <img src="assets/images/firing_arc_medium.png" height="12" /> 4 MP
</button> </button>
<button type="button" class="set-firing-arc" data-size="large"> <button type="button" class="set-firing-arc" data-size="large">
<img src="firing_arc_large.png" height="12" /> 6 MP <img src="assets/images/firing_arc_large.png" height="12" /> 6 MP
</button> </button>
<button type="button" class="set-grenade"> <button type="button" class="set-grenade">
<img src="icon_grenade.png" height="12" /> <img src="assets/images/icon_grenade.png" height="12" />
</button> </button>
</span> </span>
</div> </div>
@ -153,55 +153,6 @@
<!-- 1st Squad, 3rd Platoon, Bravo Company, 2nd Battalion<br> <!-- 1st Squad, 3rd Platoon, Bravo Company, 2nd Battalion<br>
17th Kestral Mechanized Infantry --> 17th Kestral Mechanized Infantry -->
</p> </p>
<!-- <div is="soldier-record-block" class="soldier-record" data-number="1" data-allegiance="davion">
<span slot="troop-number"><svg viewBox="-5 -5 10 10" xmlns="http://www.w3.org/2000/svg"><circle cx="0" cy="0" r="5"/><text>1</text></svg></span>
<span slot="primary-weapon-type">Rifle</span>
<span slot="primary-weapon-damage">4L</span>
<span slot="primary-weapon-range-short">1-27</span>
<span slot="primary-weapon-range-long">28-75</span>
</div>
<div is="soldier-record-block" class="soldier-record" data-number="2" data-allegiance="davion">
<span slot="troop-number"><svg viewBox="-5 -5 10 10" xmlns="http://www.w3.org/2000/svg"><circle cx="0" cy="0" r="5"/><text>2</text></svg></span>
<span slot="primary-weapon-type">Rifle</span>
<span slot="primary-weapon-damage">4L</span>
<span slot="primary-weapon-range-short">1-27</span>
<span slot="primary-weapon-range-long">28-75</span>
</div>
<div is="soldier-record-block" class="soldier-record" data-number="3" data-allegiance="davion">
<span slot="troop-number"><svg viewBox="-5 -5 10 10" xmlns="http://www.w3.org/2000/svg"><circle cx="0" cy="0" r="5"/><text>3</text></svg></span>
<span slot="primary-weapon-type">SMG</span>
<span slot="primary-weapon-damage">3L</span>
<span slot="primary-weapon-range-short">1-15</span>
<span slot="primary-weapon-range-long">16-25</span>
</div>
<div is="soldier-record-block" class="soldier-record" data-number="4" data-allegiance="davion">
<span slot="troop-number"><svg viewBox="-5 -5 10 10" xmlns="http://www.w3.org/2000/svg"><circle cx="0" cy="0" r="5"/><text>4</text></svg></span>
<span slot="primary-weapon-type">SMG</span>
<span slot="primary-weapon-damage">3L</span>
<span slot="primary-weapon-range-short">1-15</span>
<span slot="primary-weapon-range-long">16-25</span>
</div>
<div is="soldier-record-block" class="soldier-record" data-number="5" data-allegiance="davion">
<span slot="troop-number"><svg viewBox="-5 -5 10 10" xmlns="http://www.w3.org/2000/svg"><circle cx="0" cy="0" r="5"/><text>5</text></svg></span>
<span slot="primary-weapon-type">SMG</span>
<span slot="primary-weapon-damage">3L</span>
<span slot="primary-weapon-range-short">1-15</span>
<span slot="primary-weapon-range-long">16-25</span>
</div>
<div is="soldier-record-block" class="soldier-record" data-number="6" data-allegiance="davion">
<span slot="troop-number"><svg viewBox="-5 -5 10 10" xmlns="http://www.w3.org/2000/svg"><circle cx="0" cy="0" r="5"/><text>6</text></svg></span>
<span slot="primary-weapon-type">SMG</span>
<span slot="primary-weapon-damage">3L</span>
<span slot="primary-weapon-range-short">1-15</span>
<span slot="primary-weapon-range-long">16-25</span>
</div>
<div is="soldier-record-block" class="soldier-record" data-number="7" data-allegiance="davion">
<span slot="troop-number"><svg viewBox="-5 -5 10 10" xmlns="http://www.w3.org/2000/svg"><circle cx="0" cy="0" r="5"/><text>7</text></svg></span>
<span slot="primary-weapon-type">Blazer</span>
<span slot="primary-weapon-damage">4L</span>
<span slot="primary-weapon-range-short">1-17</span>
<span slot="primary-weapon-range-long">18-105</span>
</div> -->
</div> </div>
<div id="defender-record"> <div id="defender-record">
<!-- <img class="logo" src="logo-liao.png" /> --> <!-- <img class="logo" src="logo-liao.png" /> -->
@ -217,55 +168,6 @@
<!-- 2nd Squad, 1st Platoon, 3rd Company, 2nd Battalion<br> <!-- 2nd Squad, 1st Platoon, 3rd Company, 2nd Battalion<br>
Aldebaran Home Guard --> Aldebaran Home Guard -->
</p> </p>
<!-- <div is="soldier-record-block" class="soldier-record" data-number="1" data-allegiance="liao">
<span slot="troop-number"><svg viewBox="-5 -5 10 10" xmlns="http://www.w3.org/2000/svg"><circle cx="0" cy="0" r="5"/><text>1</text></svg></span>
<span slot="primary-weapon-type">Rifle</span>
<span slot="primary-weapon-damage">4L</span>
<span slot="primary-weapon-range-short">1-27</span>
<span slot="primary-weapon-range-long">28-75</span>
</div> -->
<!-- <div is="soldier-record-block" class="soldier-record" data-number="2" data-allegiance="liao">
<span slot="troop-number"><svg viewBox="-5 -5 10 10" xmlns="http://www.w3.org/2000/svg"><circle cx="0" cy="0" r="5"/><text>2</text></svg></span>
<span slot="primary-weapon-type">Rifle</span>
<span slot="primary-weapon-damage">4L</span>
<span slot="primary-weapon-range-short">1-27</span>
<span slot="primary-weapon-range-long">28-75</span>
</div>
<div is="soldier-record-block" class="soldier-record" data-number="3" data-allegiance="liao">
<span slot="troop-number"><svg viewBox="-5 -5 10 10" xmlns="http://www.w3.org/2000/svg"><circle cx="0" cy="0" r="5"/><text>3</text></svg></span>
<span slot="primary-weapon-type">SMG</span>
<span slot="primary-weapon-damage">3L</span>
<span slot="primary-weapon-range-short">1-15</span>
<span slot="primary-weapon-range-long">16-25</span>
</div>
<div is="soldier-record-block" class="soldier-record" data-number="4" data-allegiance="liao">
<span slot="troop-number"><svg viewBox="-5 -5 10 10" xmlns="http://www.w3.org/2000/svg"><circle cx="0" cy="0" r="5"/><text>4</text></svg></span>
<span slot="primary-weapon-type">SMG</span>
<span slot="primary-weapon-damage">3L</span>
<span slot="primary-weapon-range-short">1-15</span>
<span slot="primary-weapon-range-long">16-25</span>
</div>
<div is="soldier-record-block" class="soldier-record" data-number="5" data-allegiance="liao">
<span slot="troop-number"><svg viewBox="-5 -5 10 10" xmlns="http://www.w3.org/2000/svg"><circle cx="0" cy="0" r="5"/><text>5</text></svg></span>
<span slot="primary-weapon-type">SMG</span>
<span slot="primary-weapon-damage">3L</span>
<span slot="primary-weapon-range-short">1-15</span>
<span slot="primary-weapon-range-long">16-25</span>
</div>
<div is="soldier-record-block" class="soldier-record" data-number="6" data-allegiance="liao">
<span slot="troop-number"><svg viewBox="-5 -5 10 10" xmlns="http://www.w3.org/2000/svg"><circle cx="0" cy="0" r="5"/><text>6</text></svg></span>
<span slot="primary-weapon-type">SMG</span>
<span slot="primary-weapon-damage">3L</span>
<span slot="primary-weapon-range-short">1-15</span>
<span slot="primary-weapon-range-long">16-25</span>
</div>
<div is="soldier-record-block" class="soldier-record" data-number="7" data-allegiance="liao">
<span slot="troop-number"><svg viewBox="-5 -5 10 10" xmlns="http://www.w3.org/2000/svg"><circle cx="0" cy="0" r="5"/><text>7</text></svg></span>
<span slot="primary-weapon-type">Blazer</span>
<span slot="primary-weapon-damage">4L</span>
<span slot="primary-weapon-range-short">1-17</span>
<span slot="primary-weapon-range-long">18-105</span>
</div> -->
</div> </div>
</div> </div>
</div> </div>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 378 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 366 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 402 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 368 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 227 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 271 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 273 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 183 KiB

View File

@ -3,7 +3,7 @@ const { createServer } = require('esbuild-server');
const server = createServer( const server = createServer(
{ {
bundle: true, bundle: true,
entryPoints: ['src/index.js', 'src/map.js'], entryPoints: ['src/index.js', 'src/map.js', 'src/soldier_record_block.js'],
...(process.env.NODE_ENV !== 'test') && { ...(process.env.NODE_ENV !== 'test') && {
outdir: 'build' outdir: 'build'
} }

View File

@ -10,7 +10,7 @@ const mapPlaceholder = document.querySelector('.map-placeholder'),
proneToggle = document.getElementById('toggle-prone-counter'), proneToggle = document.getElementById('toggle-prone-counter'),
contentVisToggleEl = document.querySelector('#content input[type="checkbox"].visible'), contentVisToggleEl = document.querySelector('#content input[type="checkbox"].visible'),
object = document.querySelector('object'), object = document.querySelector('object'),
fileName = `${localStorage.getItem('map') || 'map1'}.svg`, fileName = `assets/images/${localStorage.getItem('map') || 'map1'}.svg`,
toggleContentVis = (function () { toggleContentVis = (function () {
document.querySelectorAll('#content div').forEach(div => { document.querySelectorAll('#content div').forEach(div => {
@ -132,5 +132,5 @@ object.addEventListener('load', load);
objectDataObserver.observe(object, { attributeFilter: ['data'] }); objectDataObserver.observe(object, { attributeFilter: ['data'] });
if (object.getAttribute('data') !== fileName) { if (object.getAttribute('data') !== fileName) {
object.data = fileName; object.data = `assets/images/${fileName}`;
} }

View File

@ -34,7 +34,7 @@ export function init() {
e.preventDefault(); e.preventDefault();
localStorage.removeItem('pan-zoom'); localStorage.removeItem('pan-zoom');
localStorage.setItem('map', selectEl.value); localStorage.setItem('map', selectEl.value);
document.querySelector('object').data = `${selectEl.value}.svg`; document.querySelector('object').data = `assets/images/${selectEl.value}.svg`;
mapDialog.close(); mapDialog.close();
}); });
} }