Skip to content

Commit 9d3f2d6

Browse files
committed
feat(arc-lib): standalone components with intro part
standalone components with docs of introduction part GH-26
1 parent 331e5d7 commit 9d3f2d6

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
import {Component, OnInit} from '@angular/core';
2+
import {CommonModule} from '@angular/common';
3+
import {ThemeModule} from '@project-lib/theme/theme.module';
4+
import {ActivatedRoute, Router} from '@angular/router';
5+
import {NbSidebarService, NbMenuService, NbMenuItem} from '@nebular/theme';
6+
import {AuthService, LoggedInUserDM} from '@project-lib/core/auth';
7+
import {RouteComponentBaseDirective} from '@project-lib/core/route-component-base';
8+
import {IconPacksManagerService} from '@project-lib/theme/services';
9+
import {takeUntil} from 'rxjs';
10+
import {Location} from '@angular/common';
11+
12+
@Component({
13+
selector: 'lib-header',
14+
standalone: true,
15+
imports: [CommonModule, ThemeModule],
16+
templateUrl: './header.component.html',
17+
styleUrls: ['./header.component.scss'],
18+
})
19+
export class HeaderComponent extends RouteComponentBaseDirective {
20+
toggleFooter = false;
21+
constructor(
22+
override readonly route: ActivatedRoute,
23+
override readonly location: Location,
24+
private readonly sidebarService: NbSidebarService,
25+
private readonly authService: AuthService,
26+
private readonly menuService: NbMenuService,
27+
private readonly iconMgr: IconPacksManagerService,
28+
private router: Router,
29+
) {
30+
super(route, location);
31+
this.iconMgr.registerSvgs();
32+
}
33+
34+
navigate(link: string) {
35+
this.router.navigate([link]);
36+
}
37+
38+
toggle() {
39+
this.sidebarService.toggle(true, 'right');
40+
this.toggleFooter = !this.toggleFooter;
41+
}
42+
}

0 commit comments

Comments
 (0)