feat(auth): add login and registration modal functionality
This commit is contained in:
parent
5bbfa5994e
commit
0079ee7bf2
11 changed files with 212 additions and 55 deletions
|
@ -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>
|
||||
|
|
Reference in a new issue