summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2021-09-18 13:20:39 +0200
committerTor Andersson <tor@ccxvii.net>2022-11-16 19:19:39 +0100
commit472dc404209a80e07a5ca67e395cf56f9e6dbf94 (patch)
tree6e3301dfbc34a781b24bcdf6eb6bbfc12c666b19
parentc4e75ddf9cee1436139d7f7f4dc77e4e0a15c594 (diff)
downloadcrusader-rex-472dc404209a80e07a5ca67e395cf56f9e6dbf94.tar.gz
crusader: Rotate map to landscape on wide displays.
-rw-r--r--play.html28
1 files changed, 27 insertions, 1 deletions
diff --git a/play.html b/play.html
index 255784b..bfa82df 100644
--- a/play.html
+++ b/play.html
@@ -78,19 +78,25 @@
/* MAP */
.mapwrap {
+ position: relative;
+ background-color: #224467;
box-shadow: 0px 1px 10px rgba(0,0,0,0.5);
width: 1275px;
height: 2475px;
}
.map {
- position: relative;
+ position: absolute;
width: 1275px;
height: 2475px;
background-repeat: no-repeat;
background-color: #224467;
}
+.map > * {
+ position: absolute;
+}
+
.map.hide_blocks div.blocks {
visibility: hidden;
}
@@ -228,6 +234,26 @@ body.shift .block.known:hover {
transition-timing-function: ease;
}
+/* LANDSCAPE MAP */
+
+@media (min-width: 2000px) {
+ .mapwrap:not(.fit) {
+ box-shadow: 1px 0px 10px rgba(0,0,0,0.5);
+ height: 1275px;
+ width: 2475px;
+ margin-bottom: 40px;
+ margin-top: 30px;
+ }
+ .mapwrap:not(.fit) .map {
+ transform: translateY(1275px) rotate(-90deg);
+ transform-origin: 0 0;
+ }
+ .mapwrap:not(.fit) .map .block.r0 { transform: rotate(90deg); }
+ .mapwrap:not(.fit) .map .block.r1 { transform: rotate(0deg); }
+ .mapwrap:not(.fit) .map .block.r2 { transform: rotate(-90deg); }
+ .mapwrap:not(.fit) .map .block.r3 { transform: rotate(-180deg); }
+}
+
/* BATTLE BOARD */
.battle {