style(navigation): implement basic navigation bar
This commit is contained in:
29
src/app/core/components/navigation-bar/navigation-bar.ts
Normal file
29
src/app/core/components/navigation-bar/navigation-bar.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
import { NgTemplateOutlet } from '@angular/common';
|
||||
import { Component } from '@angular/core';
|
||||
import { Router, RouterLink } 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';
|
||||
|
||||
@Component({
|
||||
selector: 'app-navigation-bar',
|
||||
imports: [FontAwesomeModule, RouterLink, NgTemplateOutlet ],
|
||||
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;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user