Void-Genesis: JWT-Handling, Szenenwechsel & Lobby-UI
This commit is contained in:
+329
-15
@@ -2,7 +2,7 @@
|
||||
@font-face {
|
||||
font-family: 'UI Font';
|
||||
/* .otf Dateien bekommen das Format 'opentype', .ttf Dateien 'truetype' */
|
||||
src: url('src/assets/fonts/Gugi-Regular.ttf') format('truetype');
|
||||
src: url('src/assets/fonts/WDXLLubrifontSC-Regular.ttf') format('truetype');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
@@ -40,17 +40,19 @@ body, html {
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
overflow: hidden;
|
||||
background-color: var(--color-bg-page);
|
||||
font-family: var(--font-main);
|
||||
|
||||
/* Wir nutzen nun unsere lokale Variable */
|
||||
font-family: var(--font-main);
|
||||
/* NEU: Verbietet mobilen Browsern das eigenmächtige Vergrößern der Schrift */
|
||||
-webkit-text-size-adjust: 100%;
|
||||
text-size-adjust: 100%;
|
||||
}
|
||||
|
||||
#game-wrapper {
|
||||
position: relative;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
#pixi-container {
|
||||
@@ -70,16 +72,16 @@ body, html {
|
||||
height: 100%;
|
||||
z-index: 10;
|
||||
pointer-events: none;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
#register-form {
|
||||
pointer-events: auto;
|
||||
width: 500px;
|
||||
height: 500px;
|
||||
position: relative;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
|
||||
.input-group label {
|
||||
@@ -130,7 +132,7 @@ body, html {
|
||||
width: 370px;
|
||||
height: 55px;
|
||||
left: 65px;
|
||||
top: 370px;
|
||||
top: 390px;
|
||||
|
||||
background: transparent;
|
||||
border: none;
|
||||
@@ -138,7 +140,7 @@ body, html {
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
font-family: inherit;
|
||||
text-transform: uppercase;
|
||||
/*text-transform: uppercase;*/
|
||||
letter-spacing: 2px;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s ease;
|
||||
@@ -187,12 +189,25 @@ body, html {
|
||||
.checkbox-group {
|
||||
position: absolute;
|
||||
left: 115px;
|
||||
top: 275px;
|
||||
/*top: 275px; */
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
#group-remember {
|
||||
/* Position für den Login-Modus.
|
||||
Das Passwortfeld liegt hier bei 200px, 275px passt also perfekt. */
|
||||
top: 300px;
|
||||
}
|
||||
|
||||
#group-agb {
|
||||
/* Position für den Registrierungs-Modus.
|
||||
Das Passwortfeld liegt hier tiefer (265px + 50px Höhe).
|
||||
Wir setzen die Checkbox darunter. */
|
||||
top: 325px;
|
||||
}
|
||||
|
||||
.checkbox-group label {
|
||||
color: var(--color-text-main);
|
||||
font-size: 14px;
|
||||
@@ -218,9 +233,21 @@ body, html {
|
||||
left: 2px;
|
||||
}
|
||||
|
||||
#otp-instruction {
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 120px;
|
||||
left: 65px;
|
||||
width: 370px;
|
||||
text-align: center;
|
||||
color: var(--color-text-main);
|
||||
font-size: 15px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#msg-box {
|
||||
position: absolute;
|
||||
top: 330px;
|
||||
top: 350px;
|
||||
left: 65px;
|
||||
width: 370px;
|
||||
height: 30px;
|
||||
@@ -233,6 +260,48 @@ body, html {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
/* --- NEU: RESEND OTP LINK --- */
|
||||
#resend-otp-link {
|
||||
position: absolute;
|
||||
top: 250px;
|
||||
left: 65px;
|
||||
width: 370px;
|
||||
|
||||
text-align: center;
|
||||
color: var(--color-text-inactive);
|
||||
font-size: 14px;
|
||||
text-decoration: underline; /* Unterstrichen, damit es als Link erkennbar ist */
|
||||
cursor: pointer;
|
||||
|
||||
/* WICHTIG: Erlaubt das Anklicken, da der Container darüber (ui-layer) pointer-events: none hat */
|
||||
pointer-events: auto;
|
||||
transition: color 0.2s ease, text-shadow 0.2s ease;
|
||||
}
|
||||
|
||||
#resend-otp-link:hover {
|
||||
color: var(--color-cyan-bright);
|
||||
text-shadow: 0 0 8px var(--color-cyan-bright);
|
||||
}
|
||||
|
||||
#forgot-password-link {
|
||||
position: absolute;
|
||||
/* Wir positionieren ihn unter dem Passwort-Feld (200px) auf Höhe der Checkboxen */
|
||||
top: 255px;
|
||||
left: 120px;
|
||||
|
||||
color: var(--color-text-inactive);
|
||||
font-size: 14px;
|
||||
text-decoration: underline;
|
||||
cursor: pointer;
|
||||
pointer-events: auto; /* Wichtig für die Klickbarkeit durch den ui-layer */
|
||||
transition: color 0.2s ease, text-shadow 0.2s ease;
|
||||
}
|
||||
|
||||
#forgot-password-link:hover {
|
||||
color: var(--color-cyan-bright);
|
||||
text-shadow: 0 0 8px var(--color-cyan-bright);
|
||||
}
|
||||
|
||||
/* --- NEU: DISCORD LINK --- */
|
||||
#discord-link {
|
||||
position: absolute;
|
||||
@@ -296,4 +365,249 @@ body, html {
|
||||
#game-footer a:hover {
|
||||
color: var(--color-cyan-bright);
|
||||
text-shadow: 0 0 8px var(--color-cyan-bright);
|
||||
}
|
||||
}
|
||||
|
||||
#back-link {
|
||||
position: absolute;
|
||||
/* Wir positionieren ihn oben links, wo sonst die Tabs sitzen */
|
||||
top: 70px;
|
||||
left: 65px;
|
||||
|
||||
color: var(--color-text-inactive);
|
||||
font-size: 15px;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
pointer-events: auto; /* Wichtig für Klickbarkeit */
|
||||
transition: color 0.2s ease, text-shadow 0.2s ease;
|
||||
}
|
||||
|
||||
#back-link:hover {
|
||||
color: var(--color-cyan-bright);
|
||||
text-shadow: 0 0 8px var(--color-cyan-bright);
|
||||
}
|
||||
|
||||
#lobby-ui {
|
||||
position: absolute;
|
||||
top: 0; left: 0;
|
||||
width: 100%; height: 100%;
|
||||
pointer-events: none;
|
||||
z-index: 15;
|
||||
}
|
||||
|
||||
#top-bar {
|
||||
width: 100%; height: 50px;
|
||||
background: transparent;
|
||||
border-bottom: none;
|
||||
box-shadow: none;
|
||||
display: flex; justify-content: space-between; align-items: center;
|
||||
padding: 0 20px; box-sizing: border-box;
|
||||
pointer-events: auto;
|
||||
}
|
||||
.top-bar-right {
|
||||
display: flex; align-items: center; gap: 20px;
|
||||
}
|
||||
|
||||
/* --- Grundgerüst der Custom Dropdowns --- */
|
||||
.custom-dropdown {
|
||||
position: relative;
|
||||
font-family: var(--font-main);
|
||||
color: var(--color-text-main);
|
||||
}
|
||||
|
||||
/* Der sichtbare Klick-Bereich (Toggle) */
|
||||
.dropdown-toggle {
|
||||
display: flex; align-items: center; gap: 8px;
|
||||
cursor: pointer;
|
||||
padding: 5px 10px;
|
||||
border: 1px solid transparent;
|
||||
transition: all 0.2s ease;
|
||||
user-select: none; /* Verhindert das versehentliche Markieren von Text */
|
||||
}
|
||||
|
||||
.dropdown-toggle:hover {
|
||||
border: 1px solid var(--color-cyan-dark);
|
||||
background: rgba(0, 240, 255, 0.05);
|
||||
}
|
||||
|
||||
.dropdown-arrow {
|
||||
font-size: 10px;
|
||||
color: var(--color-cyan-dark);
|
||||
}
|
||||
|
||||
.flag-icon {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
/* --- Das aufklappbare Menü --- */
|
||||
.dropdown-menu {
|
||||
position: absolute;
|
||||
top: 100%; /* Direkt unter dem Toggle anheften */
|
||||
right: 0; /* Rechtsbündig abschließen */
|
||||
margin-top: 10px;
|
||||
background: rgba(11, 25, 44, 0.95);
|
||||
border: 1px solid var(--color-cyan-dark);
|
||||
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
|
||||
list-style: none; /* Aufzählungszeichen entfernen */
|
||||
padding: 5px 0;
|
||||
min-width: 150px;
|
||||
|
||||
/* Standardmäßig unsichtbar und keine Klicks annehmend */
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
transform: translateY(-10px);
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
/* Wenn die Klasse 'show' per JS hinzugefügt wird, klappt das Menü auf */
|
||||
.dropdown-menu.show {
|
||||
opacity: 1;
|
||||
pointer-events: auto;
|
||||
transform: translateY(0);
|
||||
}
|
||||
|
||||
/* Das User-Menü braucht etwas mehr Platz für die langen Texte */
|
||||
.user-menu {
|
||||
min-width: 220px;
|
||||
}
|
||||
|
||||
/* --- Einzelne Menü-Einträge --- */
|
||||
.dropdown-item {
|
||||
padding: 10px 15px;
|
||||
cursor: pointer;
|
||||
display: flex; align-items: center; gap: 10px;
|
||||
font-size: 14px;
|
||||
transition: background 0.2s ease, color 0.2s ease;
|
||||
}
|
||||
|
||||
.dropdown-item:hover:not(.disabled) {
|
||||
background: rgba(0, 240, 255, 0.1);
|
||||
color: var(--color-cyan-bright);
|
||||
}
|
||||
|
||||
/* --- Ausgegraute Einträge (Disabled) --- */
|
||||
.dropdown-item.disabled, .dropdown-header.disabled {
|
||||
color: var(--color-text-inactive);
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.dropdown-header {
|
||||
padding: 10px 15px;
|
||||
font-size: 14px;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.premium-text {
|
||||
color: var(--color-cyan-bright);
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* --- Trennlinie im Menü --- */
|
||||
.dropdown-divider {
|
||||
height: 1px;
|
||||
background: var(--color-cyan-dark);
|
||||
margin: 5px 0;
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
/* --- Spezielles Styling für den Logout-Button --- */
|
||||
.logout-item {
|
||||
color: var(--color-error);
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.logout-item:hover {
|
||||
background: rgba(255, 68, 68, 0.1) !important;
|
||||
color: var(--color-error) !important;
|
||||
}
|
||||
|
||||
@media (max-width: 600px) {
|
||||
/* --- 1. Login/Registrierungs-Formular skalieren --- */
|
||||
#register-form {
|
||||
transform: translate(-50%, -50%) scale(0.7);
|
||||
}
|
||||
|
||||
/* --- 2. Top-Bar in der Lobby optimieren --- */
|
||||
#top-bar {
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
.top-bar-left .lobby-logo {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
#user-info {
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
#lobby-username {
|
||||
font-size: 14px;
|
||||
max-width: 80px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
#btn-logout {
|
||||
padding: 5px 10px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
/* --- 3. Footer aufräumen --- */
|
||||
#game-footer {
|
||||
flex-direction: column;
|
||||
height: auto;
|
||||
padding: 10px 0;
|
||||
gap: 8px;
|
||||
background: rgba(0, 0, 0, 0.7);
|
||||
}
|
||||
|
||||
.footer-left, .footer-center, .footer-right {
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#discord-link {
|
||||
left: 125px;
|
||||
top: 520px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-height: 1050px) and (min-width: 601px) {
|
||||
#register-form {
|
||||
/* Wir schieben das HTML-Formular aus der exakten Mitte um 80px nach unten.
|
||||
So hat das Logo (das in PixiJS darüber liegt) genug Luft zum Atmen. */
|
||||
top: calc(50% + 80px);
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-height: 500px) {
|
||||
/* --- Formular noch kleiner machen, damit es vertikal passt --- */
|
||||
#register-form {
|
||||
/* scale(0.5) macht das Formular klein genug für Handys im Querformat */
|
||||
transform: translate(-50%, -50%) scale(0.4);
|
||||
top: 50%;
|
||||
}
|
||||
|
||||
/* --- Discord-Button wie im normalen Handy-Modus nach unten klappen --- */
|
||||
#discord-link {
|
||||
left: -420px;
|
||||
top: 350px;
|
||||
}
|
||||
|
||||
/* --- Footer extrem flach machen --- */
|
||||
/* Im Querformat haben wir in der Breite Platz, aber in der Höhe nicht.
|
||||
Daher ordnen wir den Text wieder als Reihe (row) an. */
|
||||
#game-footer {
|
||||
flex-direction: row;
|
||||
height: 30px;
|
||||
padding: 0 20px;
|
||||
background: rgba(0, 0, 0, 0.7);
|
||||
}
|
||||
|
||||
.footer-left, .footer-center, .footer-right {
|
||||
text-align: center;
|
||||
width: 33%;
|
||||
font-size: 10px; /* Schrift minimal verkleinern */
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user