Lobby page
- fix img in skin selector Global - fix bug when we use return between lobby and game page
This commit is contained in:
@ -6,7 +6,7 @@
|
|||||||
/* By: edbernar <edbernar@student.42angouleme. +#+ +:+ +#+ */
|
/* By: edbernar <edbernar@student.42angouleme. +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2024/08/25 00:00:21 by edbernar #+# #+# */
|
/* Created: 2024/08/25 00:00:21 by edbernar #+# #+# */
|
||||||
/* Updated: 2024/10/09 11:12:43 by edbernar ### ########.fr */
|
/* Updated: 2024/11/15 23:19:38 by edbernar ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@ -44,6 +44,12 @@ class Page
|
|||||||
{
|
{
|
||||||
if (window.location.pathname == thisClass.availablePages[i].url || (thisClass.availablePages[i].suffix && window.location.pathname.startsWith(thisClass.availablePages[i].url)))
|
if (window.location.pathname == thisClass.availablePages[i].url || (thisClass.availablePages[i].suffix && window.location.pathname.startsWith(thisClass.availablePages[i].url)))
|
||||||
{
|
{
|
||||||
|
if (window.location.pathname == '/game')
|
||||||
|
{
|
||||||
|
history.replaceState({}, '', '/lobby');
|
||||||
|
thisClass.changePage('lobbyPage', true, null, false);
|
||||||
|
return ;
|
||||||
|
}
|
||||||
let arg = window.location.pathname.slice(thisClass.availablePages[i].url.length + 1);
|
let arg = window.location.pathname.slice(thisClass.availablePages[i].url.length + 1);
|
||||||
if (arg == "" || !thisClass.availablePages[i].suffix)
|
if (arg == "" || !thisClass.availablePages[i].suffix)
|
||||||
arg = null;
|
arg = null;
|
||||||
|
@ -115,6 +115,8 @@ body {
|
|||||||
border: 4px solid black;
|
border: 4px solid black;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: transform 0.3s ease;
|
transition: transform 0.3s ease;
|
||||||
|
background-size: cover;
|
||||||
|
background-position: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.color-box:hover {
|
.color-box:hover {
|
||||||
|
Reference in New Issue
Block a user