From 398138dcf935e4ef8e1986b75d584591b3a3f7b5 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Wed, 8 Jan 2025 18:27:43 +0100 Subject: Remove unused icon images and styles. --- images/icon_com.png | Bin 451 -> 0 bytes images/icon_dem.png | Bin 929 -> 0 bytes play.css | 37 ------------------------------------- play.js | 15 ++------------- 4 files changed, 2 insertions(+), 50 deletions(-) delete mode 100644 images/icon_com.png delete mode 100644 images/icon_dem.png diff --git a/images/icon_com.png b/images/icon_com.png deleted file mode 100644 index 047a943..0000000 Binary files a/images/icon_com.png and /dev/null differ diff --git a/images/icon_dem.png b/images/icon_dem.png deleted file mode 100644 index 01fdd51..0000000 Binary files a/images/icon_dem.png and /dev/null differ diff --git a/play.css b/play.css index 030c990..8ed5a11 100644 --- a/play.css +++ b/play.css @@ -41,21 +41,6 @@ body.Communist header.your_turn { background-color: hsl(355, 70%, 75%); } #log .h2 { background-color: wheat } #log .h3 { background-color: wheat } -#log .marginalia { - display: block; - float: right; - text-indent: 0; - margin: 0; - margin-right: 6px; - padding: 0; -} - -#log .group .marginalia { - margin-right: 0; -} - -#log > div { clear: right } - #log .h1, .h2, .h3 { font-variant-caps: small-caps; border-top: 1px solid black; @@ -102,28 +87,6 @@ body.Communist header.your_turn { background-color: hsl(355, 70%, 75%); } #log .number.d_tst { background-color: hsl(206, 85%, 80%); } #log .number.c_tst { background-color: hsl(355, 70%, 80%); } -#log .icon { - display: inline-block; - vertical-align: -2px; - background-size: 10px 10px; - background-repeat: no-repeat; - background-color: white; - border: 1px solid #444; - width: 10px; - height: 10px; -} - -X#log .com_nc { background-image: url(images/icon_com.png) } -X#log .dem_nc { background-image: url(images/icon_dem.png) } - -#log .com_c { background-image: url(images/icon_com.png) } -#log .dem_c { background-image: url(images/icon_dem.png) } - -#log .com_c { background-color: hsl(358, 66%, 45%) } -#log .com_nc { background-color: hsl(358, 66%, 80%) } -#log .dem_c { background-color: #147fc0 } -#log .dem_nc { background-color: hsl(206, 85%, 85%) } - /* MAP */ #mapwrap { diff --git a/play.js b/play.js index c5c7602..0d9acc8 100644 --- a/play.js +++ b/play.js @@ -998,20 +998,12 @@ function sub_icon(match) { return ICONS[match] || match } -function sub_arrow(_match) { - return " \u2192 " -} - function wrap_icons(match) { return `${match.replace("(", "").replace(")", "")}` } const ICONS = { - '£CC': '', - '£CU': '', - '£DC': '', - '£DU': '', - '£UU': '', + '->': '\u2192', '.dT5': '5', '.dT6': '6', '.dT7': '7', @@ -1050,8 +1042,6 @@ function on_log(text, ix) { p.className = "i" } - text = text.replace(/(\(£[CDU][CU]\s\.to\s£[CDU][CU]\))/g, wrap_icons) - text = text.replace(/_/g, " ") text = text.replace(/C(\d+)/g, sub_card_name) text = text.replace(/P(\d+)/g, sub_power_card_name) @@ -1059,10 +1049,9 @@ function on_log(text, ix) { text = text.replace(/%(\d+)/g, sub_space_name) text = text.replace(/D[1-6]/g, sub_die) text = text.replace(/-\d/g, sub_minus) - text = text.replace(/£[CDU][CU]\b/g, sub_icon) + text = text.replace(/->/g, sub_icon) text = text.replace(/\.cT(\d+)/g, sub_icon) text = text.replace(/\.dT(\d+)/g, sub_icon) - text = text.replace(/\s\.to\s/g, sub_arrow) if (text.match(/^\.h1/)) { text = text.substring(4) -- cgit v1.2.3