summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--client.html8
-rw-r--r--scripts/client.js10
-rw-r--r--styles/client/card.css8
3 files changed, 15 insertions, 11 deletions
diff --git a/client.html b/client.html
index d589344..9b92a09 100644
--- a/client.html
+++ b/client.html
@@ -39,7 +39,7 @@
<script src="scripts/socket/message.js"></script>
<script src="scripts/socket/sock.js"></script>
- <script src="scripts/client.js"></script>
+ <script src="scripts/client.js" defer></script>
<title>WebCards - Client</title>
</head>
@@ -120,12 +120,6 @@
<button>Send</button>
</div>
</div>
-
- <script>
- var params = new URLSearchParams((new URL(window.location)).search);
- var game = new Client(params.get("s"), params.get("g"));
- setTimeout(game.init.bind(game), 100);
- </script>
</body>
</html> \ No newline at end of file
diff --git a/scripts/client.js b/scripts/client.js
index 9ce9a07..77b12b8 100644
--- a/scripts/client.js
+++ b/scripts/client.js
@@ -167,3 +167,13 @@ class Client{
}
}
+
+// Global init of the game variable
+
+let game;
+
+(() => {
+ let params = new URLSearchParams((new URL(window.location)).search);
+ game = new Client(params.get("s"), params.get("g"));
+ game.init();
+})(); \ No newline at end of file
diff --git a/styles/client/card.css b/styles/client/card.css
index b19b17a..9e7c558 100644
--- a/styles/client/card.css
+++ b/styles/client/card.css
@@ -173,8 +173,8 @@ deck[mode="strip-hr"] > card {
}
deck[mode="strip-hl"], deck[mode="strip-hr"] {
- width: calc(var(--ccount) * 75px + 160px);
- left: calc(var(--x) * (100vw - (var(--ccount) * 75px + 160px)));
+ width: calc(var(--ccount) * 75px + 166px);
+ left: calc(var(--x) * (100vw - (var(--ccount) * 75px + 166px)));
}
@@ -187,6 +187,6 @@ deck[mode="strip-vd"] > card {
}
deck[mode="strip-vu"], deck[mode="strip-vd"] {
- height: calc(var(--ccount) * 115px + 240px);
- top: calc(var(--y) * (100vh - (var(--ccount) * 115px + 240px)));
+ height: calc(var(--ccount) * 115px + 250px);
+ top: calc(var(--y) * (100vh - (var(--ccount) * 115px + 250px)));
}