From 47b19b5e83850b5fac6e508468b227476d486025 Mon Sep 17 00:00:00 2001 From: Frans Bongers Date: Sun, 15 Dec 2024 16:02:52 +0100 Subject: add tokens to fronts and log improvements --- land-and-freedom.css | 85 ++++++++++++++++++++----- land-and-freedom.scss | 84 +++++++++++++++++++----- play.html | 21 +++++- play.js | 101 +++++++++++++++++++---------- play.ts | 125 ++++++++++++++++++++++++++---------- rules.js | 148 +++++++++++++++++++++++++++++++++--------- rules.ts | 173 +++++++++++++++++++++++++++++++++++++++----------- types.d.ts | 22 +++++-- 8 files changed, 587 insertions(+), 172 deletions(-) diff --git a/land-and-freedom.css b/land-and-freedom.css index 196eddb..5fff93b 100644 --- a/land-and-freedom.css +++ b/land-and-freedom.css @@ -35,6 +35,7 @@ main { grid-row: 1; display: flex; flex-direction: column; + background: floralwhite; } #roles { @@ -43,22 +44,22 @@ main { } #role_Anarchist { - background-color: rgb(76, 70, 89); + background-color: rgb(93, 89, 106); } #role_Communist { - background-color: rgb(255, 0, 0); + background-color: rgb(237, 36, 27); } #role_Moderate { - background-color: rgb(126, 18, 80); + background-color: rgb(134, 44, 97); } .role { - color: white; + color: floralwhite; } .role a { - color: white; + color: floralwhite; } .panel { @@ -80,7 +81,7 @@ main { } .panel_header { - color: white; + color: floralwhite; user-select: none; font-weight: bold; text-align: center; @@ -93,15 +94,15 @@ main { } .panel_header[data-faction-id=a] { - background-color: rgb(76, 70, 89); + background-color: rgb(93, 89, 106); } .panel_header[data-faction-id=c] { - background-color: rgb(255, 0, 0); + background-color: rgb(237, 36, 27); } .panel_header[data-faction-id=m] { - background-color: rgb(126, 18, 80); + background-color: rgb(134, 44, 97); } .front { @@ -116,18 +117,30 @@ main { border-radius: 20px; } +.contributions { + display: flex; + flex-direction: row; + gap: 2px; + margin-top: 15px; + height: 25px; +} + .front .value { font-weight: bold; font-size: 30px; margin-top: auto; } -.front[data-front-id=m] { +#madrid_front { width: 104px; height: 114px; border-radius: 23px; } +#madrid_front .contributions { + padding: 0px 2px; +} + .card { background-size: 100% 100%; width: 198px; @@ -585,26 +598,35 @@ main { margin-top: 1px; } -.glory { +.faction_token { box-sizing: border-box; + background-size: 100% 100%; +} + +#glory .faction_token { position: absolute; width: 34px; height: 34px; - background-size: 100% 100%; border-radius: 4px; } -.glory[data-faction-id=a] { +.contributions .faction_token { + width: 25px; + height: 25px; + border-radius: 4px; +} + +.faction_token[data-faction-id=a] { border: 1px #333 solid; background-image: url("images/factions/anarchists.png"); } -.glory[data-faction-id=c] { +.faction_token[data-faction-id=c] { border: 1px #333 solid; background-image: url("images/factions/communitsts.png"); } -.glory[data-faction-id=m] { +.faction_token[data-faction-id=m] { border: 1px #333 solid; background-image: url("images/factions/moderates.png"); } @@ -745,9 +767,38 @@ main { } #log .h1 { - background-color: hsl(4, 40%, 73%); + background-color: rgb(233, 223, 200); } #log .h2 { - background-color: hsl(250, 40%, 83%); + background-color: rgb(233, 223, 200); +} + +#log .h2.anarchist { + background-color: rgb(93, 89, 106); + color: floralwhite; +} + +#log .h2.communist { + background-color: rgb(237, 36, 27); + color: floralwhite; +} + +#log .h2.moderate { + background-color: rgb(134, 44, 97); + color: floralwhite; +} + +#log .h2.fascist { + background-color: rgb(183, 144, 105); +} + +#log div.i { + padding-left: 32px; + text-indent: -12px; +} + +#log div.ii { + padding-left: 44px; + text-indent: -12px; } diff --git a/land-and-freedom.scss b/land-and-freedom.scss index 8b9636f..6385944 100644 --- a/land-and-freedom.scss +++ b/land-and-freedom.scss @@ -4,9 +4,11 @@ $selectable-color: white; // yellow; $selected-color: yellow; //blue; -$anarchist-color: rgb(76, 70, 89); -$communist-color: rgb(255, 0, 0); -$moderate-color: rgb(126, 18, 80); +$anarchist-color: rgb(93, 89, 106); +$communist-color: rgb(237, 36, 27); +$moderate-color: rgb(134, 44, 97); +$fascist-color: rgb(183, 144, 105); +$log-text-background-color: rgb(233 223 200); main { // background-color: rgb(213, 196, 131); @@ -57,6 +59,7 @@ main { grid-row: 1; display: flex; flex-direction: column; + background: floralwhite; } #roles { @@ -90,10 +93,10 @@ main { } .role { - color: white; + color:floralwhite; a { - color: white; + color:floralwhite; } } @@ -117,7 +120,7 @@ main { } .panel_header { - color: white; + color: floralwhite; user-select: none; font-weight: bold; text-align: center; @@ -165,18 +168,39 @@ main { // opacity: 0.5; } +.contributions { + display: flex; + flex-direction: row; + gap: 2px; + // width: 100%; + margin-top: 15px; + // background-color: yellow; + // opacity: 0.5; + height: 25px; +} + .front .value { font-weight: bold; font-size: 30px; margin-top: auto; } -.front[data-front-id='m'] { +#madrid_front { width: 104px; height: 114px; border-radius: 23px; } +#madrid_front .contributions { + padding: 0px 2px; +} + +// .front[data-front-id='m'] { +// width: 104px; +// height: 114px; +// border-radius: 23px; +// } + .card { background-size: 100% 100%; // width: 275px; @@ -212,29 +236,38 @@ main { margin-top: 1px; } -.glory { +.faction_token { box-sizing: border-box; - position: absolute; // background-color: yellow; // opacity: 0.5; - width: 34px; - height: 34px; background-size: 100% 100%; // box-shadow: 0 0 0 1px #333; +} + +#glory .faction_token { + position: absolute; + width: 34px; + height: 34px; border-radius: 4px; } -.glory[data-faction-id='a'] { +.contributions .faction_token { + width: 25px; + height: 25px; + border-radius: 4px; +} + +.faction_token[data-faction-id='a'] { border: 1px #333 solid; background-image: url('images/factions/anarchists.png'); } -.glory[data-faction-id='c'] { +.faction_token[data-faction-id='c'] { border: 1px #333 solid; background-image: url('images/factions/communitsts.png'); } -.glory[data-faction-id='m'] { +.faction_token[data-faction-id='m'] { border: 1px #333 solid; background-image: url('images/factions/moderates.png'); } @@ -327,8 +360,27 @@ main { text-align: center; } #log .h1 { - background-color: hsl(4, 40%, 73%); + // background-color: hsl(4, 40%, 73%); + background-color: $log-text-background-color; } #log .h2 { - background-color: hsl(250, 40%, 83%); + // background-color: hsl(250, 40%, 83%); + background-color: $log-text-background-color; +} +#log .h2.anarchist { + background-color: $anarchist-color; + color:floralwhite; +} +#log .h2.communist { + background-color: $communist-color; + color:floralwhite; +} +#log .h2.moderate { + background-color: $moderate-color; + color:floralwhite; +} +#log .h2.fascist { + background-color: $fascist-color; } +#log div.i { padding-left: 32px; text-indent: -12px; } +#log div.ii { padding-left: 44px; text-indent: -12px; } \ No newline at end of file diff --git a/play.html b/play.html index fffbbca..f7a6189 100644 --- a/play.html +++ b/play.html @@ -33,7 +33,7 @@