[Trunk | Explore]: 1. assets/common-assets: Added "eosc-logo.png" & deleted "egi-fed.notebook.png". 2. resultLanding.component.ts: Removed local styles for "notebook-button" class. 3. resultLanding.component.html: Logo and name of button for egi notebook updated. 4. parsingFunctions.class.ts: When "eosc jupyter notebook" is in subjects, show as classified subject (vocabulary) "EOSC: EOSC Jupyter Notebook" [Paolo's request].

This commit is contained in:
Konstantina Galouni 2021-09-29 14:34:03 +03:00
parent aab0341bea
commit 532be0e568
3 changed files with 36 additions and 22 deletions

View File

@ -8,6 +8,8 @@ import {Injectable} from '@angular/core';
export class ParsingFunctions {
public notebookInSubjects: boolean = false;
private notebookKeyword: string = "eosc jupyter notebook";
private notebook_label: string = "EOSC";
private notebook_value: string = "EOSC Jupyter Notebook";
public open = 'assets/common-assets/unlock.svg';
public closed = 'assets/common-assets/lock.svg';
@ -530,28 +532,28 @@ export class ParsingFunctions {
classifiedSubjects.get(subject.classname).push(subject.content);
} else {
if (subject.classid == "keyword") {
if (subjects == undefined) {
subjects = new Array<string>();
}
let content: string = subject.content;
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;
if (classifiedSubjects == undefined) {
classifiedSubjects = new Map<string, string[]>();
}
if (!classifiedSubjects.has(subject.classname)) {
classifiedSubjects.set(this.notebook_label, new Array<string>());
}
classifiedSubjects.get(this.notebook_label).push(this.notebook_value);
} else {
if (subjects == undefined) {
subjects = new Array<string>();
}
subjects.push(content);
}
} else {
if (otherSubjects == undefined) {
otherSubjects = new Map<string, string[]>();
}
if (!otherSubjects.has(subject.classname)) {
otherSubjects.set(subject.classname, new Array<string>());
}
let content: string = subject.content;
let classname: string = subject.classname;
console.log("other subject: "+classname + ": " +content);
@ -562,12 +564,28 @@ export class ParsingFunctions {
console.log("included");
this.notebookInSubjects = true;
if (classifiedSubjects == undefined) {
classifiedSubjects = new Map<string, string[]>();
}
if (!classifiedSubjects.has(subject.classname)) {
classifiedSubjects.set(this.notebook_label, new Array<string>());
}
classifiedSubjects.get(this.notebook_label).push(this.notebook_value);
} else {
if (otherSubjects == undefined) {
otherSubjects = new Map<string, string[]>();
}
if (!otherSubjects.has(subject.classname)) {
otherSubjects.set(subject.classname, new Array<string>());
}
otherSubjects.get(classname).push(content);
}
}
}
}
}
return [subjects, otherSubjects, classifiedSubjects];
}

View File

@ -126,11 +126,11 @@
&& (properties.environment == 'beta' || properties.environment == 'development')">
<a class="uk-link-text uk-text-bold uk-text-uppercase"
target="_blank" [href]="properties.egiNotebookLink">
<span class="uk-icon-button notebook-button uk-icon">
<img src="assets/common-assets/egi-fed.notebook.png"
loading="lazy" alt="egi_notebook" style="width:30px; height:21px">
<span class="uk-icon-button uk-icon">
<img src="assets/common-assets/eosc-logo.png"
loading="lazy" alt="eosc_logo" style="width:28px; height:28px">
</span>
<span class="uk-margin-small-left"><u>EGI Notebook</u></span>
<span class="uk-margin-small-left"><u>EOSC SERVICE: EGI NOTEBOOK</u></span>
<span class="custom-external custom-icon space"></span>
</a>
</li>

View File

@ -27,10 +27,6 @@ import {$e} from "codelyzer/angular/styles/chars";
@Component({
styles: [
'.notebook-button { background-color: #f2f2f2; border: 1px solid #f2f2f2; } ' +
'.notebook-button:hover { background-color: #e5e5e5; border-color: #e5e5e5; } '
],
selector: 'result-landing',
templateUrl: 'resultLanding.component.html',
})