feat: add navbar component to multiple pages

This commit is contained in:
Jan-Marlon Leibl 2025-02-12 14:06:19 +01:00
parent e5bd173be9
commit b2f4d9d0d8
No known key found for this signature in database
GPG key ID: E7B6F77BF5EDB6F7
5 changed files with 16 additions and 15 deletions

View file

@ -1,7 +1,6 @@
<div class="min-h-screen flex flex-col">
<app-navbar></app-navbar>
<main class="flex-grow">
<router-outlet></router-outlet>
</main>
<app-footer></app-footer>
</div>
</div>

View file

@ -1,14 +1,4 @@
<nav class="bg-black border-b border-amber-600/30 sticky top-0 z-50">
<div class="container mx-auto px-4 py-3 flex justify-between items-center">
<!-- logo goes here -->
<div class="flex gap-4">
<button class="btn-primary" (click)="logout()">Ausloggen</button>
</div>
<div>
<button (click)="openDialog()">Einzahlen</button>
</div>
</div>
</nav>
<app-navbar></app-navbar>
<div class="grid grid-cols-3">
<div class="w-1/3 h-1/4">

View file

@ -3,11 +3,12 @@ import { KeycloakService } from 'keycloak-angular';
import { MatDialog } from '@angular/material/dialog';
import { DepositComponent } from '../deposit/deposit.component';
import { NavbarComponent } from '../../shared/components/navbar/navbar.component';
@Component({
selector: 'app-homepage',
standalone: true,
imports: [],
templateUrl: './home.component.html',
imports: [NavbarComponent],
templateUrl: './homepage.component.html',
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class HomeComponent {

View file

@ -1 +1,2 @@
<app-navbar></app-navbar>
<button (click)="login()">Einloggen</button>

View file

@ -0,0 +1,10 @@
import { Component } from '@angular/core';
import { NavbarComponent } from '../shared/components/navbar/navbar.component';
@Component({
selector: 'app-landing-page',
standalone: true,
imports: [NavbarComponent],
templateUrl: './landing-page.component.html',
})
export class LandingPageComponent {}