Files
METH_Transcendence/docker-compose/requirements/nginx/static/style/lobbyPage/lobbyPage.css
Kum1ta 7f7bb7457a Site
- add checkbox to play with bot in lobby page
   - fix bug when input for nb bot is null
   - secure request 0 tournament
   - change time to reconnect in websocket
Game
   - fix bug camera when player move up to down or reverse in goal animation
2024-10-12 17:18:39 +02:00

671 lines
11 KiB
CSS

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* style.css :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: marvin <marvin@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/08/17 22:12:26 by marvin #+# #+# */
/* Updated: 2024/08/17 22:12:26 by marvin ### ########.fr */
/* */
/* ************************************************************************** */
@keyframes anim1 {
0% {
transform: translate(0, -150%);
}
100% {
transform: translateY(0, 0);
}
}
@keyframes anim2 {
0% {
backdrop-filter: blur(0px);
background-color: rgba(0, 0, 0, 0);
}
100% {
backdrop-filter: blur(5px);
background-color: rgba(0, 0, 0, 0.8);
}
}
@keyframes anim3 {
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}
* {
margin: 0;
padding: 0;
font-family: "Poppins", sans-serif;
font-weight: 500;
font-style: normal;
}
body {
border: 0;
padding: 0;
width: 100%;
height: 100%;
background-color: #020202;
user-select: none;
}
.main-container{
display: flex;
justify-content: center;
align-items: center;
}
.main{
padding-block: 45px;
display: flex;
flex-direction: row;
gap: 9vw;
align-items: center;
}
.skin-select{
justify-content: space-between;
}
.popup-background {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
justify-content: center;
align-items: center;
backdrop-filter: blur(5px);
z-index: 700;
}
.popup-skin {
background-color: white;
padding: 20px;
text-align: center;
}
.popup-skin h1 {
margin-bottom: 30px;
font-size: 24px;
}
.color-grid {
display: grid;
grid-template-columns: repeat(4, 140px);
gap: 20px;
align-items: center;
justify-content: center;
padding-inline: 40px;
padding-bottom: 20px;
}
.color-box {
width: 120px;
height: 120px;
border: 4px solid black;
cursor: pointer;
transition: transform 0.3s ease;
}
.color-box:hover {
transform: scale(1.1);
}
.popup {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
backdrop-filter: blur(5px);
justify-content: center;
align-items: center;
z-index: 503;
}
.popup-content {
background-color: white;
padding: 20px;
text-align: center;
width: 40%;
position: relative;
box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}
.popup-content form {
display: flex;
flex-direction: column;
}
.choose{
display: flex;
justify-content: center;
gap: 20px;
}
.switch {
position: relative;
}
.switch p{
color: white;
font-size: 1.2em;
}
.switch label {
width: 59px;
height: 28px;
background-color: #999;
position: absolute;
top: 0;
left: 0;
border-radius: 50px;
}
.switch input[type="checkbox"] {
visibility: hidden;
}
.switch label:after {
content: '';
margin-top: 2px;
margin-left: 2px;
width: 22px;
height: 22px;
border-radius: 50px;
position: absolute;
top: 1px;
left: 1px;
transition: 200ms;
background-color: white;
}
.switch .look:checked + label:after {
left: 32px;
}
.switch .look:checked + label {
background-color: rgb(18, 223, 96);
}
#whatGame {
display: flex;
flex-direction: column;
margin-block: 25px;
max-width: 500px;
width: 400px;
font-size: 1.5rem;
}
#whatGame p{
color: white;
text-align: justify;
}
.line {
display: block;
width: 100%;
height: 2px;
background-color: rgb(255, 255, 255);
margin: 20px 0;
justify-content: center;
align-items: center;
}
.keys {
display: flex;
flex-direction: row;
justify-content: center;
gap: 20px;
align-items: center;
height: 100px;
width: 100%;
}
.key {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
background-color: transparent;
border: 4px solid white;
width: 80px;
height: 80px;
font-size: 1.2em;
transition: transform 0.3s ease;
}
.key img {
width: 35px;
height: 35px;
}
#down-key {
transform: scaleY(-1);
}
.select-line {
display: flex;
flex-direction: row;
justify-content: center;
gap: 20px;
}
#tournament-line2{
display: none;
width: 100%;
height: 2px;
justify-content: center;
align-items: center;
background-color: rgb(255, 255, 255);
margin: 20px 0;
justify-content: center;
align-items: center;
}
.select-keys {
display: flex;
flex-direction: row;
justify-content: center;
gap: 20px;
height: 35px;
width: 45%;
background-color: white;
color: #020202;
margin-top: 20px;
}
.not-select-keys {
display: flex;
flex-direction: row;
justify-content: center;
gap: 20px;
height: 35px;
width: 45%;
background-color: transparent;
color: white;
border: 2px solid white;
margin-top: 20px;
}
.barSelection{
margin: 25px;
width: 250px;
height: 250px;
border: 5px solid white;
transition: transform 0.3s ease;
}
.barSelection:hover{
transform: scale(1.05);
}
.goalSelection{
margin: 25px;
width: 250px;
height: 250px;
border: 5px solid white;
transition: transform 0.3s ease;
}
.goalSelection:hover{
transform: scale(1.05);
}
#topBarLobby {
display: flex;
flex-direction: row;
margin-block: 25px;
padding: 0;
padding-inline: 50px;
gap: 2rem;
align-items: center;
justify-content: space-between;
inset-inline: 0;
top: 0;
z-index: 500;
}
#topBarLobby h1 {
padding: 0;
padding-top: 4px;
font-size: 35px;
color: white;
font-family: 'Poppins';
font-style: italic;
font-weight: bold;
}
.game-mode {
display: flex;
flex-direction: column;
justify-content: flex-start;
width: 300px;
height: 550px;
align-items: center;
}
.mode-card {
width: 100%;
height: 100px;
background-color: white;
color: #020202;
padding-block: 20px;
margin-block: 20px;
display: flex;
justify-content: center;
align-items: center;
font-size: 1.2em;
transition: transform 0.3s ease;
}
.mode-card-ns {
width: 100%;
height: 100px;
background-color: transparent;
color: white;
border: 5px solid white;
padding-block: 20px;
margin-block: 20px;
display: flex;
justify-content: center;
align-items: center;
font-size: 1.2em;
transition: transform 0.3s ease;
}
.mode-card:hover {
transform: scale(1.05);
}
.mode-card-ns:hover {
transform: scale(1.05);
}
.search-container {
display: flex;
align-items: flex-start;
width: 30%;
}
.search-input {
width: 100%;
padding: 10px;
border: 2px solid #ccc;
font-size: 16px;
outline: none;
min-width: 200px;
}
.search-input:focus {
border-color: white;
}
.bottom {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
justify-content: center;
width: 100%;
margin-block: 25px;
}
.buttonStartGame {
background-color: white;
padding: 10px;
cursor: pointer;
width: 150px;
text-align: center;
transition: transform 0.3s ease;
}
.buttonStartGame:hover {
transform: scale(1.1);
}
#popMenuLoginButtonLobby {
background-color: white;
position: absolute;
z-index: 500;
width: 130px;
text-align: center;
display: none;
flex-direction: column;
justify-content: center;
}
@keyframes startGameAnim {
0% {
transform: translateX(-0%);
opacity: 1;
}
100% {
transform: translateX(-20%);
opacity: 0;
}
}
#topBarLobby #loginButton {
font-size: 20px;
background-color: white;
height: 40px;
width: 130px;
color: black;
text-align: center;
line-height: 40px;
transition: background-color 0.3s ease;
}
#topBarLobby #loginButton:hover {
background-color: transparent;
color: white;
cursor: pointer;
}
#searchResult {
position: absolute;
display: flex;
flex-direction: column;
background-color: white;
color: black;
z-index: 999;
}
#searchResult .searchResultLine {
margin-bottom: 5px;
width: 100%;
align-items: center;
cursor: pointer;
display: flex;
flex-direction: row;
}
#searchResult .searchResultLine p {
margin-left: 10px;
}
#searchResult .searchResultLine:hover {
background-color: #f1f1f1;
}
#searchResult .searchResultLine img {
width: 50px;
height: 50px;
padding: 5px;
border-radius: 50%;
margin-left: 10px;
}
.menuSelected {
display: flex;
flex-direction: row;
gap: 9vw;
}
.menuSelected {
display: none;
}
#stats {
display: flex;
justify-content: center;
max-width: 80%;
max-height: 80%;
}
.dashboard .contentStats {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
}
#tournamentCode {
width: 94%;
font-size: 0.8rem;
}
.switch {
position: relative;
display: inline-block;
width: 60px;
height: 34px;
}
.switch input {
opacity: 0;
width: 0;
height: 0;
}
.slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #ccc;
-webkit-transition: .4s;
transition: .4s;
}
.slider:before {
position: absolute;
content: "";
height: 26px;
width: 26px;
left: 4px;
bottom: 4px;
background-color: white;
-webkit-transition: .4s;
transition: .4s;
}
input:checked + .slider {
background-color: #2196F3;
}
input:focus + .slider {
box-shadow: 0 0 1px #2196F3;
}
input:checked + .slider:before {
-webkit-transform: translateX(26px);
-ms-transform: translateX(26px);
transform: translateX(26px);
}
.slider.round {
border-radius: 34px;
}
.slider.round:before {
border-radius: 50%;
}
@media (max-aspect-ratio: 1/1){
.main {
flex-direction: column;
display: unset;
padding-inline: inherit;
}
.search-container {
display: none;
}
.menuSelected {
flex-direction: column;
}
#whatGame {
/* display: none; */
margin-inline: 20px;
margin-left: auto;
margin-right: auto;
width: 90vw;
}
.game-mode {
margin-left: auto;
margin-right: auto;
}
.skin-select {
display: flex;
}
.barSelection {
width: 150px;
height: 150px;
margin: 5px;
}
.goalSelection {
width: 150px;
height: 150px;
margin: 5px;
}
#chatDiv {
width: 80%;
}
.keys{
display: none;
}
.select-line {
display: none;
}
.menuSelected {
gap: 0;
}
#tournament-line1 {
display: none;
}
#tournament-line2 {
display: block;
margin-top: 30px;
}
.popup-skin {
width: 70%;
}
.color-grid {
grid-template-columns: repeat(2, 90px);
justify-content: center;
align-items: center;
}
.color-box {
width: 90px;
height: 90px;
}
}