Site :
- Add notification chat - Add Home back button on lobby
This commit is contained in:
@ -3,10 +3,10 @@
|
||||
/* ::: :::::::: */
|
||||
/* main.js :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: edbernar <edbernar@student.42angouleme. +#+ +:+ +#+ */
|
||||
/* By: marvin <marvin@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/08/22 17:08:46 by madegryc #+# #+# */
|
||||
/* Updated: 2024/09/18 09:16:58 by edbernar ### ########.fr */
|
||||
/* Updated: 2024/09/18 10:59:57 by marvin ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@ -33,6 +33,7 @@ class LobbyPage
|
||||
{
|
||||
static create()
|
||||
{
|
||||
const ptmeButton = document.getElementById("homeButton");
|
||||
const startButton = document.getElementsByClassName('buttonStartGame')[0];
|
||||
const usernameP = document.getElementById('loginButton').getElementsByTagName('p')[0];
|
||||
const loginButton = document.getElementById('loginButton');
|
||||
@ -66,6 +67,7 @@ class LobbyPage
|
||||
barSelector = new barSelecter(document.getElementById('bar'));
|
||||
goalSelector = new goalSelecter(document.getElementById('goal'));
|
||||
startButton.addEventListener('click', startMode);
|
||||
ptmeButton.addEventListener('click', goBackHome);
|
||||
}
|
||||
|
||||
static dispose()
|
||||
@ -119,6 +121,11 @@ function ajustSearchUserList()
|
||||
searchResult.style.left = pos.left + 'px';
|
||||
}
|
||||
|
||||
function goBackHome()
|
||||
{
|
||||
pageRenderer.changePage('homePage');
|
||||
}
|
||||
|
||||
function startMode()
|
||||
{
|
||||
if (gameMode == 0)
|
||||
|
@ -6,7 +6,7 @@
|
||||
/* By: marvin <marvin@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/07/30 13:53:39 by edbernar #+# #+# */
|
||||
/* Updated: 2024/09/18 01:28:22 by marvin ### ########.fr */
|
||||
/* Updated: 2024/09/18 12:20:37 by marvin ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@ -28,6 +28,19 @@
|
||||
transition: transform 0.3s ease;
|
||||
}
|
||||
|
||||
/* Pour EDDY : Put display none and change on js to display flex when we have notification */
|
||||
|
||||
.notification-badge {
|
||||
display: flex;
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
background-color: #E74040;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
#chatButton:hover {
|
||||
transform: scale(1.2);
|
||||
}
|
||||
|
@ -186,7 +186,6 @@ body {
|
||||
margin-block: 25px;
|
||||
padding: 0;
|
||||
padding-inline: 50px;
|
||||
display: flex;
|
||||
gap: 5rem;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
@ -230,9 +229,7 @@ body {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
justify-content: center;
|
||||
|
||||
width: 40%;
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
.search-input {
|
||||
|
Reference in New Issue
Block a user