add meta data (#5641)

* fix(pages): fix titles and descriptions

* fix(pages): titles and discriptions

* fix(pages): tripple

* fix(pages): fix titles

* feat(app): add og logo
This commit is contained in:
Alex Kurbako 2020-04-04 16:30:03 +03:00 committed by GitHub
parent e4cfcd3123
commit 2a09d3bbb5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 112 additions and 30 deletions

View file

@ -36,7 +36,7 @@
</a>
</li>
<li class="copy">
&copy; 2015-2018 <a href="https://hubs.ly/H0n52JD0" target="_blank">Akveo LLC</a><br>
&copy; 2015-{{currentYear}} <a href="https://hubs.ly/H0n52JD0" target="_blank">Akveo LLC</a><br>
Documentation licensed under CC BY 4.0.
</li>
</ul>

View file

@ -12,4 +12,7 @@ import { Component } from '@angular/core';
templateUrl: './footer.component.html',
})
export class NgxLandingFooterComponent {
get currentYear() {
return new Date().getFullYear();
}
}

View file

@ -18,6 +18,7 @@ import { LandingSharedModule } from './shared/landing-shared.module';
import { DOCS, STRUCTURE } from './app.options';
const docs = require('../output.json');
import { structure } from '../structure';
import {MetadataService} from '../../src/app/@core/utils/metadata.service';
@NgModule({
declarations: [
@ -36,6 +37,7 @@ import { structure } from '../structure';
bootstrap: [AppComponent],
providers: [
Title,
MetadataService,
{ provide: STRUCTURE, useValue: structure },
{ provide: DOCS, useValue: docs },
],

View file

@ -4,18 +4,18 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*/
import { Component, OnDestroy } from '@angular/core';
import { Router } from '@angular/router';
import { takeWhile, withLatestFrom, map } from 'rxjs/operators';
import {Component, OnDestroy} from '@angular/core';
import {Router} from '@angular/router';
import {map, takeWhile, withLatestFrom} from 'rxjs/operators';
import {
NbThemeService,
NbMediaBreakpoint,
NbMenuItem,
NbSidebarService,
NbMediaBreakpoint,
} from '@nebular/theme';
NbThemeService} from '@nebular/theme';
import { NgxMenuService } from '../../@theme/services/menu.service';
import { NgxPaginationService } from '../../@theme/services/pagination.service';
import {NgxMenuService} from '../../@theme/services/menu.service';
import {NgxPaginationService} from '../../@theme/services/pagination.service';
import {MetadataService} from '../../../../src/app/@core/utils/metadata.service';
@Component({
selector: 'ngx-landing-docs',
@ -34,7 +34,12 @@ export class LandingDocsComponent implements OnDestroy {
private router: Router,
private themeService: NbThemeService,
private sidebarService: NbSidebarService,
private paginationService: NgxPaginationService) {
private paginationService: NgxPaginationService,
private metadataService: MetadataService) {
this.metadataService.updateDescription('Free and Open Source ngx-admin to bootstrap the development of ' +
'your product or to learn Angular. Over 40+ Angular Components and 60+ Usage Examples.');
this.metadataService.updateTitle('A front-end admin dashboard on Angular 9+, Bootstrap 4+ and Nebular.');
this.themeService.changeTheme('docs-page');
this.paginationService.setPaginationItems('/docs');

View file

@ -6,7 +6,6 @@
import { Component, Inject, NgZone, OnDestroy, OnInit } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { Title } from '@angular/platform-browser';
import {
filter,
map,
@ -21,6 +20,7 @@ import { fromEvent } from 'rxjs';
import { NgxStructureService } from '../../../@theme/services/structure.service';
import { NgxTocStateService } from '../../../@theme/services/toc-state.service';
import {MetadataService} from '../../../../../src/app/@core/utils/metadata.service';
@Component({
selector: 'ngx-admin-landing-page',
@ -38,7 +38,7 @@ export class NgxAdminLandingPageComponent implements OnDestroy, OnInit {
private activatedRoute: ActivatedRoute,
private structureService: NgxStructureService,
private tocState: NgxTocStateService,
private titleService: Title) {
private metaDataService: MetadataService) {
}
get showSettings() {
@ -63,7 +63,8 @@ export class NgxAdminLandingPageComponent implements OnDestroy, OnInit {
}),
filter(item => item),
tap((item: any) => {
this.titleService.setTitle(`Nebular - ${item.name}`);
this.metaDataService.updateTitle(`Nebular - ${item.name}`);
this.metaDataService.updateDescription(item.description);
}),
publishReplay(),
refCount(),

View file

@ -6,6 +6,7 @@
import { Component } from '@angular/core';
import { NbThemeService } from '@nebular/theme';
import {MetadataService} from '../../../../src/app/@core/utils/metadata.service';
@Component({
selector: 'ngx-landing-home',
@ -13,8 +14,10 @@ import { NbThemeService } from '@nebular/theme';
styleUrls: ['./landing-home.component.scss'],
})
export class LandingHomeComponent {
constructor(private themeService: NbThemeService) {
constructor(private themeService: NbThemeService, private metadataService: MetadataService) {
this.metadataService.updateDescription('Save more than $33,000 using ngx-admin for personal and commercial' +
' use. The dashboard is based on Angular 9+ and Bootstrap 4+. Completely FREE and MIT licensed.');
this.metadataService.updateTitle('Ngx-admin - most popular admin dashboard on Angular 9+ and Nebular.');
this.themeService.changeTheme('ngx-landing');
}
}

View file

@ -1,6 +1,8 @@
<nb-layout>
<nb-layout-header fixed>
<ngx-landing-header></ngx-landing-header>
<ngx-landing-header>
<ngx-material-theme-link></ngx-material-theme-link>
</ngx-landing-header>
</nb-layout-header>
<nb-layout-column class="main-section">

View file

@ -1,5 +1,6 @@
import { Component } from '@angular/core';
import { NbThemeService } from '@nebular/theme';
import {MetadataService} from '../../../../../src/app/@core/utils/metadata.service';
@Component({
selector: 'ngx-material-landing',
@ -10,7 +11,10 @@ import { NbThemeService } from '@nebular/theme';
],
})
export class MaterialLandingComponent {
constructor(private themeService: NbThemeService) {
constructor(private themeService: NbThemeService, private metadataService: MetadataService) {
this.metadataService.updateDescription('Ngx-admin material works perfectly with Angular Material and Nebular.' +
' Over 40+ Angular Components and 60+ Usage Examples.Take the best from both!');
this.metadataService.updateTitle('Ngx-admin material dashboard template based on Angular 9+ and Bootstrap 4+');
this.themeService.changeTheme('ngx-landing-material');
}
}