From 86f05f773836134c7943841af5d14180a8445bac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=91cze=20Bence?= Date: Sun, 14 Jun 2020 11:11:37 +0200 Subject: [PATCH 1/3] MAPG-137 place static maps into container to avoid large layout shifts --- public/static/css/maps.css | 9 ++++++++- views/maps.php | 4 +++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/public/static/css/maps.css b/public/static/css/maps.css index c239535..7d51384 100644 --- a/public/static/css/maps.css +++ b/public/static/css/maps.css @@ -26,8 +26,15 @@ div.mapItem>div.title>p.title { font-size: 18px; } -div.mapItem>img { +div.mapItem>div.imgContainer { width: 100%; + padding-top: 50%; + background: #cccccc; +} + +div.mapItem>div.imgContainer>img { + width: 100%; + margin-top: -50% } div.mapItem>div.inner { diff --git a/views/maps.php b/views/maps.php index 9740011..b7ee6ef 100644 --- a/views/maps.php +++ b/views/maps.php @@ -13,7 +13,9 @@ $cssFiles = [

- +
+ Map area +

From ba83f73c3125e8473a39e160d3debfa83bce3c23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=91cze=20Bence?= Date: Sun, 14 Jun 2020 11:12:18 +0200 Subject: [PATCH 2/3] MAPG-137 add width and height to images where possible --- views/admin/map_editor.php | 8 ++++---- views/game.php | 2 +- views/templates/header.php | 2 +- views/templates/main_header.php | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/views/admin/map_editor.php b/views/admin/map_editor.php index 12c9a09..fcb92c1 100644 --- a/views/admin/map_editor.php +++ b/views/admin/map_editor.php @@ -17,7 +17,7 @@ $jsFiles = [

- + MapGuesser

@@ -25,7 +25,7 @@ $jsFiles = [ + --> @@ -34,14 +34,14 @@ $jsFiles = [ --> + --> 0 + --> diff --git a/views/game.php b/views/game.php index ef1ef19..d31d7aa 100644 --- a/views/game.php +++ b/views/game.php @@ -12,7 +12,7 @@ $jsFiles = [

- + MapGuesser

diff --git a/views/templates/header.php b/views/templates/header.php index b4998c8..62db163 100644 --- a/views/templates/header.php +++ b/views/templates/header.php @@ -1,7 +1,7 @@

- + MapGuesser

diff --git a/views/templates/main_header.php b/views/templates/main_header.php index 6c2bb17..89b5a87 100644 --- a/views/templates/main_header.php +++ b/views/templates/main_header.php @@ -23,7 +23,7 @@
- +