feat(demo): add landing page with docs (#1951)

This commit is contained in:
Dmitry Nehaychik 2018-12-26 15:17:57 +03:00 committed by Sergey Andrievskiy
parent 67c9587b87
commit 43cc3a1556
190 changed files with 15425 additions and 21 deletions

View file

@ -0,0 +1,40 @@
/**
* @license
* Copyright Akveo. All Rights Reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*/
import { ModuleWithProviders, NgModule, Optional, SkipSelf } from '@angular/core';
import { CommonModule } from '@angular/common';
import { throwIfAlreadyLoaded } from './module-import-guard';
import { DataModule } from './data/data.module';
const PIPES = [
];
const NB_CORE_PROVIDERS = [
...DataModule.forRoot().providers,
];
@NgModule({
imports: [
CommonModule,
],
exports: [...PIPES],
declarations: [...PIPES],
})
export class CoreModule {
constructor(@Optional() @SkipSelf() parentModule: CoreModule) {
throwIfAlreadyLoaded(parentModule, 'CoreModule');
}
static forRoot(): ModuleWithProviders {
return <ModuleWithProviders>{
ngModule: CoreModule,
providers: [
...NB_CORE_PROVIDERS,
],
};
}
}

View file

@ -0,0 +1,37 @@
/**
* @license
* Copyright Akveo. All Rights Reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*/
import { NgModule, ModuleWithProviders } from '@angular/core';
import { CommonModule } from '@angular/common';
import { HeaderMenuService } from './service/header-menu.service';
import { ReviewsService } from './service/reviews.service';
import { DescriptionsService } from './service/descriptions.service';
const SERVICES = [
HeaderMenuService,
ReviewsService,
DescriptionsService,
];
@NgModule({
imports: [
CommonModule,
],
providers: [
...SERVICES,
],
})
export class DataModule {
static forRoot(): ModuleWithProviders {
return <ModuleWithProviders>{
ngModule: DataModule,
providers: [
...SERVICES,
],
};
}
}

View file

@ -0,0 +1,41 @@
import { Injectable } from '@angular/core';
import { of as observableOf, Observable } from 'rxjs';
export class Descriptions {
icon: string;
title: string;
description: string;
}
@Injectable()
export class DescriptionsService {
/* tslint:disable:max-line-length */
private descriptions: Descriptions[] = [
{
icon: 'layout-outline',
title: 'Efficient',
description: 'Packed with a huge number of handcrafted UI components, charts, maps, editors, tables, and much more, so that developers can focus on business needs',
},
{
icon: 'smartphone-outline',
title: 'Mobile first',
description: 'Looks stunning on every screen size and is optimized to bring the large-screen experience from desktop to mobile',
},
{
icon: 'color-palette-outline',
title: 'Сustomizable',
description: 'With 3 themes, 2 dashboards, and outstanding UI architecture, its easy to change the themes and find the right fit for your company',
},
{
icon: 'heart-outline',
title: 'Updated and supported',
description: 'Continuous updates and fixes from the development team to keep your tech up to date. The friendly and active community support team are ready to guide you through your challenges',
},
];
/* tslint:enable:max-line-length */
getDescriptions(): Observable<Descriptions[]> {
return observableOf(this.descriptions);
}
}

View file

@ -0,0 +1,23 @@
import { Injectable } from '@angular/core';
import { of as observableOf, Observable } from 'rxjs';
import { NbMenuItem } from '@nebular/theme';
@Injectable()
export class HeaderMenuService {
private headerMenu: NbMenuItem[] = [
{
title: 'Home',
link: '/',
},
{
title: 'Docs',
link: '/docs',
},
];
getHeaderMenu(): Observable<NbMenuItem[]> {
return observableOf(this.headerMenu);
}
}

View file

@ -0,0 +1,72 @@
import { Injectable } from '@angular/core';
import { of as observableOf, Observable } from 'rxjs';
export class Review {
avatar: string;
firstName: string;
lastName: string;
socialIcon: string;
review: string;
link: string;
}
@Injectable()
export class ReviewsService {
/* tslint:disable:max-line-length */
private reviews: Review[] = [
{
avatar: 'assets/img/avatars/1.png',
firstName: 'Marcin',
lastName: 'Masiorski',
socialIcon: 'facebook',
review: 'Awesome template! You are doing great job! Regards.',
link: 'https://www.facebook.com/pg/akveo/reviews/?ref=page_internal',
},
{
avatar: 'assets/img/avatars/2.png',
firstName: 'Rashid',
lastName: 'Thompson',
socialIcon: 'facebook',
review: 'I just want to say you have the best admin template I have seen so far as a new developer (Trust me I have searched).',
link: 'https://www.facebook.com/pg/akveo/reviews/?ref=page_internal',
},
{
avatar: 'assets/img/avatars/3.png',
firstName: 'Yuriy',
lastName: 'Marshall',
socialIcon: 'facebook',
review: 'Thanks for free angular theme! Design and file/system structure is on high level! Love you, Akveo!)',
link: 'https://www.facebook.com/pg/akveo/reviews/?ref=page_internal',
},
{
avatar: 'assets/img/avatars/4.png',
firstName: 'Kenneth',
lastName: 'Reis',
socialIcon: 'facebook',
review: 'Nice people working hard for high quality projects. Love you guys!',
link: 'https://www.facebook.com/pg/akveo/reviews/?ref=page_internal',
},
{
avatar: 'assets/img/avatars/5.png',
firstName: 'Renato',
lastName: 'Oliveira Silva',
socialIcon: 'facebook',
review: 'Great company and great projects',
link: 'https://www.facebook.com/pg/akveo/reviews/?ref=page_internal',
},
{
avatar: 'assets/img/avatars/6.png',
firstName: 'Mohammed',
lastName: 'Benyakoub',
socialIcon: 'facebook',
review: 'That one of the best open source software - Product I have ever seen',
link: 'https://www.facebook.com/pg/akveo/reviews/?ref=page_internal',
},
];
/* tslint:enable:max-line-length */
getReviews(): Observable<Review[]> {
return observableOf(this.reviews);
}
}

View file

@ -0,0 +1,11 @@
/**
* @license
* Copyright Akveo. All Rights Reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*/
export function throwIfAlreadyLoaded(parentModule: any, moduleName: string) {
if (parentModule) {
throw new Error(`${moduleName} has already been loaded. Import Core modules in the AppModule only.`);
}
}