From d25d7e33e2ff1260a607c49a7e0a0ffaf3e03221 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Thu, 2 Jan 2025 20:30:46 +0100 Subject: tweak logging --- play.css | 38 ++++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 20 deletions(-) (limited to 'play.css') diff --git a/play.css b/play.css index afee2c4..aaf8abf 100644 --- a/play.css +++ b/play.css @@ -37,39 +37,38 @@ body.Communist header.your_turn { background-color: hsl(355, 70%, 75%); } #log .h5 { text-decoration: underline; } #log { background-color: floralwhite } -#log .h1 { background-color: tan ;} +#log .h1 { background-color: tan } #log .h2 { background-color: wheat } #log .h3 { background-color: wheat } -#log .h1, .h2:not(.group), .h3 { - text-transform: uppercase; +#log .h1, .h2, .h3 { + font-variant-caps: small-caps; border-top: 1px solid black; border-bottom: 1px solid black; - font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif; } -#log .h2:not(.group).dem { - font-size: 10px; - background-color: hsl(206, 85%, 80%); border-top: 1px solid hsl(206, 85%, 25%); border-bottom: 1px solid hsl(206, 85%, 25%);} -#log .h2:not(.group).com { - font-size: 10px; - background-color: hsl(355, 70%, 80%); - border-top: 1px solid hsl(355, 70%, 25%); +#log .h2.dem { + background-color: hsl(206, 85%, 80%); + border-top: 1px solid hsl(206, 85%, 25%); + border-bottom: 1px solid hsl(206, 85%, 25%); +} +#log .h2.com { + background-color: hsl(355, 70%, 80%); + border-top: 1px solid hsl(355, 70%, 25%); border-bottom: 1px solid hsl(355, 70%, 25%); } #log .group.dem { background-color: hsl(206, 85%, 90%); } #log .group.com { background-color: hsl(355, 70%, 90%); } #log .group.both { background-color: gainsboro; } -#log .h1, #log .h2, #log .h3 { margin: 6px 0; } - -#log .group {margin: 0 6px} +#log .group { margin: 0 6px; } +#log .header.group.dem { background-color: hsl(206, 85%, 85%); } +#log .header.group.com { background-color: hsl(355, 70%, 85%); } #log div { padding-left: 20px; text-indent: -12px; } #log div.i { padding-left: 32px; text-indent: -12px; } #log div.ii { padding-left: 44px; text-indent: -12px; } #log .card_name { font-style: italic; } -#log div.h2 .card_name { font-style: normal; } #log .card_name:hover { text-decoration: underline; } #log .space_tip:hover { cursor: pointer; text-decoration: underline; } @@ -100,18 +99,17 @@ body.Communist header.your_turn { background-color: hsl(355, 70%, 75%); } } #log .icon.number { - background-color: white; + background-color: white; border: 1px solid #444; width: 10px; height: 10px; -} +} #log .com_nc { background-image: url(images/SVd_blank.gif);} #log .com_c {background-image: url(images/SV_blank.gif);} #log .dem_nc { background-image: url(images/USd_blank.gif);} #log .dem_c {background-image: url(images/favicon_dem.svg);} - /* MAP */ #mapwrap { @@ -179,7 +177,7 @@ body.Communist header.your_turn { background-color: hsl(355, 70%, 75%); } height: 15px; width: 100px; } - + .box.d_pres { background: linear-gradient(to right, rgba(0, 0, 255, 0.75) 0%, rgba(0, 0, 255, 0.75) 20%, transparent 20%, transparent 100%); } .box.c_pres { background: linear-gradient(to right, transparent 0%, transparent 80%,rgba(255, 0, 0, 0.75) 80%, rgba(255, 0, 0, 0.75) 100%); } @@ -197,7 +195,7 @@ body.Communist header.your_turn { background-color: hsl(355, 70%, 75%); } .box.c_pres.c_dom { background: linear-gradient(to right, transparent 50%, rgba(255, 0, 0, 0.75) 50%, rgba(255, 0, 0, 0.75) 100%); } .box.d_pres.c_pres.c_dom { background: linear-gradient(to right, rgba(0, 0, 255, 0.75) 0%, rgba(0, 0, 255, 0.75) 20%, transparent 20%, transparent 50%, rgba(255, 0, 0, 0.75) 50%, rgba(255, 0, 0, 0.75) 100%); } - + .box.c_pres.c_ctrl { background: linear-gradient(to right, transparent 20%, rgba(255, 0, 0, 0.75) 20%, rgba(255, 0, 0, 0.75) 100%); } .box.d_pres.c_pres.c_ctrl { background: linear-gradient(to right, rgba(0, 0, 255, 0.75) 0%, rgba(0, 0, 255, 0.75) 20%, transparent 20%, rgba(255, 0, 0, 0.75) 20%, rgba(255, 0, 0, 0.75) 100%); } -- cgit v1.2.3 From 22f2de3e25c082aa16a8d741f6457af9cf59bb68 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Fri, 3 Jan 2025 22:44:19 +0100 Subject: put influence change in margin --- play.css | 17 ++++++++++++++++- play.js | 12 +++++------- 2 files changed, 21 insertions(+), 8 deletions(-) (limited to 'play.css') diff --git a/play.css b/play.css index aaf8abf..7e63f9f 100644 --- a/play.css +++ b/play.css @@ -41,6 +41,21 @@ 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; @@ -538,4 +553,4 @@ body.Communist header.your_turn { background-color: hsl(355, 70%, 75%); } .card.power_50 { background-image: url(cards75/power_50.avif) } .card.power_51 { background-image: url(cards75/power_51.avif) } .card.power_52 { background-image: url(cards75/power_52.avif) } -.card.power_53 { background-image: url(cards75/power_back.avif) } \ No newline at end of file +.card.power_53 { background-image: url(cards75/power_back.avif) } diff --git a/play.js b/play.js index 12470c5..f15659e 100644 --- a/play.js +++ b/play.js @@ -848,11 +848,12 @@ function on_update() { ui.hand.appendChild(ui.cards[c]) ui.power_hand.replaceChildren() - if (view.is_pwr_struggle) + if (view.is_pwr_struggle) { ui.power_hand.appendChild(ui.power_cards[53]) if (view.power_hand.length > 0) for (let c of view.power_hand) ui.power_hand.appendChild(ui.power_cards[c]) + } ui.power_discard.replaceChildren() if (view.power_struggle_discard) @@ -993,14 +994,13 @@ function sub_icon(match) { } function sub_arrow(_match) { - return ' → ' + return " \u2192 " } function wrap_icons(match) { - return `${match}`; + return `${match.replace("(", "").replace(")", "")}` } - const ICONS = { '£CC': '', '£CU': '', @@ -1045,9 +1045,7 @@ function on_log(text, ix) { p.className = "i" } -/* - text = text.replace(/(\(£[CDU][CU]\s\.to\s£[CDU][CU]\))/g, wrap_icons) -*/ + 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) -- cgit v1.2.3 From c3bc265c7eb16cb7ededbd4d11c49fe98c82e2bd Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Fri, 3 Jan 2025 22:59:42 +0100 Subject: new log influence icons --- images/icon_com.png | Bin 0 -> 451 bytes images/icon_com.svg | 4 ++++ images/icon_dem.png | Bin 0 -> 929 bytes images/icon_dem.svg | 20 ++++++++++++++++++++ play.css | 24 +++++++++++------------- 5 files changed, 35 insertions(+), 13 deletions(-) create mode 100644 images/icon_com.png create mode 100644 images/icon_com.svg create mode 100644 images/icon_dem.png create mode 100644 images/icon_dem.svg (limited to 'play.css') diff --git a/images/icon_com.png b/images/icon_com.png new file mode 100644 index 0000000..047a943 Binary files /dev/null and b/images/icon_com.png differ diff --git a/images/icon_com.svg b/images/icon_com.svg new file mode 100644 index 0000000..709c306 --- /dev/null +++ b/images/icon_com.svg @@ -0,0 +1,4 @@ + + + + diff --git a/images/icon_dem.png b/images/icon_dem.png new file mode 100644 index 0000000..01fdd51 Binary files /dev/null and b/images/icon_dem.png differ diff --git a/images/icon_dem.svg b/images/icon_dem.svg new file mode 100644 index 0000000..31654df --- /dev/null +++ b/images/icon_dem.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/play.css b/play.css index 7e63f9f..891a4bb 100644 --- a/play.css +++ b/play.css @@ -104,26 +104,24 @@ body.Communist header.your_turn { background-color: hsl(355, 70%, 75%); } #log .icon { display: inline-block; vertical-align: -2px; - width: 12px; - height: 12px; - box-shadow: none; - border: none; - background-size: contain; - background-position: center; + background-size: 10px 10px; background-repeat: no-repeat; -} - -#log .icon.number { background-color: white; border: 1px solid #444; width: 10px; height: 10px; } -#log .com_nc { background-image: url(images/SVd_blank.gif);} -#log .com_c {background-image: url(images/SV_blank.gif);} -#log .dem_nc { background-image: url(images/USd_blank.gif);} -#log .dem_c {background-image: url(images/favicon_dem.svg);} +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: #c4e2f6 } /* MAP */ -- cgit v1.2.3