Skip to content

Commit a276f18

Browse files
committed
feat(arc-lib): standalone components with intro part
standalone components with docs of introduction part GH-26
1 parent ead2299 commit a276f18

File tree

4 files changed

+20
-50
lines changed

4 files changed

+20
-50
lines changed

projects/arc-lib/src/lib/components/header /header.component.ts

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import {Component, OnInit} from '@angular/core';
22
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';
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';
1010
import {Location} from '@angular/common';
1111

1212
@Component({
@@ -22,10 +22,7 @@ export class HeaderComponent
2222
{
2323
toggleFooter = false;
2424
loggedInUserDM: LoggedInUserDM = new LoggedInUserDM();
25-
userMenu: NbMenuItem[] = [{ title: 'Log out', data: 'logout' }]; //dynamic krna hai ,
26-
// dusry project mai b chala hai
27-
//header place change ------Done
28-
//css variable
25+
userMenu: NbMenuItem[] = [{title: 'Log out', data: 'logout'}];
2926
constructor(
3027
override readonly route: ActivatedRoute,
3128
override readonly location: Location,
@@ -55,14 +52,5 @@ export class HeaderComponent
5552
.subscribe(usr => {
5653
this.loggedInUserDM = usr;
5754
});
58-
// this.menuService
59-
// .onItemClick()
60-
// .pipe(takeUntil(this._destroy$))
61-
// .subscribe(menu => {
62-
// console.log(menu);
63-
// if (menu.tag === 'userMenu' && menu.item.data === 'logout') {
64-
// this.authService.logout().pipe(takeUntil(this._destroy$)).subscribe();
65-
// }
66-
// });
6755
}
6856
}

projects/arc/src/app/app-routing.module.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,24 @@ import {AuthGuard, LoggedInGuard} from '@project-lib/core/auth';
66
const routes: Routes = [
77
{
88
path: 'auth',
9-
loadChildren: () =>
10-
import('projects/arc-lib/src/lib/components/auth/auth.module').then(
11-
m => m.AuthModule,
12-
),
13-
// canActivate: [LoggedInGuard],
9+
loadChildren: () =>
10+
import('projects/arc-lib/src/lib/components/auth/auth.module').then(
11+
m => m.AuthModule,
12+
),
13+
canActivate: [LoggedInGuard],
1414
},
1515
{
1616
path: 'main',
1717
loadChildren: () => import('./main/main.module').then(m => m.MainModule),
18-
// canActivate: [AuthGuard],
18+
canActivate: [AuthGuard],
1919
},
2020
{
2121
path: 'gantt',
2222
loadChildren: () =>
2323
import('../../../arc-lib/src/lib/components/gantt/gantt.module').then(
2424
m => m.GanttModule,
2525
),
26-
// canActivate: [AuthGuard],
26+
canActivate: [AuthGuard],
2727
},
2828
{
2929
path: '',

projects/arc/src/app/main/home/home.component.scss

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
}
2828
}
2929

30-
.feat-detail-wrapper { //extra
30+
.feat-detail-wrapper {
3131
display: flex;
3232
align-items: flex-start;
3333
justify-content: space-between;
@@ -60,7 +60,7 @@
6060
max-width: 100%;
6161
}
6262

63-
.feat-detail-img-wrapper img{ // extra
63+
.feat-detail-img-wrapper img{
6464
max-width: 100%;
6565
}
6666

@@ -166,7 +166,7 @@
166166
font-size: 24px;
167167
}
168168
}
169-
.feat-detail-wrapper{ // etra
169+
.feat-detail-wrapper{
170170
display: flex;
171171
align-items: flex-start;
172172
justify-content: space-between;
@@ -196,15 +196,15 @@
196196
.col-md-3 {
197197
width: 100%;
198198
}
199-
.feat-detail-box{ //extra
199+
.feat-detail-box{
200200
margin-bottom: 20px;
201201
.feat-detail-content{
202202
h2{
203203
font-size: 24px;
204204
}
205205
}
206206
}
207-
.feat-detail-img-wrapper{ // extra
207+
.feat-detail-img-wrapper{
208208
text-align: center;
209209
}
210210
}

projects/arc/src/app/main/main.component.ts

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@ export class MainComponent
3131
super(route, location);
3232
this.iconMgr.registerSvgs();
3333
}
34-
35-
// loggedInUserDM: LoggedInUserDM = new LoggedInUserDM();
36-
// userMenu: NbMenuItem[] = [{title: 'Log out', data: 'logout'}];
3734
menu: NbMenuItem[] = [
3835
{
3936
title: 'Home',
@@ -63,22 +60,7 @@ export class MainComponent
6360
},
6461
];
6562

66-
// navigate(link: string) {
67-
// this.router.navigate([link]);
68-
// }
69-
70-
// toggle() {
71-
// this.sidebarService.toggle(true, 'right');
72-
// this.toggleFooter = !this.toggleFooter;
73-
// }
74-
7563
ngOnInit(): void {
76-
// this.authService
77-
// .currentUser()
78-
// .pipe(takeUntil(this._destroy$))
79-
// .subscribe(usr => {
80-
// this.loggedInUserDM = usr;
81-
// });
8264
this.menuService
8365
.onItemClick()
8466
.pipe(takeUntil(this._destroy$))

0 commit comments

Comments
 (0)