From: Valerie Pond Date: Mon, 17 Apr 2023 17:30:09 +0000 (+0100) Subject: Fix the mobile view for the last commit X-Git-Tag: 0.9~156 X-Git-Url: https://jfr.im/git/irc/unrealircd/unrealircd-webpanel.git/commitdiff_plain/711c63bc5bfbce12dadb2753e95013fff400a1fd?hp=e76c47e177b4e8e47b871f321490505195ebf78a Fix the mobile view for the last commit --- diff --git a/index.php b/index.php index 741f54f..175d4ea 100644 --- a/index.php +++ b/index.php @@ -29,7 +29,7 @@ $num_of_panel_admins = count($userlist); min-height: 100%; } -
+
@@ -127,7 +127,7 @@ $num_of_panel_admins = count($userlist);
-
+
@@ -261,9 +261,29 @@ $num_of_panel_admins = count($userlist); initStats(); //setInterval(updateStats, 1000); // Update stats every second // ^ commented out but may want to restart initStats() when connection is lost. + + + window.addEventListener('resize', function() { + var containers = document.querySelectorAll('.card-container'); + var width = window.innerWidth; + if (width < 768) + { + containers.forEach((container) => { + container.removeAttribute('style'); + + }); + } else + { + containers.forEach((container) => { + container.style.marginLeft = "40px"; + container.style.marginTop = "30px"; + + }); + } + }); -
+