Files
METH_Transcendence/docker-compose/requirements/nginx/static/style/game/games.css
Kum1ta 76cf5d0585 Django
- add "opponentLeft" boolean in endGame()
Site
    - update end game screen
    - fix red point on live chat after a game
2024-09-29 14:31:33 +02:00

255 lines
4.6 KiB
CSS

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* games.css :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: edbernar <edbernar@student.42angouleme. +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/08/20 11:23:41 by edbernar #+# #+# */
/* Updated: 2024/09/29 13:28:28 by edbernar ### ########.fr */
/* */
/* ************************************************************************** */
@keyframes fadeInGames {
from {
filter: brightness(1);
}
to {
filter: brightness(0);
}
}
@keyframes fadeOutGames {
from {
filter: brightness(0);
}
to {
filter: brightness(1);
}
}
@keyframes fadeOutStartGames {
0% {
filter: brightness(0);
}
70% {
filter: brightness(0);
}
100% {
filter: brightness(1);
}
}
@keyframes fadeInTextGames {
from {
color: rgb(255, 255, 255, 0.1);
}
to {
color: rgb(255, 255, 255, 1);
}
}
@keyframes fadeOutTextGames {
from {
color: rgb(255, 255, 255, 1);
}
to {
color: rgb(255, 255, 255, 0.1);
}
}
@keyframes end {
0% {
opacity: 1;
}
75% {
opacity: 0;
}
100% {
opacity: 1;
}
}
body {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
user-select: none;
}
#score {
line-height: 1.75;
vertical-align: top;
font-family: 'Poppins';
position: absolute;
font-size: 30vh;
top: 0;
bottom : 50%;
left: 50%;
transform: translate(-50%, 50%);
z-index: 800;
margin: 0;
padding: 0;
white-space: nowrap;
/* font-weight: 900; */
color: rgb(255, 255, 255, 0.1);
}
.gamePad {
display: none;
position: absolute;
z-index: 800;
width: 100%;
height: 100%;
}
.gamePad #fullscreen {
position: absolute;
top: 20px;
right: 20px;
width: 50px;
height: 50px;
background-repeat: no-repeat;
background-size: 80% 80%;
background-position: center;
border: none;
opacity: 0.5;
}
.gamePad .gamePadLeft {
display: flex;
position: absolute;
left: 50px;
bottom: 50px;
user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
touch-action: none;
}
.gamePad .gamePadRight {
display: flex;
position: absolute;
flex-direction: column;
right: 50px;
bottom: 50px;
user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
touch-action: none;
}
.gamePad .buttonGamePad
{
width: 100px;
height: 100px;
background-color: rgba(255, 255, 255, 0.1);
background-repeat: no-repeat;
background-size: 80% 80%;
background-position: center;
border: none;
user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
touch-action: none;
}
.gamePadLeft #padRight {
margin-left: 50px;
transform: rotate(180deg);
user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
touch-action: none;
}
.gamePadRight #padTop {
margin-bottom: 20px;
transform: rotate(90deg);
user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
touch-action: none;
}
.gamePadRight #padBottom {
transform: rotate(270deg);
user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
touch-action: none;
}
#canvasMultiGameOnline {
user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
touch-action: none;
}
.pingDiv {
position: absolute;
left: 10px;
top: 10px;
font-size: 20px;
color: white;
z-index: 800;
display: flex;
flex-direction: row;
background-color: rgba(0, 0, 0, 0.329);
user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
touch-action: none;
}
#ping {
font-size: 20px;
color: white;
border: 1px solid rgba(255, 255, 255, 0.123);
padding: 5px 10px 5px 10px;
}
#fps {
padding: 5px 10px 5px 10px;
border: 1px solid rgba(255, 255, 255, 0.123);
border-right: none;
}
#endGameDiv {
display: none;
flex-direction: column;
position: absolute;
justify-content: center;
align-items: center;
width: 100vw;
height: 100vh;
background-color: rgba(0, 0, 0, 0.9);
backdrop-filter: blur(5px);
z-index: 900;
transition: all 0.5s;
animation: fadeOutGames 0.5s;
}
#endGameText {
font-size: 100px;
color: white;
text-align: center;
}
#endGameScore {
font-size: 75px;
color: white;
text-align: center;
}
#endGameSimpleText {
font-size: 25px;
color: white;
text-align: center;
margin-top: 50px;
}