diff --git a/explore/src/app/fos/fos.component.css b/explore/src/app/fos/fos.component.css index e69de29b..a34df8c3 100644 --- a/explore/src/app/fos/fos.component.css +++ b/explore/src/app/fos/fos.component.css @@ -0,0 +1,4 @@ +mark.highlighted { + background: #3086ED !important; + color: inherit !important; +} \ No newline at end of file diff --git a/explore/src/app/fos/fos.component.html b/explore/src/app/fos/fos.component.html index 38d9ad17..bba3e205 100644 --- a/explore/src/app/fos/fos.component.html +++ b/explore/src/app/fos/fos.component.html @@ -79,7 +79,8 @@
-

{{item.id}}

+ +

{{subItem.id}}

diff --git a/explore/src/app/fos/fos.component.ts b/explore/src/app/fos/fos.component.ts index 53882acb..dda8fa57 100644 --- a/explore/src/app/fos/fos.component.ts +++ b/explore/src/app/fos/fos.component.ts @@ -28,7 +28,6 @@ export class FosComponent implements OnInit, OnDestroy { public level2Results = []; public level3Results = []; - properties: EnvProperties = properties; public breadcrumbs: Breadcrumb[] = [{name: 'home', route: '/'}, {name: 'FOS'}]; @@ -62,7 +61,6 @@ export class FosComponent implements OnInit, OnDestroy { this.matchLevel3 = false; if(this.keywordControl.value) { this.keyword = this.keywordControl.value; - // console.log(this.keyword); this.keywordControl.setValue(''); // logic to find matches in all 3 levels through nested loops? this.findMatches(); @@ -70,7 +68,7 @@ export class FosComponent implements OnInit, OnDestroy { } findMatches() { - console.log(this.keyword); + // console.log(this.keyword); this.level1Results = []; this.level2Results = []; this.level3Results = []; @@ -78,21 +76,21 @@ export class FosComponent implements OnInit, OnDestroy { if(this.fos.length) { this.fos.forEach(item => { if(item.id.includes(this.keyword)) { - console.log('1st level match: ' + item.id); + // console.log('1st level match: ' + item.id); this.matchLevel1 = true; this.level1Results.push(item); // 2nd level search if(item.children.length) { item.children.forEach(subItem => { if(subItem.id.includes(this.keyword)) { - console.log('2nd level match: ' + subItem.id); + // console.log('2nd level match: ' + subItem.id); this.matchLevel2 = true; this.level2Results.push(subItem); // 3rd level search if(subItem.children.length){ subItem.children.forEach(subSubItem => { if(subSubItem.id.includes(this.keyword)) { - console.log('3rd level match: ' + subSubItem.id); + // console.log('3rd level match: ' + subSubItem.id); this.matchLevel3 = true; this.level3Results.push(subSubItem); } @@ -103,18 +101,26 @@ export class FosComponent implements OnInit, OnDestroy { } } }); - console.log(this.level1Results); - console.log(this.level2Results); - console.log(this.level3Results); + // console.log(this.level1Results); + // console.log(this.level2Results); + // console.log(this.level3Results); } - // filtering + // filtering (tried with .every as well for nested search but didnt work) // if(this.fos.length) { // const level1Matches = this.fos.filter(item => item.id.includes(this.keyword)); // console.log(level1Matches); // } } + highlightKeyword(name) { + if(name.includes(this.keyword)) { + return name.replace(new RegExp(this.keyword, "gi"), (matchedValue) => `${matchedValue}`); + } else { + return name; + } + } + clearKeyword() { this.keyword = null; this.matchLevel1 = false; diff --git a/explore/src/app/openaireLibrary b/explore/src/app/openaireLibrary index 322ee51e..0e8143b4 160000 --- a/explore/src/app/openaireLibrary +++ b/explore/src/app/openaireLibrary @@ -1 +1 @@ -Subproject commit 322ee51e261a61861a085dc3ca01d1d456f6338f +Subproject commit 0e8143b4e29016961c025d7eaacc590fc0bc4bee diff --git a/explore/src/app/sdg/sdg.component.css b/explore/src/app/sdg/sdg.component.css index 9171d3e4..1126c1ad 100644 --- a/explore/src/app/sdg/sdg.component.css +++ b/explore/src/app/sdg/sdg.component.css @@ -1,3 +1,12 @@ +.custom-sdg-dot:after { + content: ""; + background-image: url(../../assets/explore-assets/sdg-dot-img.svg); + display: inline-block; + background-size: 100% 100%; + height: 18px; + width: 18px; + margin-left: 10px; +} .sdg-card { color: #F9F9F9 !important; } diff --git a/explore/src/app/sdg/sdg.component.html b/explore/src/app/sdg/sdg.component.html index 72b39bf2..39cc1b2f 100644 --- a/explore/src/app/sdg/sdg.component.html +++ b/explore/src/app/sdg/sdg.component.html @@ -7,7 +7,8 @@
-

Lorem ipsum dolor sit amet, consetetur.

+ +

Lorem ipsum dolor sit amet, consetetur

We have implemented the UN Sustainable Development Goals ( SDGs) as a
classification scheme covering areas of research associated with one or more SDGs
(the majority of the SDGs are interrelated). The scheme uses automated allocation
of the 17 SDGs and their associated targets and indicators to all fitting documents in
Dimensions thereby addressing research areas aligned to the goals.
@@ -20,8 +21,11 @@
-
- +
+ +
+ +
@@ -33,22 +37,22 @@
-
-
-
- Goal {{sdg.code}} +
+
+
+ {{sdg.code}}
-
+
{{sdg.label}}
-
- {{sdg.number == null ? '0' : sdg.number | number}} -

Research Outcomes

+
+
- + {{sdg.number == null ? '0' : sdg.number | number}} +

Research Outcomes

diff --git a/explore/src/assets/common-assets b/explore/src/assets/common-assets index c0f2132f..fbbae041 160000 --- a/explore/src/assets/common-assets +++ b/explore/src/assets/common-assets @@ -1 +1 @@ -Subproject commit c0f2132f4efa10383da21e86a46eab1786694a0f +Subproject commit fbbae0418315e06d6ce5a0d193fd08c8ea617b6b diff --git a/explore/src/assets/explore-assets/sdgs-badge.png b/explore/src/assets/explore-assets/sdg-badge.png similarity index 100% rename from explore/src/assets/explore-assets/sdgs-badge.png rename to explore/src/assets/explore-assets/sdg-badge.png diff --git a/explore/src/assets/explore-assets/sdg-dot-img.svg b/explore/src/assets/explore-assets/sdg-dot-img.svg new file mode 100644 index 00000000..e4df5445 --- /dev/null +++ b/explore/src/assets/explore-assets/sdg-dot-img.svg @@ -0,0 +1,406 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/explore/src/assets/explore-assets/sdg-hero-img.svg b/explore/src/assets/explore-assets/sdg-hero-img.svg new file mode 100644 index 00000000..d76063bf --- /dev/null +++ b/explore/src/assets/explore-assets/sdg-hero-img.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/explore/src/assets/openaire-theme b/explore/src/assets/openaire-theme index d5608661..b441da3a 160000 --- a/explore/src/assets/openaire-theme +++ b/explore/src/assets/openaire-theme @@ -1 +1 @@ -Subproject commit d56086611cad78baa031b54f65f34d01ee7ff3a1 +Subproject commit b441da3afde53c70df14cbdfc1230de41a034bb1