SEO updates:
-titles, meta description json ld -piwik calls -sitemap.xml -robots.txt -add error page
This commit is contained in:
parent
4489034cc9
commit
586ead8b87
11
angular.json
11
angular.json
|
@ -17,7 +17,9 @@
|
|||
"tsConfig": "src/tsconfig.app.json",
|
||||
"polyfills": "src/polyfills.ts",
|
||||
"assets": [
|
||||
"src/assets"
|
||||
"src/assets",
|
||||
"src/robots.txt",
|
||||
"src/sitemap.xml"
|
||||
],
|
||||
"styles": [
|
||||
"src/styles.css",
|
||||
|
@ -49,6 +51,10 @@
|
|||
{
|
||||
"replace": "src/index.html",
|
||||
"with": "src/index.prod.html"
|
||||
},
|
||||
{
|
||||
"replace": "src/robots.txt",
|
||||
"with": "src/robots.prod.txt"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -112,7 +118,8 @@
|
|||
],
|
||||
"assets": [
|
||||
"src/assets",
|
||||
"src/robots.txt"
|
||||
"src/robots.txt",
|
||||
"src/sitemap.xml"
|
||||
]
|
||||
}
|
||||
},
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
<div class="about">
|
||||
<schema2jsonld [URL]="properties.domain"
|
||||
[logoURL]="properties.domain + '/assets/common-assets/logo-small-usage-counts.png'"
|
||||
type="other" [description]="description" [name]="title">
|
||||
</schema2jsonld>
|
||||
<div class="uk-container uk-container-large about-background">
|
||||
<div class="uk-container uk-section uk-section-small uk-visible@l">
|
||||
<h2 class="uk-text-bold">About</h2>
|
||||
|
|
|
@ -1,7 +1,12 @@
|
|||
import {AfterViewChecked, Component, OnInit} from '@angular/core';
|
||||
import {Component, OnInit} from '@angular/core';
|
||||
import {faqs} from './faqs';
|
||||
import {ActivatedRoute} from '@angular/router';
|
||||
import {Title} from '@angular/platform-browser';
|
||||
import {ActivatedRoute, Router} from '@angular/router';
|
||||
import {Meta, Title} from '@angular/platform-browser';
|
||||
import {EnvProperties} from '../openaireLibrary/utils/properties/env-properties';
|
||||
import {properties} from '../../environments/environment';
|
||||
import {Subscription} from 'rxjs';
|
||||
import {PiwikService} from '../openaireLibrary/utils/piwik/piwik.service';
|
||||
import {SEOService} from '../openaireLibrary/sharedComponents/SEO/SEO.service';
|
||||
|
||||
@Component({
|
||||
selector: 'about',
|
||||
|
@ -10,18 +15,33 @@ import {Title} from '@angular/platform-browser';
|
|||
})
|
||||
export class AboutComponent implements OnInit {
|
||||
faqs: any[] = faqs;
|
||||
|
||||
constructor(private title: Title,
|
||||
private route: ActivatedRoute) {
|
||||
properties: EnvProperties = properties;
|
||||
description = "UsageCounts service is an OpenAIRE service built after the development of the Usage Statistics Service within OpenAIRE. UsageCounts forms metrics of usage activity of Open Access Repositories categorizing the data retrieved by country, number of downloads, number of views, number of repositories and all derivative quantitative open metrics, in a comprehensive way for all stakeholders. Architecture. ";
|
||||
title = "OpenAIRE - UsageCounts | About";
|
||||
subs: Subscription[] = [];
|
||||
constructor(private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private _title: Title, private _piwikService: PiwikService,
|
||||
private _meta: Meta, private seoService: SEOService) {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.title.setTitle('OpenAIRE - UsageCounts | About');
|
||||
this.route.fragment.subscribe(fragment => {
|
||||
this._title.setTitle(this.title);
|
||||
this._meta.updateTag({content: this.description}, "name='description'");
|
||||
this._meta.updateTag({content: this.description}, "property='og:description'");
|
||||
this._meta.updateTag({content: this.title}, "property='og:title'");
|
||||
this._title.setTitle(this.title);
|
||||
let url = this.properties.domain + this.properties.baseLink + this.router.url;
|
||||
this.seoService.createLinkForCanonicalURL(url, false);
|
||||
this._meta.updateTag({content: url}, "property='og:url'");
|
||||
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
|
||||
this.subs.push(this._piwikService.trackView(this.properties, this.title).subscribe());
|
||||
}
|
||||
this.subs.push(this.route.fragment.subscribe(fragment => {
|
||||
setTimeout(() => {
|
||||
this.goTo(fragment);
|
||||
}, 100);
|
||||
});
|
||||
}));
|
||||
}
|
||||
|
||||
goTo(id: string) {
|
||||
|
@ -32,4 +52,9 @@ export class AboutComponent implements OnInit {
|
|||
window.scrollTo({top: y, behavior: 'smooth'});
|
||||
}
|
||||
}
|
||||
public ngOnDestroy() {
|
||||
for (let sub of this.subs) {
|
||||
sub.unsubscribe();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@ import {CommonModule} from "@angular/common";
|
|||
import {RouterModule} from "@angular/router";
|
||||
|
||||
import {AboutComponent} from "./about.component";
|
||||
import {Schema2jsonldModule} from '../openaireLibrary/sharedComponents/schema2jsonld/schema2jsonld.module';
|
||||
import {IconsModule} from '../openaireLibrary/utils/icons/icons.module';
|
||||
import {IconsService} from '../openaireLibrary/utils/icons/icons.service';
|
||||
import {arrow_down} from '../openaireLibrary/utils/icons/icons';
|
||||
|
@ -13,6 +14,7 @@ import {arrow_down} from '../openaireLibrary/utils/icons/icons';
|
|||
RouterModule.forChild([{
|
||||
path: '', component: AboutComponent
|
||||
}]),
|
||||
Schema2jsonldModule,
|
||||
IconsModule
|
||||
],
|
||||
declarations: [AboutComponent],
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
<div class="analytics">
|
||||
<schema2jsonld [URL]="properties.domain"
|
||||
[logoURL]="properties.domain + '/assets/common-assets/logo-small-usage-counts.png'"
|
||||
type="other" [description]="description" [name]="title">
|
||||
</schema2jsonld>
|
||||
<div *ngIf="countryFb" class="uk-container uk-text-center countries">
|
||||
<a class="uk-visible@l next uk-flex uk-flex-middle uk-text-uppercase" (click)="goTo('graph-analysis')">
|
||||
Graph Analysis
|
||||
|
|
|
@ -1,14 +1,18 @@
|
|||
import {Component, ElementRef, OnInit, ViewChild} from '@angular/core';
|
||||
import {CountryUsageStat, UsageStat} from '../entities/usage-stat';
|
||||
import {FormControl, FormGroup} from '@angular/forms';
|
||||
import {Observable} from 'rxjs';
|
||||
import {Observable, Subscription} from 'rxjs';
|
||||
import {UsageStatsService} from '../services/usage-stats.service';
|
||||
import {map, startWith} from 'rxjs/operators';
|
||||
import {countries} from '../services/countries';
|
||||
import {DomSanitizer, SafeUrl, Title} from '@angular/platform-browser';
|
||||
import {DomSanitizer, Meta, SafeUrl, Title} from '@angular/platform-browser';
|
||||
import {StringUtils} from '../openaireLibrary/utils/string-utils.class';
|
||||
import {ActivatedRoute} from '@angular/router';
|
||||
import {ActivatedRoute, Router} from '@angular/router';
|
||||
import {NumberUtils} from '../openaireLibrary/utils/number-utils.class';
|
||||
import {EnvProperties} from '../openaireLibrary/utils/properties/env-properties';
|
||||
import {properties} from '../../environments/environment';
|
||||
import {PiwikService} from '../openaireLibrary/utils/piwik/piwik.service';
|
||||
import {SEOService} from '../openaireLibrary/sharedComponents/SEO/SEO.service';
|
||||
|
||||
@Component({
|
||||
selector: 'analytics',
|
||||
|
@ -28,20 +32,35 @@ export class AnalyticsComponent implements OnInit {
|
|||
public years = 0;
|
||||
public charts: SafeUrl[];
|
||||
@ViewChild('input') input: ElementRef;
|
||||
|
||||
properties: EnvProperties = properties;
|
||||
description = "Track Countries Usage Activity. Worldwide Monthly Usage Events, Monthly Views & Downloads.";
|
||||
title = "OpenAIRE - UsageCounts | Analytics";
|
||||
subs: Subscription[] = [];
|
||||
constructor(private usageStatsService: UsageStatsService,
|
||||
private route: ActivatedRoute,
|
||||
private title: Title,
|
||||
private router: Router,
|
||||
private _title: Title, private _piwikService: PiwikService,
|
||||
private _meta: Meta, private seoService: SEOService,
|
||||
private sanitizer: DomSanitizer) {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.title.setTitle('OpenAIRE - UsageCounts | Analytics');
|
||||
this.route.fragment.subscribe(fragment => {
|
||||
this._title.setTitle(this.title);
|
||||
this._meta.updateTag({content: this.description}, "name='description'");
|
||||
this._meta.updateTag({content: this.description}, "property='og:description'");
|
||||
this._meta.updateTag({content: this.title}, "property='og:title'");
|
||||
this._title.setTitle(this.title);
|
||||
let url = this.properties.domain + this.properties.baseLink + this.router.url;
|
||||
this.seoService.createLinkForCanonicalURL(url, false);
|
||||
this._meta.updateTag({content: url}, "property='og:url'");
|
||||
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
|
||||
this.subs.push(this._piwikService.trackView(this.properties, this.title).subscribe());
|
||||
}
|
||||
this.subs.push(this.route.fragment.subscribe(fragment => {
|
||||
setTimeout(() => {
|
||||
this.goTo(fragment);
|
||||
}, 100);
|
||||
});
|
||||
}));
|
||||
this.init();
|
||||
this.search();
|
||||
for(let i = 0; i < 3; i++) {
|
||||
|
@ -184,4 +203,9 @@ export class AnalyticsComponent implements OnInit {
|
|||
public getSafeUrl(url: string): SafeUrl {
|
||||
return this.sanitizer.bypassSecurityTrustResourceUrl(url);
|
||||
}
|
||||
public ngOnDestroy() {
|
||||
for (let sub of this.subs) {
|
||||
sub.unsubscribe();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@ import {MatAutocompleteModule} from '@angular/material/autocomplete';
|
|||
import {ReactiveFormsModule} from '@angular/forms';
|
||||
import {MatFormFieldModule} from '@angular/material/form-field';
|
||||
import {MatInputModule} from '@angular/material/input';
|
||||
import {Schema2jsonldModule} from '../openaireLibrary/sharedComponents/schema2jsonld/schema2jsonld.module';
|
||||
import {IconsModule} from '../openaireLibrary/utils/icons/icons.module';
|
||||
import {IconsService} from '../openaireLibrary/utils/icons/icons.service';
|
||||
import {arrow_down, arrow_right} from '../openaireLibrary/utils/icons/icons';
|
||||
|
@ -21,6 +22,7 @@ import {arrow_down, arrow_right} from '../openaireLibrary/utils/icons/icons';
|
|||
RouterModule.forChild([{
|
||||
path: '', component: AnalyticsComponent
|
||||
}]),
|
||||
Schema2jsonldModule,
|
||||
IconsModule
|
||||
],
|
||||
declarations: [AnalyticsComponent],
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
<navbar *ngIf= "showMenu && header" [header]="header" portal="usage-counts" [onlyTop]="false" [userMenu]="false" [showLogo]="!isHome"
|
||||
[user]="user" [userMenuItems]=userMenuItems [menuItems]=menuItems [properties]=properties></navbar>
|
||||
<schema2jsonld [URL]="properties.domain"
|
||||
[logoURL]="properties.domain + '/assets/common-assets/logo-small-usage-counts.png'"
|
||||
type="home" description=" UsageCounts service collects usage data from repositories, journals and other scientific data sources, aggregates them and delivers standardized activity reports about research usage and uptake. It complements existing citation mechanisms and assists institutional repository managers, research communities, research organizations, funders and policy makers track and evaluate research from an early stage. "
|
||||
name="OpenAIRE - UsageCounts" [searchAction]="false" [searchActionRoute]=null>
|
||||
</schema2jsonld>
|
||||
<div class="custom-main-content">
|
||||
<main [class.full-height]="isHome">
|
||||
<router-outlet></router-outlet>
|
||||
|
|
|
@ -9,6 +9,10 @@ import {AppComponent} from "./app.component";
|
|||
import {NgModule} from "@angular/core";
|
||||
import {EnvironmentSpecificService} from "./openaireLibrary/utils/properties/environment-specific.service";
|
||||
import {BottomModule} from './openaireLibrary/sharedComponents/bottom.module';
|
||||
import {Schema2jsonldModule} from './openaireLibrary/sharedComponents/schema2jsonld/schema2jsonld.module';
|
||||
import {ErrorModule} from './openaireLibrary/error/error.module';
|
||||
import {PreviousRouteRecorder} from './openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||||
import {PiwikService} from './openaireLibrary/utils/piwik/piwik.service';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
|
@ -20,12 +24,14 @@ import {BottomModule} from './openaireLibrary/sharedComponents/bottom.module';
|
|||
CookieLawModule,
|
||||
SafeHtmlPipeModule,
|
||||
BrowserAnimationsModule,
|
||||
BottomModule
|
||||
BottomModule,
|
||||
Schema2jsonldModule,
|
||||
ErrorModule
|
||||
],
|
||||
declarations: [
|
||||
AppComponent,
|
||||
],
|
||||
providers: [EnvironmentSpecificService],
|
||||
providers: [EnvironmentSpecificService, PreviousRouteRecorder, PiwikService],
|
||||
bootstrap: [ AppComponent ]
|
||||
})
|
||||
export class AppModule { }
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
import {NgModule} from '@angular/core';
|
||||
import {Routes, RouterModule, PreloadAllModules} from '@angular/router';
|
||||
import {PreviousRouteRecorder} from './openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||||
import {ErrorPageComponent} from './openaireLibrary/error/errorPage.component';
|
||||
|
||||
const appRoutes: Routes = [
|
||||
{
|
||||
|
@ -7,28 +9,35 @@ const appRoutes: Routes = [
|
|||
loadChildren: './home/home.module#HomeModule',
|
||||
data: {
|
||||
isHome: true
|
||||
}
|
||||
},
|
||||
canDeactivate: [PreviousRouteRecorder]
|
||||
},
|
||||
{
|
||||
path: 'resources',
|
||||
loadChildren: './resources/resources.module#ResourcesModule'
|
||||
loadChildren: './resources/resources.module#ResourcesModule',
|
||||
canDeactivate: [PreviousRouteRecorder]
|
||||
},
|
||||
{
|
||||
path: 'analytics',
|
||||
loadChildren: './analytics/analytics.module#AnalyticsModule'
|
||||
loadChildren: './analytics/analytics.module#AnalyticsModule',
|
||||
canDeactivate: [PreviousRouteRecorder]
|
||||
},
|
||||
{
|
||||
path: 'contact',
|
||||
loadChildren: './contact/contact.module#ContactModule'
|
||||
loadChildren: './contact/contact.module#ContactModule',
|
||||
canDeactivate: [PreviousRouteRecorder]
|
||||
},
|
||||
{
|
||||
path: 'about',
|
||||
loadChildren: './about/about.module#AboutModule'
|
||||
loadChildren: './about/about.module#AboutModule',
|
||||
canDeactivate: [PreviousRouteRecorder]
|
||||
},
|
||||
{
|
||||
path: 'sushilite/:id',
|
||||
loadChildren: './sushilite/sushilite.module#SushiliteModule'
|
||||
}
|
||||
loadChildren: './sushilite/sushilite.module#SushiliteModule',
|
||||
canDeactivate: [PreviousRouteRecorder]
|
||||
},
|
||||
{ path: '**',pathMatch: 'full',component: ErrorPageComponent}
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
<div class="uk-section uk-section-small uk-container uk-container-large contact">
|
||||
<schema2jsonld [URL]="properties.domain"
|
||||
[logoURL]="properties.domain + '/assets/common-assets/logo-small-usage-counts.png'"
|
||||
type="other" [description]="description" [name]="title">
|
||||
</schema2jsonld>
|
||||
<div class="uk-container">
|
||||
<h2 class="uk-text-bold">Contact Us</h2>
|
||||
<div class="uk-grid uk-flex uk-flex-bottom" uk-grid>
|
||||
|
|
|
@ -4,10 +4,13 @@ import {EmailService} from '../openaireLibrary/utils/email/email.service';
|
|||
import {Email} from '../openaireLibrary/utils/email/email';
|
||||
import {EnvProperties} from '../openaireLibrary/utils/properties/env-properties';
|
||||
import {Composer} from '../openaireLibrary/utils/email/composer';
|
||||
import {Title} from '@angular/platform-browser';
|
||||
import {Meta, Title} from '@angular/platform-browser';
|
||||
import {HelperFunctions} from '../openaireLibrary/utils/HelperFunctions.class';
|
||||
import {FormBuilder, FormGroup, Validators} from '@angular/forms';
|
||||
import {properties} from '../../environments/environment';
|
||||
import {Subscription} from 'rxjs';
|
||||
import {PiwikService} from '../openaireLibrary/utils/piwik/piwik.service';
|
||||
import {SEOService} from '../openaireLibrary/sharedComponents/SEO/SEO.service';
|
||||
|
||||
@Component({
|
||||
selector: 'contact',
|
||||
|
@ -24,20 +27,36 @@ export class ContactComponent implements OnInit {
|
|||
public contactForm: FormGroup;
|
||||
@ViewChild('AlertModal') modal;
|
||||
@ViewChild('recaptcha') recaptcha;
|
||||
|
||||
description = "Any questions? Contact us ";
|
||||
title = "OpenAIRE - UsageCounts | Contact Us";
|
||||
subs: Subscription[] = [];
|
||||
constructor(private router: Router,
|
||||
private emailService: EmailService,
|
||||
private title: Title,
|
||||
private _title: Title, private _piwikService: PiwikService,
|
||||
private _meta: Meta, private seoService: SEOService,
|
||||
private fb: FormBuilder) {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.title.setTitle('OpenAIRE - UsageCounts | Contact Us');
|
||||
this.email = {body: '', subject: '', recipients: []};
|
||||
this._title.setTitle(this.title);
|
||||
this._meta.updateTag({content: this.description}, "name='description'");
|
||||
this._meta.updateTag({content: this.description}, "property='og:description'");
|
||||
this._meta.updateTag({content: this.title}, "property='og:title'");
|
||||
this._title.setTitle(this.title);
|
||||
let url = this.properties.domain + this.properties.baseLink + this.router.url;
|
||||
this.seoService.createLinkForCanonicalURL(url, false);
|
||||
this._meta.updateTag({content: url}, "property='og:url'");
|
||||
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
|
||||
this.subs.push(this._piwikService.trackView(this.properties, this.title).subscribe());
|
||||
} this.email = {body: '', subject: '', recipients: []};
|
||||
this.reset();
|
||||
this.showLoading = false;
|
||||
}
|
||||
|
||||
public ngOnDestroy() {
|
||||
for (let sub of this.subs) {
|
||||
sub.unsubscribe();
|
||||
}
|
||||
}
|
||||
public send(event) {
|
||||
HelperFunctions.scroll();
|
||||
if (event.valid === true) {
|
||||
|
@ -61,7 +80,7 @@ export class ContactComponent implements OnInit {
|
|||
|
||||
private sendMail(admins: any) {
|
||||
this.showLoading = true;
|
||||
this.emailService.contact(this.properties,
|
||||
this.subs.push(this.emailService.contact(this.properties,
|
||||
Composer.composeEmailForUsageCounts(this.contactForm.value, admins),
|
||||
this.contactForm.value.recaptcha).subscribe(
|
||||
res => {
|
||||
|
@ -79,7 +98,7 @@ export class ContactComponent implements OnInit {
|
|||
this.showLoading = false;
|
||||
this.contactForm.get('recaptcha').setValue('');
|
||||
}
|
||||
);
|
||||
));
|
||||
}
|
||||
|
||||
public modalOpen() {
|
||||
|
|
|
@ -1,7 +1,12 @@
|
|||
import {Component, OnInit, ViewChild} from '@angular/core';
|
||||
import {ActivatedRoute, Router} from '@angular/router';
|
||||
import {Title} from '@angular/platform-browser';
|
||||
import {Meta, Title} from '@angular/platform-browser';
|
||||
import {FullPageSliderComponent} from '../openaireLibrary/utils/full-page-slider/full-page-slider.component';
|
||||
import {EnvProperties} from '../openaireLibrary/utils/properties/env-properties';
|
||||
import {Subscription} from 'rxjs';
|
||||
import {properties} from '../../environments/environment';
|
||||
import {PiwikService} from '../openaireLibrary/utils/piwik/piwik.service';
|
||||
import {SEOService} from '../openaireLibrary/sharedComponents/SEO/SEO.service';
|
||||
|
||||
@Component({
|
||||
selector: 'home',
|
||||
|
@ -14,27 +19,50 @@ export class HomeComponent implements OnInit{
|
|||
public fragments: string[] = ['', 'why', 'who', 'features'];
|
||||
@ViewChild("slider")
|
||||
public slider: FullPageSliderComponent;
|
||||
properties: EnvProperties = properties;
|
||||
|
||||
subs: Subscription[] = [];
|
||||
constructor(private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private title: Title) {}
|
||||
private _title: Title, private _piwikService: PiwikService,
|
||||
private _meta: Meta, private seoService: SEOService
|
||||
) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.title.setTitle('OpenAIRE - UsageCounts');
|
||||
this.route.fragment.subscribe(name => {
|
||||
ngOnInit()
|
||||
{
|
||||
let description = "UsageCounts service collects usage data from repositories, journals and other scientific data sources, aggregates them and delivers standardized activity reports about research usage and uptake. It complements existing citation mechanisms and assists institutional repository managers, research communities, research organizations, funders and policy makers track and evaluate research from an early stage.";
|
||||
let title = "OpenAIRE - UsageCounts";
|
||||
this._title.setTitle(title);
|
||||
this._meta.updateTag({content: description}, "name='description'");
|
||||
this._meta.updateTag({content: description}, "property='og:description'");
|
||||
this._meta.updateTag({content: title}, "property='og:title'");
|
||||
this._title.setTitle(title);
|
||||
let url = this.properties.domain + this.properties.baseLink + this.router.url;
|
||||
this.seoService.createLinkForCanonicalURL(url, false);
|
||||
this._meta.updateTag({content: url}, "property='og:url'");
|
||||
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
|
||||
this.subs.push(this._piwikService.trackView(this.properties, title).subscribe());
|
||||
}
|
||||
this.subs.push(this.route.fragment.subscribe(name => {
|
||||
if(name) {
|
||||
let slide = this.fragments.findIndex(fragment => fragment === name) + 1;
|
||||
if(slide > 0) {
|
||||
this.initSlide = slide;
|
||||
}
|
||||
}
|
||||
});
|
||||
this.slider.stateAsObservable.subscribe(state => {
|
||||
}));
|
||||
this.subs.push(this.slider.stateAsObservable.subscribe(state => {
|
||||
if(state == 1) {
|
||||
this.router.navigate(['/']);
|
||||
} else {
|
||||
this.router.navigate(['/'], {fragment: this.fragments[state - 1]});
|
||||
}
|
||||
});
|
||||
}));
|
||||
}
|
||||
public ngOnDestroy() {
|
||||
for (let sub of this.subs) {
|
||||
sub.unsubscribe();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
<div class="resources">
|
||||
<schema2jsonld [URL]="properties.domain"
|
||||
[logoURL]="properties.domain + '/assets/common-assets/logo-small-usage-counts.png'"
|
||||
type="other" [description]="description" [name]="title">
|
||||
</schema2jsonld>
|
||||
<div class="uk-container uk-container-large provide-background">
|
||||
<div class="uk-container uk-section uk-section-small uk-padding-remove-bottom">
|
||||
<h2 class="uk-margin-remove-vertical">OpenAIRE Provide</h2>
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
import {AfterViewChecked, Component, OnInit} from '@angular/core';
|
||||
import {Title} from '@angular/platform-browser';
|
||||
import {ActivatedRoute} from '@angular/router';
|
||||
import { Component, OnInit} from '@angular/core';
|
||||
import {Meta, Title} from '@angular/platform-browser';
|
||||
import {ActivatedRoute, Router} from '@angular/router';
|
||||
import {EnvProperties} from '../openaireLibrary/utils/properties/env-properties';
|
||||
import {properties} from '../../environments/environment';
|
||||
import {Subscription} from 'rxjs';
|
||||
import {PiwikService} from '../openaireLibrary/utils/piwik/piwik.service';
|
||||
import {SEOService} from '../openaireLibrary/sharedComponents/SEO/SEO.service';
|
||||
|
||||
@Component({
|
||||
selector: 'resources',
|
||||
|
@ -8,18 +13,33 @@ import {ActivatedRoute} from '@angular/router';
|
|||
styleUrls: ['resources.component.css'],
|
||||
})
|
||||
export class ResourcesComponent implements OnInit {
|
||||
|
||||
constructor(private title: Title,
|
||||
properties: EnvProperties = properties;
|
||||
description = "OpenAIRE Provide. The resources of the OpenAIRE UsageCounts Service are available through the OpenAIRE PROVIDE product, which is serving the content providers. APIs and Reports.";
|
||||
title = "OpenAIRE - UsageCounts | Resources";
|
||||
subs: Subscription[] = [];
|
||||
constructor(private router: Router,
|
||||
private _title: Title, private _piwikService: PiwikService,
|
||||
private _meta: Meta, private seoService: SEOService,
|
||||
private route: ActivatedRoute) {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.title.setTitle('OpenAIRE - UsageCounts | Resources');
|
||||
this.route.fragment.subscribe(fragment => {
|
||||
this._title.setTitle(this.title);
|
||||
this._meta.updateTag({content: this.description}, "name='description'");
|
||||
this._meta.updateTag({content: this.description}, "property='og:description'");
|
||||
this._meta.updateTag({content: this.title}, "property='og:title'");
|
||||
this._title.setTitle(this.title);
|
||||
let url = this.properties.domain + this.properties.baseLink + this.router.url;
|
||||
this.seoService.createLinkForCanonicalURL(url, false);
|
||||
this._meta.updateTag({content: url}, "property='og:url'");
|
||||
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
|
||||
this.subs.push(this._piwikService.trackView(this.properties, this.title).subscribe());
|
||||
}
|
||||
this.subs.push(this.route.fragment.subscribe(fragment => {
|
||||
setTimeout(() => {
|
||||
this.goTo(fragment);
|
||||
}, 100);
|
||||
});
|
||||
}));
|
||||
}
|
||||
|
||||
goTo(id: string) {
|
||||
|
@ -30,4 +50,9 @@ export class ResourcesComponent implements OnInit {
|
|||
window.scrollTo({top: y, behavior: 'smooth'});
|
||||
}
|
||||
}
|
||||
public ngOnDestroy() {
|
||||
for (let sub of this.subs) {
|
||||
sub.unsubscribe();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@ import {CommonModule} from "@angular/common";
|
|||
import {RouterModule} from "@angular/router";
|
||||
|
||||
import {ResourcesComponent} from "./resources.component";
|
||||
import {Schema2jsonldModule} from '../openaireLibrary/sharedComponents/schema2jsonld/schema2jsonld.module';
|
||||
import {IconsService} from '../openaireLibrary/utils/icons/icons.service';
|
||||
import {arrow_down, arrow_right} from '../openaireLibrary/utils/icons/icons';
|
||||
import {IconsModule} from '../openaireLibrary/utils/icons/icons.module';
|
||||
|
@ -13,6 +14,7 @@ import {IconsModule} from '../openaireLibrary/utils/icons/icons.module';
|
|||
RouterModule.forChild([{
|
||||
path: '', component: ResourcesComponent
|
||||
}]),
|
||||
Schema2jsonldModule,
|
||||
IconsModule
|
||||
],
|
||||
declarations: [ResourcesComponent],
|
||||
|
|
|
@ -4,6 +4,11 @@ export let properties: EnvProperties = {
|
|||
environment: 'beta',
|
||||
useCache: true,
|
||||
useLongCache: true,
|
||||
domain : "https://usagecounts.openaire.eu",
|
||||
baseLink: "",
|
||||
enablePiwikTrack: true,
|
||||
piwikBaseUrl: "https://analytics.openaire.eu/piwik.php?idsite=",
|
||||
piwikSiteId: "",
|
||||
metricsAPIURL: 'https://beta.services.openaire.eu/usagestats/',
|
||||
loginUrl: "https://beta.services.openaire.eu/admin-user-management/openid_connect_login",
|
||||
userInfoUrl: "https://beta.services.openaire.eu/uoa-user-management/api/users/getUserInfo?accessToken=",
|
||||
|
|
|
@ -4,6 +4,11 @@ export let properties: EnvProperties = {
|
|||
environment:"production",
|
||||
useCache: true,
|
||||
useLongCache: true,
|
||||
domain : "https://usagecounts.openaire.eu",
|
||||
baseLink: "",
|
||||
enablePiwikTrack: true,
|
||||
piwikBaseUrl: "https://analytics.openaire.eu/piwik.php?idsite=",
|
||||
piwikSiteId: "",
|
||||
metricsAPIURL: "https://services.openaire.eu/usagestats/",
|
||||
loginUrl:"https://services.openaire.eu/admin-user-management/openid_connect_login",
|
||||
userInfoUrl: " https://services.openaire.eu/uoa-user-management/api/users/getUserInfo?accessToken=",
|
||||
|
|
|
@ -9,6 +9,11 @@ export let properties: EnvProperties = {
|
|||
environment: 'development',
|
||||
useCache: false,
|
||||
useLongCache: true,
|
||||
domain : "https://usagecounts.openaire.eu",
|
||||
baseLink: "",
|
||||
enablePiwikTrack: false,
|
||||
piwikBaseUrl: "https://analytics.openaire.eu/piwik.php?idsite=",
|
||||
piwikSiteId: "",
|
||||
metricsAPIURL: 'https://services.openaire.eu/usagestats/',
|
||||
loginUrl: 'http://dl170.madgik.di.uoa.gr:8180/dnet-login/openid_connect_login',
|
||||
userInfoUrl: 'http://dl170.madgik.di.uoa.gr:8180/dnet-openaire-users-1.0.0-SNAPSHOT/api/users/getUserInfo?accessToken=',
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
<base href="/">
|
||||
<title>OpenAIRE - UsageCounts</title>
|
||||
<meta charset="UTF-8">
|
||||
<link href="assets/common-assets/logo-small-usage-counts.png">
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="assets/common-assets/logo/apple-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="assets/common-assets/logo/apple-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="assets/common-assets/logo/apple-icon-72x72.png">
|
||||
|
@ -22,7 +23,6 @@
|
|||
<link rel="icon" type="image/png" sizes="16x16" href="assets/common-assets/logo/favicon-16x16.png">
|
||||
<link href="assets/common-assets/logo/favicon.ico" rel="shortcut icon" type="image/vnd.microsoft.icon"/>
|
||||
<meta name="robots" content="noindex">
|
||||
<script src="https://cdn.ckeditor.com/4.5.11/full-all/ckeditor.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<app></app>
|
||||
|
|
|
@ -5,8 +5,9 @@
|
|||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<base href="/">
|
||||
<title>OpenAIRE - UsageCounts</title>
|
||||
<title>OpenAIRE - Research Graph</title>
|
||||
<meta charset="UTF-8">
|
||||
<link href="assets/common-assets/logo-small-usage-counts.png">
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="assets/common-assets/logo/apple-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="assets/common-assets/logo/apple-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="assets/common-assets/logo/apple-icon-72x72.png">
|
||||
|
@ -21,7 +22,6 @@
|
|||
<link rel="icon" type="image/png" sizes="96x96" href="assets/common-assets/logo/favicon-96x96.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="assets/common-assets/logo/favicon-16x16.png">
|
||||
<link href="assets/common-assets/logo/favicon.ico" rel="shortcut icon" type="image/vnd.microsoft.icon"/>
|
||||
<script src="https://cdn.ckeditor.com/4.5.11/full-all/ckeditor.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<app></app>
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
User-Agent: *
|
||||
Crawl-delay: 30
|
||||
|
||||
sitemap: https://usagecounts.openaire.eu/sitemap.xml
|
|
@ -0,0 +1,2 @@
|
|||
sitemap.xmlUser-Agent: *
|
||||
Disallow: /
|
|
@ -0,0 +1,15 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
|
||||
<url>
|
||||
<loc><![CDATA[https://usagecounts.openaire.eu]]></loc>
|
||||
</url>
|
||||
<url>
|
||||
<loc><![CDATA[https://usagecounts.openaire.eu/about]]></loc>
|
||||
</url>
|
||||
<url>
|
||||
<loc><![CDATA[https://usagecounts.openaire.eu/resources]]></loc>
|
||||
</url>
|
||||
<url>
|
||||
<loc><![CDATA[https://usagecounts.openaire.eu/analytics]]></loc>
|
||||
</url>
|
||||
</urlset>
|
Loading…
Reference in New Issue