From fb45d1d75878bc950b79bdd38460a0e51c2d804b Mon Sep 17 00:00:00 2001 From: koenigmarcel Date: Mon, 12 Jul 2021 10:10:47 +0200 Subject: [PATCH 1/2] Mobile Login Layout --- public/css/components.css | 9 +++++++++ public/css/header.css | 5 +++-- public/css/index.css | 19 +++++++++++++++++++ 3 files changed, 31 insertions(+), 2 deletions(-) diff --git a/public/css/components.css b/public/css/components.css index 2d8b8a8..c2e9efe 100644 --- a/public/css/components.css +++ b/public/css/components.css @@ -108,4 +108,13 @@ main { grid-template-rows: 60% 40%; height: 100%; } + + #spielanleitung { + font-size: 5em; + } + + #modal_header { + font-size: 3em; + text-align: center; + } } \ No newline at end of file diff --git a/public/css/header.css b/public/css/header.css index e034e2e..e746474 100644 --- a/public/css/header.css +++ b/public/css/header.css @@ -47,11 +47,12 @@ header { @media only screen and (max-width: 980px) { header { - height: 3em; + height: 5em; + } .title { - font-size: 2em; + font-size: 3em; } .build { diff --git a/public/css/index.css b/public/css/index.css index 2a6dae7..0f9cc24 100644 --- a/public/css/index.css +++ b/public/css/index.css @@ -52,4 +52,23 @@ #login button { background-color: #0062ff; color: #ffffff; +} + +@media only screen and (max-width: 980px) { + + #login { + align-items: flex-start; + } + + #login label { + font-size: 2.5em; + + } + + #login input, #login button { + height: 4.0em; + font-size: 2.5em; + + } + } \ No newline at end of file -- 2.45.2 From cf442cd6298bf580c996d5ae3a9b945888877f4d Mon Sep 17 00:00:00 2001 From: H4CK3R-01 <44125287+H4CK3R-01@users.noreply.github.com> Date: Mon, 12 Jul 2021 10:24:50 +0200 Subject: [PATCH 2/2] Show error message if room is full --- public/js/index.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/public/js/index.js b/public/js/index.js index 922ca8b..91b2f58 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -47,13 +47,10 @@ document.getElementById('ok').addEventListener('click', function () { }); socket.on('error', function (data) { - if (data === 'Game started already or room has two many members') { - document.getElementById('login').style.display = 'flex'; - document.getElementById('game').style.display = 'none'; - document.getElementById('chat').style.display = 'none'; - document.getElementById('error').innerText = data; - } - console.log(data); + document.getElementById('login').style.display = 'flex'; + document.getElementById('game').style.display = 'none'; + document.getElementById('chat').style.display = 'none'; + document.getElementById('error').innerText = data; }); socket.on('new message', function (data) { -- 2.45.2