From f4cc9af0b71f5ee5a98cf33be805e5a17eca5f99 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Wed, 29 Dec 2021 17:01:28 +0100 Subject: Simplify styles and html for play.html Split into separate module. Update for new server version. Fix log colors... Clean up common play.css file. New battle CSS. --- play.css | 331 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 331 insertions(+) create mode 100644 play.css (limited to 'play.css') diff --git a/play.css b/play.css new file mode 100644 index 0000000..813dfab --- /dev/null +++ b/play.css @@ -0,0 +1,331 @@ +main { background-color: slategray; } +aside { background-color: silver; } +header { background-color: silver; } +header.your_turn { background-color: orange; } +#role_England .role_name { background-color: salmon; } +#role_Scotland .role_name { background-color: skyblue; } +#turn_info { background-color: gainsboro; } +.role_vp { float: right; } + +#log { background-color: whitesmoke; } +#log div { padding-left: 20px; text-indent: -12px; } +#log .st { background-color: darkslategray; color: white; font-weight: bold; } +#log .S { background-color: lightblue; } +#log .E { background-color: pink; } +#log .bs { background-color: gainsboro; } +#log .br { font-style: italic; text-decoration: underline; } + +/* CARDS */ + +.hand { + margin: 25px; + display: flex; + flex-wrap: wrap; + justify-content: center; + min-height: 344px; + gap: 24px; +} + +.card_back{background-image: url('cards/card_back.svg')} + +.card_truce{background-image:url('cards/card_truce.jpg')} +.card_herald{background-image:url('cards/card_herald.jpg')} +.card_sea_move{background-image:url('cards/card_sea_move.jpg')} +.card_pillage{background-image:url('cards/card_pillage.jpg')} +.card_victuals{background-image:url('cards/card_victuals.jpg')} +.card_1{background-image:url('cards/card_1.jpg')} +.card_2{background-image:url('cards/card_2.jpg')} +.card_3{background-image:url('cards/card_3.jpg')} + +.card { + background-size: cover; + background-repeat: no-repeat; + width: 224px; + height: 344px; + border-radius: 12px; + background-color: #883737; + box-shadow: 1px 1px 5px rgba(0,0,0,0.5); + transition: 100ms; + display: none; +} + +.card.show { + display: block; +} + +.card.enabled:hover { + transform: translateY(-8px); +} + +.card.enabled { + cursor: pointer; +} + +.card.disabled { + filter: grayscale(100%); +} + +.role_info { + overflow: clip; /* clip dropshadow from filter:grayscale() stacking context */ + padding-top: 16px; +} + +.role_info .card { + width: 168px; + height: 258px; + border-radius: 9px; + margin: 0 auto 16px auto; +} + +.role_info .card:not(:hover) { + margin: 0 auto; + height: 96px; + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; +} + +/* MAP */ + +#mapwrap { + box-shadow: 0px 1px 10px rgba(0,0,0,0.5); + width: 1688px; + height: 1950px; +} + +#map { + background-color: darkslategray; + width: 1688px; + height: 1950px; + background-repeat: no-repeat; + background-size: cover; +} + +#map { background-image: url("map75.jpg") } +@media (min-resolution: 97dpi) { + #map { background-image: url("map150.jpg") } +} + +#map svg { + position: absolute; +} + +#map svg image { + pointer-events: none; +} + +#map svg path.area { + opacity: 0; + fill-opacity: 0.4; + fill: white; +} +#map svg path.area.where { + opacity: 1; + fill: darkslategray; +} +#map svg path.area.highlight { + cursor: pointer; + opacity: 1; + fill: white; +} + +#map.hide_blocks #blocks { + visibility: hidden; +} + +/* TURN MARKER */ + +div.turn { + pointer-events: none; + position: absolute; + width: 66px; + height: 66px; + background-size: cover; + background-repeat: no-repeat; + background-image: url(turn_marker.jpg); + box-shadow: 1px 1px 3px rgba(0,0,0,0.5); + border-radius: 4px; + transition: 700ms ease; +} + +div.turn.year_1297 { left: 1511px; top: 221px; } +div.turn.year_1298 { left: 1511px; top: 306px; } +div.turn.year_1299 { left: 1511px; top: 392px; } +div.turn.year_1300 { left: 1511px; top: 478px; } +div.turn.year_1301 { left: 1511px; top: 563px; } +div.turn.year_1302 { left: 1511px; top: 649px; } +div.turn.year_1303 { left: 1511px; top: 734px; } +div.turn.year_1304 { left: 1511px; top: 820px; } +div.turn.year_1305 { left: 1511px; top: 906px; } +div.turn.year_1306 { left: 1511px; top: 992px; } +div.turn.year_1307 { left: 1511px; top: 1077px; } +div.turn.year_1308 { left: 1511px; top: 1163px; } +div.turn.year_1309 { left: 1511px; top: 1249px; } +div.turn.year_1310 { left: 1511px; top: 1334px; } +div.turn.year_1311 { left: 1511px; top: 1420px; } +div.turn.year_1312 { left: 1511px; top: 1506px; } +div.turn.year_1313 { left: 1511px; top: 1591px; } +div.turn.year_1314 { left: 1511px; top: 1677px; } + +/* BLOCKS */ + +body.shift .block.known:hover { + transform: scale(2) !important; + transition: 100ms; + z-index: 100; +} + +.oldblocks div.block { border-radius: 8px; } +.newblocks div.block { border-radius: 4px; } + +#map div.block { + position: absolute; +} + +#battle div.block { + position: relative; +} + +div.block { + background-size: 700% 400%; + background-repeat: no-repeat; + width: 60px; + height: 60px; + box-shadow: 0px 0px 3px black; +} + +.oldblocks div.block.England { border: 3px solid brown; background-color: brown; } +.oldblocks div.block.Scotland { border: 3px solid #06a; background-color: #06a; } +.oldblocks div.block.highlight { border-color: white; } +.oldblocks div.block.selected { border-color: yellow; } +.oldblocks div.block.highlight { box-shadow: 0px 0px 4px 1px white; } +.oldblocks div.block.selected { box-shadow: 0 0 4px 1px yellow; } + +.newblocks div.block.England { border: 2px solid #a12; background-color: #a12; } +.newblocks div.block.Scotland { border: 2px solid #059; background-color: #059; } +.newblocks div.block.highlight { box-shadow: 0px 0px 2px 3px white; } +.newblocks div.block.selected { box-shadow: 0px 0px 2px 3px yellow; } + +.oldblocks .battle_menu.hit div.block.highlight { border: 3px solid black; box-shadow: 0px 0px 3px black; } +.newblocks .battle_menu.hit div.block.highlight { box-shadow: 0px 0px 2px 3px black; } + +div.block.highlight { cursor: pointer; } +div.block.moved { filter: grayscale(50%) brightness(80%); } +div.block.highlight.moved { filter: grayscale(60%) brightness(95%); } + +div.block.r1 { transform: rotate(-90deg); } +div.block.r2 { transform: rotate(-180deg); } +div.block.r3 { transform: rotate(-270deg); } + +div.block:hover { z-index: 1; } + +div.block { + transition-property: top, left, transform; + transition-duration: 700ms, 700ms, 200ms; + transition-timing-function: ease; +} + +/* HERALD DIALOG */ + +#herald { + background-color: white; + border: 1px solid black; + position: fixed; + top: 80px; + left: 36px; + box-shadow: 0px 5px 10px 0px rgba(0,0,0,0.5); + z-index: 50; + user-select: none; + display: none; +} +#herald.show { + display: block; +} +#herald_header { + font-weight: bold; + cursor: move; + border-bottom: 1px solid black; + background-color: lightsteelblue; + padding: 3px 1em; +} +.herald_noble { + padding: 3px 1em; + display: none; +} +.herald_noble:hover { + color: white; + background-color: black; +} +.herald_noble.show { + display: block; +} + +/* BATTLE BOARD */ + +#battle { background-color: silver; } +#battle_message { background-color: lightsteelblue; } +#battle_header { background-color: steelblue; color: white; } +#FR, #ER { background-color: #acacac; } + +/* BLOCKS */ + +.oldblocks .known.Scotland{background-image:url(old_blocks_scotland.png)} +.oldblocks .known.England{background-image:url(old_blocks_england.png)} +.newblocks .known.Scotland{background-image:url(new_blocks_scotland.png)} +.newblocks .known.England{background-image:url(new_blocks_england.png)} + +.known.block_11{background-position:0px 0px} +.known.block_12{background-position:-60px 0px} +.known.block_13{background-position:-120px 0px} +.known.block_14{background-position:-180px 0px} +.known.block_15{background-position:-240px 0px} +.known.block_16{background-position:-300px 0px} +.known.block_17{background-position:-360px 0px} +.known.block_21{background-position:0px -60px} +.known.block_22{background-position:-60px -60px} +.known.block_23{background-position:-120px -60px} +.known.block_24{background-position:-180px -60px} +.known.block_25{background-position:-240px -60px} +.known.block_26{background-position:-300px -60px} +.known.block_27{background-position:-360px -60px} +.known.block_31{background-position:0px -120px} +.known.block_32{background-position:-60px -120px} +.known.block_33{background-position:-120px -120px} +.known.block_34{background-position:-180px -120px} +.known.block_35{background-position:-240px -120px} +.known.block_36{background-position:-300px -120px} +.known.block_37{background-position:-360px -120px} +.known.block_41{background-position:0px -180px} +.known.block_42{background-position:-60px -180px} +.known.block_43{background-position:-120px -180px} +.known.block_44{background-position:-180px -180px} +.known.block_45{background-position:-240px -180px} +.known.block_46{background-position:-300px -180px} +.known.block_47{background-position:-360px -180px} +.known.block_61{background-position:0px 0px} +.known.block_62{background-position:-60px 0px} +.known.block_63{background-position:-120px 0px} +.known.block_64{background-position:-180px 0px} +.known.block_65{background-position:-240px 0px} +.known.block_66{background-position:-300px 0px} +.known.block_67{background-position:-360px 0px} +.known.block_71{background-position:0px -60px} +.known.block_72{background-position:-60px -60px} +.known.block_73{background-position:-120px -60px} +.known.block_74{background-position:-180px -60px} +.known.block_75{background-position:-240px -60px} +.known.block_76{background-position:-300px -60px} +.known.block_77{background-position:-360px -60px} +.known.block_81{background-position:0px -120px} +.known.block_82{background-position:-60px -120px} +.known.block_83{background-position:-120px -120px} +.known.block_84{background-position:-180px -120px} +.known.block_85{background-position:-240px -120px} +.known.block_86{background-position:-300px -120px} +.known.block_87{background-position:-360px -120px} +.known.block_91{background-position:0px -180px} +.known.block_92{background-position:-60px -180px} +.known.block_93{background-position:-120px -180px} +.known.block_94{background-position:-180px -180px} +.known.block_95{background-position:-240px -180px} +.known.block_96{background-position:-300px -180px} +.known.block_97{background-position:-360px -180px} -- cgit v1.2.3