From 53903cbe1818d805379f2f3cfb764f38aa6895b6 Mon Sep 17 00:00:00 2001 From: Argiro Kokogiannaki Date: Mon, 16 Nov 2020 16:28:16 +0000 Subject: [PATCH] [Monitor |Trunk] SEO changes: -update titles and descriptions - add more jsonld git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-monitor-portal/trunk/monitor@59889 d315682c-612b-4755-9ff5-7f18f6832af3 --- src/app/app.component.ts | 6 ++++ src/app/app.module.ts | 4 ++- src/app/contact/contact.component.html | 2 +- src/app/contact/contact.component.ts | 36 +++++++++++----------- src/app/home/home.component.html | 5 --- src/app/home/home.component.ts | 2 +- src/app/learn-how/learn-how.component.html | 2 +- src/app/learn-how/learn-how.component.ts | 2 +- src/environments/environment.ts | 2 +- 9 files changed, 32 insertions(+), 29 deletions(-) diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 32ddf49..16b6e4a 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -19,6 +19,12 @@ import {Header} from "./openaireLibrary/sharedComponents/navigationBar.component + +
diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 4857317..b449a3f 100755 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -16,6 +16,7 @@ import {NavigationBarModule} from './openaireLibrary/sharedComponents/navigation import {EnvironmentSpecificResolver} from './openaireLibrary/utils/properties/environmentSpecificResolver'; import {DEFAULT_TIMEOUT, TimeoutInterceptor} from "./openaireLibrary/timeout-interceptor.service"; +import {Schema2jsonldModule} from "./openaireLibrary/sharedComponents/schema2jsonld/schema2jsonld.module"; import {HttpInterceptorService} from "./openaireLibrary/http-interceptor.service"; import {ErrorInterceptorService} from "./openaireLibrary/error-interceptor.service"; @@ -33,7 +34,8 @@ import {ErrorInterceptorService} from "./openaireLibrary/error-interceptor.servi CookieLawModule, BrowserTransferStateModule, BrowserModule.withServerTransition({appId: 'my-app'}), - AppRoutingModule + AppRoutingModule, + Schema2jsonldModule ], declarations: [ AppComponent, OpenaireErrorPageComponent], exports: [ AppComponent ], diff --git a/src/app/contact/contact.component.html b/src/app/contact/contact.component.html index e02ca2a..37b94cf 100644 --- a/src/app/contact/contact.component.html +++ b/src/app/contact/contact.component.html @@ -1,4 +1,4 @@ - +
diff --git a/src/app/contact/contact.component.ts b/src/app/contact/contact.component.ts index 338f5d8..ba6da35 100644 --- a/src/app/contact/contact.component.ts +++ b/src/app/contact/contact.component.ts @@ -11,6 +11,7 @@ import {HelperService} from "../openaireLibrary/utils/helper/helper.service"; import {SEOService} from "../openaireLibrary/sharedComponents/SEO/SEO.service"; import {AbstractControl, FormBuilder, FormGroup, ValidatorFn, Validators} from "@angular/forms"; import {Subscriber} from "rxjs"; +import {properties} from "../../environments/environment"; @Component({ selector: 'contact', @@ -19,6 +20,7 @@ import {Subscriber} from "rxjs"; export class ContactComponent implements OnInit { public url: string = null; public pageTitle: string = "OpenAIRE - Monitor | Contact Us"; + public description: string = "OpenAIRE - Monitor . Any Questions? Contact us to learn more"; public piwiksub: any; public showLoading = true; public errorMessage = ''; @@ -55,24 +57,22 @@ export class ContactComponent implements OnInit { }); } ngOnInit() { - this._title.setTitle('OpenAIRE-Monitor | Contact Us'); - this.subscriptions.push(this.route.data.subscribe((data: { envSpecific: EnvProperties }) => { - this.properties = data.envSpecific; - this.email = {body: '', subject: '', recipients: []}; - if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) { - this.subscriptions.push(this._piwikService.trackView(this.properties, this.pageTitle, this.properties.piwikSiteId).subscribe()); - } - this.url = this.properties.domain + this.properties.baseLink + this._router.url; - this.seoService.createLinkForCanonicalURL(this.url); - this.updateUrl(this.url); - this.updateTitle(this.pageTitle); - this.updateDescription("OpenAIRE - Monitor, Community Gateway, research community - Contact Us"); - this.reset(); - //this.getDivContents(); - // this.getPageContents(); - HelperFunctions.scroll(); - this.showLoading = false; - })); + this.properties = properties; + this.email = {body: '', subject: '', recipients: []}; + if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) { + this.subscriptions.push(this._piwikService.trackView(this.properties, this.pageTitle, this.properties.piwikSiteId).subscribe()); + } + this.url = this.properties.domain + this.properties.baseLink + this._router.url; + this.seoService.createLinkForCanonicalURL(this.url); + this.updateUrl(this.url); + this.updateTitle(this.pageTitle); + this.updateDescription(this.description); + this.reset(); + //this.getDivContents(); + // this.getPageContents(); + HelperFunctions.scroll(); + this.showLoading = false; + } private getPageContents() { diff --git a/src/app/home/home.component.html b/src/app/home/home.component.html index dfce345..43a466e 100644 --- a/src/app/home/home.component.html +++ b/src/app/home/home.component.html @@ -1,8 +1,3 @@ - -
+
diff --git a/src/app/learn-how/learn-how.component.ts b/src/app/learn-how/learn-how.component.ts index 9b39787..3a22031 100644 --- a/src/app/learn-how/learn-how.component.ts +++ b/src/app/learn-how/learn-how.component.ts @@ -19,7 +19,7 @@ export class LearnHowComponent { public url: string = null; public pageTitle: string = "OpenAIRE - Monitor | Learn How"; - + public description: string = "Learn the process: Use the Monitor Dashboard to view your research results, open science. See how it works. Simplify research tracking & monitoring "; properties: EnvProperties; subscriptions = []; constructor( diff --git a/src/environments/environment.ts b/src/environments/environment.ts index a1bdee6..bdff220 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -43,7 +43,7 @@ export let properties: EnvProperties = { utilsService: "http://mpagasas.di.uoa.gr:8000", vocabulariesAPI: "https://beta.services.openaire.eu/provision/mvc/vocabularies/", piwikBaseUrl: "https://analytics.openaire.eu/piwik.php?idsite=", - piwikSiteId: "80", + piwikSiteId: "298", registryUrl: 'http://mpagasas.di.uoa.gr:8080/dnet-openaire-users-1.0.0-SNAPSHOT/api/registry/', 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=",