mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-16 15:40:11 +01:00
fix(pages): fix titles and descriptions
This commit is contained in:
parent
ef1421ee80
commit
cca53006f4
11 changed files with 59 additions and 18 deletions
|
|
@ -36,7 +36,7 @@
|
|||
</a>
|
||||
</li>
|
||||
<li class="copy">
|
||||
© 2015-2018 <a href="https://hubs.ly/H0n52JD0" target="_blank">Akveo LLC</a><br>
|
||||
© 2015-{{currentYear}} <a href="https://hubs.ly/H0n52JD0" target="_blank">Akveo LLC</a><br>
|
||||
Documentation licensed under CC BY 4.0.
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
|||
|
|
@ -12,4 +12,7 @@ import { Component } from '@angular/core';
|
|||
templateUrl: './footer.component.html',
|
||||
})
|
||||
export class NgxLandingFooterComponent {
|
||||
get currentYear() {
|
||||
return new Date().getFullYear();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 },
|
||||
],
|
||||
|
|
|
|||
|
|
@ -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,11 @@ 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('Use ngx-admin to bootstrap the development of your product and' +
|
||||
' provide an ecosystem for building production-ready apps or prototypes. Free and Open Source!');
|
||||
|
||||
this.themeService.changeTheme('docs-page');
|
||||
this.paginationService.setPaginationItems('/docs');
|
||||
|
|
|
|||
|
|
@ -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('The most popular admin dashboard based on Angular 9+ and Nebular.');
|
||||
this.themeService.changeTheme('ngx-landing');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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">
|
||||
|
|
|
|||
|
|
@ -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('New Material theme of ngx-admin dashboard template based on Angular 9+');
|
||||
this.themeService.changeTheme('ngx-landing-material');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>ngx-admin: Free Open Source admin dashboard template based on Angular, Bootstrap</title>
|
||||
<title>The most popular admin dashboard based on Angular 9+ and Nebular.</title>
|
||||
|
||||
<meta name="description" content="Get Free Open Source admin dashboard template, based on Angular, Bootstrap and Nebular. ngx-admin includes 4 responsive themes, 30+ UI components with 60+ examples.">
|
||||
<meta name="description" content="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.">
|
||||
<meta name="keywords" content="ngx-admin LP, admin panel template, admin dashboard, bootstrap templates, angular bootstrap, admin template, free dashboard emplates, angular dashboard, angular templates free, angular template admin, angular template admin free, create a template ngular, angular template builder, angular template download, angular template dashboard, angular ecommerce template, angular emplate free download, angular template github, angular template guide, angular ng-template, angular template in component, angular template theme, angular template ui, angular template website, angular template with bootstrap, angular template 2017, angular template 2018, angular 6 template free, angular 6 template free download, angular 6 template github, angular 6 template dmin, angular 6 template, angular 6 templates free download, open source template, open source responsive admin templates, admin anel template free download, angular admin panel template, dashboard templates, angular admin panel template github backend bundle net core entity framework rest api">
|
||||
|
||||
<base href="/">
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@ import { MockDataModule } from './mock/mock-data.module';
|
|||
import { AbService } from './utils/ab.service';
|
||||
import {CurrentThemeService} from './utils/theme.service';
|
||||
import {ThemeGuard} from './guard/theme.guard';
|
||||
import {MetadataService} from './utils/metadata.service';
|
||||
|
||||
const socialLinks = [
|
||||
{
|
||||
|
|
@ -153,6 +154,7 @@ export const NB_CORE_PROVIDERS = [
|
|||
LayoutService,
|
||||
PlayerService,
|
||||
SeoService,
|
||||
MetadataService,
|
||||
StateService,
|
||||
AbService,
|
||||
CurrentThemeService,
|
||||
|
|
|
|||
21
src/app/@core/utils/metadata.service.ts
Normal file
21
src/app/@core/utils/metadata.service.ts
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
import {Injectable} from '@angular/core';
|
||||
import {Meta, Title} from '@angular/platform-browser';
|
||||
|
||||
@Injectable()
|
||||
export class MetadataService {
|
||||
|
||||
constructor(
|
||||
private title: Title,
|
||||
private meta: Meta,
|
||||
) {}
|
||||
|
||||
updateTitle(title: string) {
|
||||
this.title.setTitle(title);
|
||||
}
|
||||
|
||||
updateDescription(desc: string) {
|
||||
this.meta.updateTag({ name: 'description', content: desc });
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -37,8 +37,8 @@
|
|||
<span>291 <span class="caption">USD</span></span>
|
||||
</span>
|
||||
|
||||
<nb-select matRipple [(selected)]="type" class="type-select">
|
||||
<nb-option matRipple *ngFor="let t of types" [value]="t">{{ t }}</nb-option>
|
||||
<nb-select [(selected)]="type" class="type-select">
|
||||
<nb-option *ngFor="let t of types" [value]="t">{{ t }}</nb-option>
|
||||
</nb-select>
|
||||
</nb-card-header>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue