diff --git a/package-lock.json b/package-lock.json index bc17c25..676a399 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "domino-game", - "version": "2.0.4", + "version": "2.0.5", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index f01e8b9..4db582a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "domino-game", - "version": "2.0.5", + "version": "2.0.6", "description": "Domino is a game multiplayer made in node socket.io, typescript, node.js and html5.", "main": "./._build/Server.js", "engines": { @@ -43,15 +43,14 @@ "geek", "dom-html", "dev-junior", - "runtime", - "DOM-Element", + "runtime", + "DOM-Element", "brazil", "gme", "jogo-tabuleiro", "fun", - "full-stack-developer", - "Dom" - + "full-stack-developer", + "Dom" ], "author": { "name": "Felipe Mateus", diff --git a/public/css/forkme.css b/public/css/forkme.css index a4a9fcd..a9112b3 100644 --- a/public/css/forkme.css +++ b/public/css/forkme.css @@ -1 +1 @@ -#forkongithub a{background:#000;color:#fff;text-decoration:none;font-family:arial,sans-serif;text-align:center;font-weight:bold;padding:5px 40px;font-size:1rem;line-height:2rem;position:relative;transition:0.5s;}#forkongithub a:hover{background:#00b6ff;color:#000;}#forkongithub a::before,#forkongithub a::after{content:"";width:100%;display:block;position:absolute;top:1px;left:0;height:1px;background:#fff;}#forkongithub a::after{bottom:1px;top:auto;}@media screen and (min-width:800px){#forkongithub{position:fixed;display:block;top:0;right:0;width:200px;overflow:hidden;height:200px;z-index:9999;}#forkongithub a{width:200px;position:absolute;top:60px;right:-60px;transform:rotate(45deg);-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);-moz-transform:rotate(45deg);-o-transform:rotate(45deg);box-shadow:4px 4px 10px rgba(0,0,0,0.8);}} \ No newline at end of file +#forkongithub a{background:#000;color:#fff;text-decoration:none;font-family:arial,sans-serif;text-align:center;font-weight:bold;padding:5px 40px;font-size:1rem;line-height:2rem;position:relative;transition:0.5s;}#forkongithub a:hover{background:#00b6ff;color:#000;}#forkongithub a::before,#forkongithub a::after{content:"";width:100%;display:block;position:absolute;top:1px;left:0;height:1px;background:#fff;}#forkongithub a::after{bottom:1px;top:auto;}/*@media screen and (min-width:800px){*/#forkongithub{position:fixed;display:block;top:0;right:0;width:200px;overflow:hidden;height:200px;z-index:9999;}#forkongithub a{width:200px;position:absolute;top:60px;right:-60px;transform:rotate(45deg);-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);-moz-transform:rotate(45deg);-o-transform:rotate(45deg);box-shadow:4px 4px 10px rgba(0,0,0,0.8);} \ No newline at end of file diff --git a/public/css/ui.css b/public/css/ui.css index d57b55d..120749f 100644 --- a/public/css/ui.css +++ b/public/css/ui.css @@ -1,5 +1,5 @@ body{ - min-width:1024px !important; + } .card{ text-align:center; @@ -146,4 +146,21 @@ body{ height:162px; display:inline-block; float:right; +} + +#mobile_message{ + background-color: #FFF; + height: 100%; + width: 100%; + left: 0; + top: 0; + overflow: hidden; + position: fixed; + display: none; + align-items: center; + justify-content: center; +} + +#mobile_message h1{ + font-size: 1.5em; } \ No newline at end of file diff --git a/public/index.html b/public/index.html index 0c9b6d7..19ff692 100644 --- a/public/index.html +++ b/public/index.html @@ -29,7 +29,7 @@ -
+
@@ -65,6 +65,9 @@

Estastiticas

+
+

⚠️Resolução Incompatível!

+
Fork me on GitHub diff --git a/public/js/App.ts b/public/js/App.ts index 5a936a5..efa223a 100644 --- a/public/js/App.ts +++ b/public/js/App.ts @@ -1,7 +1,7 @@ import { Game } from './Game.js' declare global { - interface Window { game: Game; } + interface Window { game: Game; io: any } } window.game = new Game(window.io); \ No newline at end of file diff --git a/public/js/Game.ts b/public/js/Game.ts index 15b4333..f3141be 100644 --- a/public/js/Game.ts +++ b/public/js/Game.ts @@ -10,7 +10,7 @@ export class Game { constructor(io) { this.socket = io(); - this.listen(); + this.sizeScreen(); this.modal = new Modal(this); } @@ -173,4 +173,13 @@ export class Game { document.getElementById('cards_in_hand').innerHTML = msg.cardsInHand; }); } + + private sizeScreen() { + if (window.screen.width >= 1024 && window.screen.height >= 768) { + this.listen(); + }else{ + document.getElementById("game").style.display = 'none'; + document.getElementById('mobile_message').style.display = "flex"; + } + } }