30 lines
864 B
TypeScript
30 lines
864 B
TypeScript
import { Component } from '@angular/core';
|
|
import { Router, RouterLink, RouterLinkActive } from '@angular/router';
|
|
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
|
import { faMoon } from '@fortawesome/free-solid-svg-icons';
|
|
import { faSun } from '@fortawesome/free-solid-svg-icons';
|
|
import { ThemeSwitchService } from '../../service/theme-switch.service';
|
|
import { Card } from 'primeng/card';
|
|
|
|
@Component({
|
|
selector: 'app-navigation-bar',
|
|
imports: [FontAwesomeModule, RouterLink, RouterLinkActive, Card ],
|
|
templateUrl: './navigation-bar.html',
|
|
styleUrl: './navigation-bar.scss'
|
|
})
|
|
export class NavigationBar {
|
|
|
|
constructor(
|
|
private router: Router,
|
|
protected themeSwitchService: ThemeSwitchService,
|
|
) {}
|
|
|
|
isActive(route: string): boolean {
|
|
return this.router.url === route;
|
|
}
|
|
|
|
faMoon = faMoon;
|
|
faSun = faSun;
|
|
|
|
}
|