Skip to content

Commit 5f9b663

Browse files
committed
Merge branch 'version-1-0-0' into 'development'
Version 1.0.0 See merge request Works.Al-Mokhtar/shared/dotnet-validator-docs!3
2 parents 91ce350 + de4ae0d commit 5f9b663

204 files changed

Lines changed: 10123 additions & 213 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
"@types/lodash": "^4.14.136",
2525
"bootstrap": "^4.3.1",
2626
"font-awesome": "^4.7.0",
27+
"highlight.js": "^9.15.9",
2728
"lodash": "^4.17.15",
2829
"rxjs": "~6.4.0",
2930
"tslib": "^1.10.0",

src/app/root/components/footer/footer.component.html

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,27 @@
1010
</div>
1111
<div class="nav-item">
1212
<span class="nav-link section-title">Community</span>
13-
<a routerLink="/" class="nav-link">
13+
<a href="{{settings.stackOverflow}}" target="blank" class="nav-link">
1414
<i class="fa fa-stack-overflow"></i>
15-
Stack Overflow
15+
StackOverflow
1616
</a>
1717
</div>
1818
<div class="nav-item">
1919
<span class="nav-link section-title">More</span>
20-
<a routerLink="/" class="nav-link">
20+
<a href="{{settings.gitHubRepo}}" target="blank" class="nav-link">
2121
<i class="fa fa-github"></i>
2222
GitHub
23+
<a href="{{settings.gitHubRepo + '/stargazers'}}" target="blank" class="badge badge-light">
24+
<i class="fa fa-star"></i>
25+
{{ (gitHubRepo$ | async)?.stargazers_count}}
26+
</a>
2327
</a>
24-
<a routerLink="/" class="nav-link">
28+
<a href="{{settings.nugetPackage}}" target="blank" class="nav-link">
2529
<i class="fa fa-download"></i>
2630
Nuget
31+
<span class="badge badge-light">
32+
{{ (nugetPackage$ | async)?.data[0].totalDownloads}}
33+
</span>
2734
</a>
2835
</div>
2936
</nav>
Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,26 @@
1-
import {Component} from "@angular/core";
1+
import {Component, OnInit} from "@angular/core";
2+
import {Observable} from "rxjs";
3+
import {environment} from "../../../../environments/environment";
4+
import {LibService} from "../../services";
5+
import {IGitHubRepo, INugetPackage} from "../../models";
26

37
@Component({
48
selector: "app-footer",
59
templateUrl: "./footer.component.html",
610
styleUrls: ["./footer.component.sass"]
711
})
8-
export class FooterComponent {
12+
export class FooterComponent implements OnInit {
913

1014
year: number = new Date().getFullYear();
15+
settings = environment;
16+
17+
gitHubRepo$: Observable<IGitHubRepo>;
18+
nugetPackage$: Observable<INugetPackage>;
19+
20+
constructor (private libService: LibService) {}
21+
22+
ngOnInit() {
23+
this.gitHubRepo$ = this.libService.fetchGitHubRepo();
24+
this.nugetPackage$ = this.libService.fetchNugetPackage();
25+
}
1126
}

src/app/root/components/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import {TopNavComponent} from "./top-nav/top-nav.component";
22
import {FooterComponent} from "./footer/footer.component";
33

4+
45
export const COMPONENTS: any[] = [
56
TopNavComponent,
67
FooterComponent

src/app/root/components/top-nav/top-nav.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
<a routerLink="/versions" class="version">{{ version$ | async}}</a>
99
</div>
1010
<div class="navbar-nav">
11-
<a routerLink="" class="nav-link">
11+
<a href="{{settings.gitHubRepo}}" target="blank" class="nav-link">
1212
<i class="fa fa-github"></i>
1313
GitHub
1414
</a>
15-
<a routerLink="" class="nav-link">
15+
<a href="{{settings.nugetPackage}}" target="blank" class="nav-link">
1616
<i class="fa fa-download"></i>
1717
Download
1818
</a>

src/app/root/components/top-nav/top-nav.component.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import {Component, OnInit} from "@angular/core";
22
import {GlobalService} from "../../services";
33
import {Observable} from "rxjs";
4+
import {environment} from "../../../../environments/environment";
45

56
@Component({
67
selector: "app-top-nav",
@@ -9,6 +10,8 @@ import {Observable} from "rxjs";
910
})
1011
export class TopNavComponent implements OnInit {
1112

13+
settings = environment;
14+
1215
version$: Observable<string>;
1316

1417
constructor (private globalService: GlobalService) {}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export interface IGitHubRepo {
2+
id: string;
3+
stargazers_count: number;
4+
}

src/app/root/models/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export * from "./git-hub-repo.model";
2+
export * from "./nuget-package.model";
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
export interface INugetPackage {
2+
data: {
3+
id: string;
4+
version: string;
5+
description: string;
6+
summary: string;
7+
title: string;
8+
licenseUrl: string;
9+
tags: string[];
10+
authors: string[];
11+
totalDownloads: number;
12+
verified: boolean;
13+
versions: {
14+
version: string,
15+
downloads: number,
16+
"@id": string;
17+
}[];
18+
}[];
19+
}

src/app/root/root-routing.module.ts

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,45 @@
11
import {NgModule} from "@angular/core";
22
import {RouterModule, Routes} from "@angular/router";
33

4+
import * as fromShared from "../shared";
5+
46
import * as fromContainers from "./containers";
57

68
const routes: Routes = [
9+
{
10+
path: "",
11+
redirectTo: "docs",
12+
pathMatch: "full"
13+
},
714
{
815
path: "docs",
916
component: fromContainers.LayoutComponent,
1017
children: [
18+
{
19+
path: "",
20+
pathMatch: "full",
21+
redirectTo: "v1.0.0"
22+
},
1123
{
1224
path: "v1.0.0",
1325
loadChildren: () => import("../version1.0.0").then(m => m.Version100Module)
1426
}
1527
]
1628
},
1729
{
18-
path: "",
19-
redirectTo: "docs/v1.0.0/getting-started",
20-
pathMatch: "full"
30+
path: "versions",
31+
component: fromContainers.LayoutComponent,
32+
children: [
33+
{
34+
path: "",
35+
component: fromShared.VersionsComponent
36+
},
37+
{
38+
path: "**",
39+
pathMatch: "full",
40+
redirectTo: ""
41+
},
42+
]
2143
}
2244
];
2345

0 commit comments

Comments
 (0)