feat(auth): add login and registration modal functionality

This commit is contained in:
Jan-Marlon Leibl 2025-05-14 12:00:33 +02:00
commit 0079ee7bf2
Signed by: jleibl
GPG key ID: 300B2F906DC6F1D5
11 changed files with 212 additions and 55 deletions

View file

@ -1,7 +1,45 @@
<div class="min-h-screen flex flex-col">
<main class="flex-grow">
<app-navbar></app-navbar>
<app-navbar
(showLogin)="showLoginForm()"
(showRegister)="showRegisterForm()"
></app-navbar>
<router-outlet></router-outlet>
</main>
<app-footer></app-footer>
<!-- Auth Forms Overlay -->
@if (showLogin() || showRegister()) {
<div
class="fixed inset-0 bg-black/50 z-40"
(click)="hideAuthForms()"
(keydown.enter)="hideAuthForms()"
tabindex="0"
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"
>
@if (showLogin()) {
<app-login
(switchForm)="showRegisterForm()"
(closeDialog)="hideAuthForms()"
></app-login>
}
@if (showRegister()) {
<app-register
(switchForm)="showLoginForm()"
(closeDialog)="hideAuthForms()"
></app-register>
}
</div>
</div>
}
</div>