style: format HTML for consistency and readability

This commit is contained in:
Jan-Marlon Leibl 2025-05-14 12:01:06 +02:00
commit b51305ca64
Signed by: jleibl
GPG key ID: 300B2F906DC6F1D5
6 changed files with 53 additions and 44 deletions

View file

@ -1,9 +1,6 @@
<div class="min-h-screen flex flex-col">
<main class="flex-grow">
<app-navbar
(showLogin)="showLoginForm()"
(showRegister)="showRegisterForm()"
></app-navbar>
<app-navbar (showLogin)="showLoginForm()" (showRegister)="showRegisterForm()"></app-navbar>
<router-outlet></router-outlet>
</main>
<app-footer></app-footer>
@ -18,20 +15,10 @@
role="dialog"
aria-modal="true"
></div>
<div
class="fixed inset-0 flex items-center justify-center z-50 p-4"
role="presentation"
>
<div
class="relative"
role="dialog"
aria-modal="true"
>
<div class="fixed inset-0 flex items-center justify-center z-50 p-4" role="presentation">
<div class="relative" role="dialog" aria-modal="true">
@if (showLogin()) {
<app-login
(switchForm)="showRegisterForm()"
(closeDialog)="hideAuthForms()"
></app-login>
<app-login (switchForm)="showRegisterForm()" (closeDialog)="hideAuthForms()"></app-login>
}
@if (showRegister()) {
<app-register

View file

@ -6,8 +6,19 @@
class="absolute top-4 right-4 text-text-secondary hover:text-white transition-colors"
aria-label="Dialog schließen"
>
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
<svg
xmlns="http://www.w3.org/2000/svg"
class="h-6 w-6"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M6 18L18 6M6 6l12 12"
/>
</svg>
</button>

View file

@ -6,8 +6,19 @@
class="absolute top-4 right-4 text-text-secondary hover:text-white transition-colors"
aria-label="Dialog schließen"
>
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
<svg
xmlns="http://www.w3.org/2000/svg"
class="h-6 w-6"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M6 18L18 6M6 6l12 12"
/>
</svg>
</button>

View file

@ -192,20 +192,10 @@
role="dialog"
aria-modal="true"
></div>
<div
class="fixed inset-0 flex items-center justify-center z-50 p-4"
role="presentation"
>
<div
class="relative"
role="dialog"
aria-modal="true"
>
<div class="fixed inset-0 flex items-center justify-center z-50 p-4" role="presentation">
<div class="relative" role="dialog" aria-modal="true">
@if (showLogin()) {
<app-login
(switchForm)="showRegisterForm()"
(closeDialog)="hideAuthForms()"
></app-login>
<app-login (switchForm)="showRegisterForm()" (closeDialog)="hideAuthForms()"></app-login>
}
@if (showRegister()) {
<app-register

View file

@ -1,4 +1,11 @@
import { ChangeDetectionStrategy, Component, inject, OnDestroy, OnInit, signal } from '@angular/core';
import {
ChangeDetectionStrategy,
Component,
inject,
OnDestroy,
OnInit,
signal,
} from '@angular/core';
import { NgFor } from '@angular/common';
import { RouterLink } from '@angular/router';
import { AuthService } from '@service/auth.service';

View file

@ -72,7 +72,10 @@
<a routerLink="/games" class="nav-mobile-link">Spiele</a>
<div class="pt-2 space-y-2">
@if (!isLoggedIn()) {
<button (click)="showLogin.emit()" class="button-primary w-full py-1.5 block text-center">
<button
(click)="showLogin.emit()"
class="button-primary w-full py-1.5 block text-center"
>
Anmelden
</button>
<button