diff --git a/landingPages/landing-utils/parsingFunctions.class.ts b/landingPages/landing-utils/parsingFunctions.class.ts index 77a87a55..7913502d 100644 --- a/landingPages/landing-utils/parsingFunctions.class.ts +++ b/landingPages/landing-utils/parsingFunctions.class.ts @@ -7,6 +7,7 @@ import {Injectable} from '@angular/core'; }) export class ParsingFunctions { public notebookInSubjects: boolean = false; + private notebookKeyword: string = "eosc jupyter notebook"; public open = 'assets/common-assets/unlock.svg'; public closed = 'assets/common-assets/lock.svg'; @@ -534,7 +535,12 @@ export class ParsingFunctions { } let content: string = subject.content; - if(content && content.toLowerCase().includes("notebook")) { + console.log("keyword subject: "+content); + + if(content && content.toLowerCase().includes(this.notebookKeyword)) { + // console.log("included in keyword subject: "+content); + console.log("included"); + this.notebookInSubjects = true; } subjects.push(content); @@ -548,8 +554,13 @@ export class ParsingFunctions { } let content: string = subject.content; let classname: string = subject.classname; - if( (content && content.toLowerCase().includes("notebook") || - (classname && classname.toLowerCase().includes("notebook")))) { + console.log("other subject: "+classname + ": " +content); + + if( (content && content.toLowerCase().includes(this.notebookKeyword) || + (classname && classname.toLowerCase().includes(this.notebookKeyword)))) { + // console.log("included in other subject: "+classname + ": "+content); + console.log("included"); + this.notebookInSubjects = true; } otherSubjects.get(classname).push(content); diff --git a/landingPages/result/resultLanding.component.html b/landingPages/result/resultLanding.component.html index b254baa6..db41463f 100644 --- a/landingPages/result/resultLanding.component.html +++ b/landingPages/result/resultLanding.component.html @@ -125,7 +125,7 @@
  • + target="_blank" [href]="properties.egiNotebookLink"> egi_notebook diff --git a/utils/properties/env-properties.ts b/utils/properties/env-properties.ts index 3bcc7b59..6f87114f 100644 --- a/utils/properties/env-properties.ts +++ b/utils/properties/env-properties.ts @@ -135,4 +135,5 @@ export interface EnvProperties { notificationsAPIURL?: string; myOrcidLinksPage?: string; footerGrantText?: string; + egiNotebookLink?: string; }