Skip to content

Commit f67abed

Browse files
authored
Merge pull request #35 from sourcefuse/GH-20
Arc-Docs Introduction Part
2 parents f1abd7c + 3c5ef05 commit f67abed

40 files changed

+1816
-155
lines changed

angular.json

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@
5656
"budgets": [
5757
{
5858
"type": "initial",
59-
"maximumWarning": "5mb",
60-
"maximumError": "5mb"
59+
"maximumWarning": "10mb",
60+
"maximumError": "10mb"
6161
},
6262
{
6363
"type": "anyComponentStyle",
@@ -92,8 +92,8 @@
9292
},
9393
{
9494
"type": "anyComponentStyle",
95-
"maximumWarning": "5mb",
96-
"maximumError": "5mb"
95+
"maximumWarning": "10mb",
96+
"maximumError": "10mb"
9797
}
9898
]
9999
}
@@ -194,26 +194,39 @@
194194
"polyfills": ["zone.js"],
195195
"tsConfig": "projects/arc-docs/tsconfig.app.json",
196196
"inlineStyleLanguage": "scss",
197+
"optimization": false,
197198
"assets": [
198199
"projects/arc-docs/src/favicon.ico",
199-
"projects/arc-docs/src/assets"
200+
{ "glob": "**/*", "input": "node_modules/monaco-editor", "output": "/assets/monaco/" },
201+
{
202+
"glob": "**/*",
203+
"input": "projects/arc-lib/src/lib/assets/",
204+
"output": "/assets/"
205+
}
200206
],
207+
208+
201209
"styles": [
202210
"./node_modules/@angular/material/prebuilt-themes/indigo-pink.css",
203211
"node_modules/eva-icons/style/scss/eva-icons.scss",
204212
"node_modules/@nebular/theme/styles/prebuilt/dark.css",
205213
"projects/arc-docs/src/styles.scss"
206214
],
207215
"scripts": [],
208-
"allowedCommonJsDependencies": ["lodash", "eva-icons", "CommonJS"]
216+
"allowedCommonJsDependencies": ["lodash", "eva-icons", "CommonJS"],
217+
"stylePreprocessorOptions": {
218+
"includePaths": [
219+
"projects/arc-lib/src/lib/theme/styles"
220+
]
221+
}
209222
},
210223
"configurations": {
211224
"production": {
212225
"budgets": [
213226
{
214227
"type": "initial",
215-
"maximumWarning": "5mb",
216-
"maximumError": "4mb"
228+
"maximumWarning": "10mb",
229+
"maximumError": "10mb"
217230
},
218231
{
219232
"type": "anyComponentStyle",
@@ -311,13 +324,13 @@
311324
"budgets": [
312325
{
313326
"type": "initial",
314-
"maximumWarning": "5mb",
315-
"maximumError": "5mb"
327+
"maximumWarning": "10mb",
328+
"maximumError": "10mb"
316329
},
317330
{
318331
"type": "anyComponentStyle",
319-
"maximumWarning": "5mb",
320-
"maximumError": "5mb"
332+
"maximumWarning": "10mb",
333+
"maximumError": "10mb"
321334
}
322335
],
323336
"outputHashing": "all"

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

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,18 @@ import {BrowserModule} from '@angular/platform-browser';
44
import {AppRoutingModule} from './app-routing.module';
55
import {AppComponent} from './app.component';
66
import {ThemeModule} from '@project-lib/theme/theme.module';
7+
import {HeaderComponent} from '@project-lib/components/header/header.component';
8+
import {SidebarComponent} from '@project-lib/components/sidebar/sidebar.component';
79

810
@NgModule({
911
declarations: [AppComponent],
10-
imports: [BrowserModule, AppRoutingModule, ThemeModule.forRoot('default')],
12+
imports: [
13+
BrowserModule,
14+
AppRoutingModule,
15+
ThemeModule.forRoot('default'),
16+
HeaderComponent,
17+
SidebarComponent,
18+
],
1119
providers: [],
1220
bootstrap: [AppComponent],
1321
})
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
export const DOCUMENTATION_MENU_ITEMS = [
2+
{
3+
title: 'Getting Started',
4+
icon: 'book-outline',
5+
children: [
6+
{
7+
title: 'Introduction',
8+
link: '/docs/getting-started',
9+
},
10+
],
11+
},
12+
{
13+
title: 'Guide',
14+
icon: 'book-outline',
15+
children: [
16+
{
17+
title: 'Cloning Boilerplate',
18+
link: '/docs/guide/clone',
19+
},
20+
{
21+
title: 'Backend Integration',
22+
},
23+
],
24+
},
25+
];
Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,17 @@
1-
<!-- <nb-layout>
2-
<nb-layout-header fixed style="background-color: antiquewhite">
3-
<a href="#"><i class="nb-menu"></i></a
4-
></nb-layout-header>
51

6-
<nb-sidebar></nb-sidebar>
2+
<nb-layout>
3+
<nb-layout-header fixed class="border-basic-bottom">
4+
<div class="header-wrapper">
5+
<lib-header></lib-header>
6+
</div>
7+
</nb-layout-header>
8+
9+
<nb-sidebar>
10+
<nb-menu [items]="menu"> </nb-menu>
11+
<lib-sidebar></lib-sidebar>
12+
</nb-sidebar>
713

8-
<nb-layout-column class="colored-column-basic"
9-
>Layout Content
10-
<router-outlet></router-outlet>
14+
<nb-layout-column>
15+
<router-outlet class="main-router"></router-outlet>
1116
</nb-layout-column>
12-
</nb-layout> -->
13-
<nb-layout>
14-
<nb-layout-header>Awesome Company</nb-layout-header>
15-
<nb-layout-column class="colored-column-warning"
16-
>Left column</nb-layout-column
17-
>
18-
<nb-layout-column class="colored-column-danger"
19-
>Right column</nb-layout-column
20-
>
2117
</nb-layout>
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,71 @@
1+
// Ensure the comments are properly placed if you're using them for debugging or development
2+
@use 'sass:map';
3+
@use '../../../../arc-lib/src/lib/theme/styles/variables' as *;
4+
@use '@nebular/theme/styles/theming' as *;
5+
@use '../../styles.scss' as *;
6+
17
.colored-column-warning {
28
background-color: aqua;
39
}
10+
11+
@include nb-install-component() {
12+
.nav-container {
13+
display: flex;
14+
justify-content: space-between;
15+
width: 100%;
16+
}
17+
18+
.logo-container {
19+
display: flex;
20+
align-items: center;
21+
width: calc(#{nb-theme(sidebar-width)} - #{nb-theme(header-padding)});
22+
user-select: none;
23+
}
24+
25+
nb-action {
26+
height: auto;
27+
display: flex;
28+
align-content: center;
29+
}
30+
31+
nb-user {
32+
cursor: pointer;
33+
}
34+
35+
nb-sidebar {
36+
z-index: 1038;
37+
border-right: 0.063rem solid map.get($color, 'border-basic');
38+
border-top: 0.063rem solid map.get($color, 'border-basic');
39+
40+
nb-sidebar-footer {
41+
border-top: 0.063rem solid map.get($color, 'border-basic');
42+
}
43+
44+
nb-menu {
45+
margin: 0 !important;
46+
}
47+
}
48+
49+
.header-container {
50+
display: flex;
51+
align-items: center;
52+
width: auto;
53+
54+
.menu-icon {
55+
margin-left: 0.625rem;
56+
}
57+
58+
.logo {
59+
padding: 0 1.25rem;
60+
padding-left: 0.625rem;
61+
font-size: 1.75rem;
62+
white-space: nowrap;
63+
text-decoration: none;
64+
}
65+
}
66+
}
67+
68+
69+
.header-wrapper {
70+
width: 100%;
71+
}
Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,28 @@
1-
import {Component} from '@angular/core';
1+
import {Component, OnInit} from '@angular/core';
2+
import {ActivatedRoute, Router} from '@angular/router';
3+
import {NbMenuItem, NbMenuService, NbSidebarService} from '@nebular/theme';
4+
import {AuthService} from '@project-lib/core/auth';
5+
import {RouteComponentBaseDirective} from '@project-lib/core/route-component-base';
6+
import {IconPacksManagerService} from '@project-lib/theme/services';
7+
import {takeUntil} from 'rxjs';
8+
import {Location} from '@angular/common';
9+
import {DOCUMENTATION_MENU_ITEMS} from '../constants/docs-menu.contant';
210

311
@Component({
412
selector: 'app-docs',
513
templateUrl: './docs.component.html',
614
styleUrls: ['./docs.component.scss'],
715
})
8-
export class DocsComponent {}
16+
export class DocsComponent extends RouteComponentBaseDirective {
17+
constructor(
18+
override readonly route: ActivatedRoute,
19+
override readonly location: Location,
20+
private readonly iconMgr: IconPacksManagerService,
21+
private router: Router,
22+
) {
23+
super(route, location);
24+
this.iconMgr.registerSvgs();
25+
}
26+
27+
menu: NbMenuItem[] = DOCUMENTATION_MENU_ITEMS;
28+
}

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

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,30 @@ import {CommonModule} from '@angular/common';
33
import {DocsComponent} from './docs.component';
44
import {DocsRoutingModule} from './docs-routing.module';
55
import {ThemeModule} from '@project-lib/theme/theme.module';
6+
import {HeaderComponent} from '@project-lib/components/header/header.component';
7+
import {SidebarComponent} from '@project-lib/components/sidebar/sidebar.component';
8+
import {AuthService, CoreAuthModule} from '@project-lib/core/auth';
9+
import {HttpClientModule} from '@angular/common/http';
10+
import {NgxPermissionsService, NgxPermissionsStore} from 'ngx-permissions';
11+
import {AuthModule} from '@project-lib/components/index';
12+
import {environment} from '@main-project/boiler/env/environment';
13+
import {APP_CONFIG} from '@project-lib/app-config';
614

715
@NgModule({
816
declarations: [DocsComponent],
9-
imports: [CommonModule, DocsRoutingModule, ThemeModule],
17+
imports: [
18+
DocsRoutingModule,
19+
ThemeModule,
20+
HeaderComponent,
21+
SidebarComponent,
22+
CoreAuthModule,
23+
],
24+
providers: [
25+
NgxPermissionsStore,
26+
{
27+
provide: APP_CONFIG,
28+
useValue: environment,
29+
},
30+
],
1031
})
1132
export class DocsModule {}

0 commit comments

Comments
 (0)