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(-) 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