+
Hand Grenades - + + + +
@@ -186,49 +189,49 @@ 17th Kestral Mechanized Infantry -->
- 1
+
Rifle
4L
1-27
28-75
- 2
+
Rifle
4L
1-27
28-75
- 3
+
SMG
3L
1-15
16-25
- 4
+
SMG
3L
1-15
16-25
- 5
+
SMG
3L
1-15
16-25
- 6
+
SMG
3L
1-15
16-25
- 7
+
Blazer
4L
1-17
@@ -250,49 +253,49 @@
Aldebaran Home Guard -->
- 1
+
Rifle
4L
1-27
28-75
- 2
+
Rifle
4L
1-27
28-75
- 3
+
SMG
3L
1-15
16-25
- 4
+
SMG
3L
1-15
16-25
- 5
+
SMG
3L
1-15
16-25
- 6
+
SMG
3L
1-15
16-25
- 7
+
Blazer
4L
1-17
diff --git a/public/soldier_record_block.css b/public/soldier_record_block.css
index 47bf583..fb1d322 100644
--- a/public/soldier_record_block.css
+++ b/public/soldier_record_block.css
@@ -33,3 +33,23 @@ ul li {
p {
margin: 0;
}
+
+.grenades input {
+ display: none;
+}
+
+.grenades svg {
+ width: 14px;
+ height: 14px;
+ vertical-align: bottom;
+}
+
+.grenades svg circle {
+ fill: none;
+ stroke: black;
+ stroke-width: 2px;
+}
+
+.grenades input:checked + svg circle {
+ fill: gray;
+}
diff --git a/public/soldier_record_block.js b/public/soldier_record_block.js
index fd1c661..0bf5a9a 100644
--- a/public/soldier_record_block.js
+++ b/public/soldier_record_block.js
@@ -47,6 +47,11 @@ customElements.define(
shadowRoot.appendChild(templateContent.cloneNode(true));
}
+
+ connectedCallback() {
+ // this.shadowRoot.querySelectorAll('.grenades *').forEach(el => el.addEventListener('click', e => e.stopPropagation()));
+ this.shadowRoot.querySelector('.grenades').addEventListener('click', e => e.stopPropagation());
+ }
},
{ extends: 'div' }
);
diff --git a/public/style.css b/public/style.css
index 167254b..00d9d74 100644
--- a/public/style.css
+++ b/public/style.css
@@ -355,19 +355,36 @@ button.set-firing-arc img {
background-color: white;
}
-.soldier-record [slot="troop-number"] {
- color: white;
+.soldier-record[data-troop-allegiance="liao"] [slot="troop-number"] svg {
+ fill: green;
+}
+
+.soldier-record[data-troop-allegiance="davion"] [slot="troop-number"] svg {
+ fill: red;
+}
+
+.soldier-record [slot="troop-number"] svg {
+ width: 20px;
+ height: 20px;
+ background-color: initial;
+ vertical-align: middle;
+}
+
+.soldier-record [slot="troop-number"] svg text {
+ fill: white;
+ text-anchor: middle;
+ font-size: 10px;
font-weight: bold;
- border-radius: 10px;
- padding: 0 4px;
+ transform: translateY(3.5px);
+ font-family: monospace;
}
-.soldier-record[data-troop-allegiance="davion"] [slot="troop-number"] {
- background-color: red;
+.soldier-record[data-troop-allegiance="davion"] [slot="troop-number"] img {
+ fill: red;
}
-.soldier-record[data-troop-allegiance="liao"] [slot="troop-number"] {
- background-color: green;
+.soldier-record[data-troop-allegiance="liao"] [slot="troop-number"] img {
+ fill: green;
}
.soldier-record.selected {
--
cgit v1.2.3