diff --git a/src/app/home/home.component.html b/src/app/home/home.component.html index 06803c8..98b1184 100644 --- a/src/app/home/home.component.html +++ b/src/app/home/home.component.html @@ -1,155 +1,135 @@ -
-
-
-
- - -
-
-
-
- +
+
+
+
+
+

+ Discover open linked research. +

+
+
+ A comprehensive and open dataset of research information covering + {{numbers.publicationsSize.number|number}}{{numbers.publicationsSize.size}} {{openaireEntities.PUBLICATIONS.toLowerCase()}}, + {{numbers.datasetsSize.number|number}}{{numbers.datasetsSize.size}} {{openaireEntities.DATASETS.toLowerCase()}} + , + {{numbers.softwareSize.number|number}}{{numbers.softwareSize.size}} {{openaireEntities.SOFTWARE.toLowerCase()}} items, from + {{numbers.datasourcesSize.number|number}}{{numbers.datasourcesSize.size}} {{openaireEntities.DATASOURCES.toLowerCase()}}, linked to + {{numbers.projectsSize.number|number}}{{numbers.projectsSize.size}} grants and + {{numbers.organizationsSize.number|number}}{{numbers.organizationsSize.size}} {{openaireEntities.ORGANIZATIONS.toLowerCase()}}. +
+
All linked together through citations and semantics.
+
+
+ + +
+
+
+
+ +
+
+
+ +
+
+
+ +
-
- -
-
-
-
-
-
{{aggregator.graphSectionTitle}}
-

-

-
-
-
- Read more -
-
- Read less -
-
-
-
-
- -
-
- -
-
-
-
-
- - - - -
-

Our growing Community

- -
-
-
-
-
-
-
-
-
-
Share
- -
Deposit your research -
- -
-
Deposit in a repository of your choice.
- Select an OpenAIRE compatible
- repository (2.0 +) so that your research is linked to your funding information. Use Zenodo, a - catch-all repository hosted by CERN to deposit all your research results (publications, data, - software, etc.) -
-
- Deposit
-
- -
-
-
Share
- -
Link your work
- -
-
Connect all your research.
- If you can't find your research results in OpenAIRE, don't worry! Use our Link Out service , that - reaches out to many
- external sources via APIs, to connect
- your research results and claim them to your project. -
-
- Link
-
-
-
-
-
-
-
- - - - - - - - - +
+
+
+
+
+

{{aggregator.graphSectionTitle}}.

+

+
+
+
+ OpenAIRE Research Graph +
+
+
+
+ + + +
+

Share your research.

+
+
+
+ Linking +
Link your work.
+
+ Connect all your research. If you can’t find your research results in OpenAIRE, don’t worry! Use our Link Out service , that reaches out to many external sources via APIs, to connect your research results and claim them to your project. +
+ + Learn More + +
+
+
+
+ Deposit +
Deposit your research.
+
+ Whether it’s publications, data or software, select an OpenAIRE compatible repository and share using community standards. Alternatively use Zenodo, a catch-all repository hosted by CERN. All results will be indexed, discoverable and accessible via Canada Explore. +
+ + Learn More + +
+
+
+
+
\ No newline at end of file diff --git a/src/app/home/home.component.less b/src/app/home/home.component.less new file mode 100644 index 0000000..b8c73fa --- /dev/null +++ b/src/app/home/home.component.less @@ -0,0 +1,9 @@ +@import (reference) "~src/assets/openaire-theme/less/_import-variables"; + +.link-actions img { + width: 17px; +} + +.uk-card.funder { + border-bottom: 4px solid fade(@organization-color, 30%); +} \ No newline at end of file diff --git a/src/app/home/home.component.ts b/src/app/home/home.component.ts index 2984c22..91567e1 100644 --- a/src/app/home/home.component.ts +++ b/src/app/home/home.component.ts @@ -1,5 +1,5 @@ import {ChangeDetectorRef, Component, ViewChild} from '@angular/core'; -import {Subscription, zip} from 'rxjs'; +import {of, Subscription, zip} from 'rxjs'; import {ActivatedRoute, Router} from '@angular/router'; import {Location} from '@angular/common'; import {Meta, Title} from '@angular/platform-browser'; @@ -24,11 +24,13 @@ import {properties} from "../../environments/environment"; import {portalProperties} from "../../environments/environment-aggregator"; import {StringUtils} from "../openaireLibrary/utils/string-utils.class"; import {ConnectHelper} from "../openaireLibrary/connect/connectHelper"; -import {NumbersComponent} from "../openaireLibrary/sharedComponents/numbers/numbers.component"; +import {Numbers, NumbersComponent} from "../openaireLibrary/sharedComponents/numbers/numbers.component"; +import {NumberUtils} from '../openaireLibrary/utils/number-utils.class'; @Component({ selector: 'home', templateUrl: 'home.component.html', + styleUrls: ['home.component.less'] }) export class HomeComponent { public keyword:string = ""; @@ -36,6 +38,7 @@ export class HomeComponent { public searchFields:SearchFields = new SearchFields(); public errorCodes:ErrorCodes = new ErrorCodes(); public routerHelper:RouterHelper = new RouterHelper(); + public numbers: Numbers = {}; showPublications: boolean = portalProperties.entities.publication.isEnabled; showDatasets: boolean = portalProperties.entities.dataset.isEnabled; showSoftware: boolean = portalProperties.entities.software.isEnabled; @@ -44,6 +47,7 @@ export class HomeComponent { showProjects: boolean = portalProperties.entities.project.isEnabled; showDataProviders: boolean = portalProperties.entities.datasource.isEnabled; properties: EnvProperties = properties; + public openaireEntities = OpenaireEntities; public readMore: boolean = false; private noOfFunders = 3; @@ -85,7 +89,7 @@ export class HomeComponent { this.aggregator = PortalAggregators.getFilterInfoByMenuId(this.aggregatorId); this.customFilter = PortalAggregators.getSearchCustomFilterByAggregator(this.aggregator); let description = "OpenAIRE Explore: Over 100M of research deduplicated, 170K research software, 11M research data. One of the largest open scholarly records collection worldwide."; - let title = "OpenAIRE - Explore| " +this.aggregator.title; + let title = "OpenAIRE - Explore | " +this.aggregator.title; this._title.setTitle(title); this._meta.updateTag({content:description},"name='description'"); @@ -131,22 +135,19 @@ export class HomeComponent { this.showDataProviders = !!showEntity["datasource"]; this.showOrganizations = !!showEntity["organization"]; if(this.showPublications){ - this.resultTypes.values.push({name: OpenaireEntities.PUBLICATIONS , id:"publications",selected:false, number:0}); + this.resultTypes.values.push({name: this.openaireEntities.PUBLICATIONS , id:"publications",selected:false, number:0}); } if(this.showDatasets){ - this.resultTypes.values.push({name: OpenaireEntities.DATASETS , id:"datasets",selected:false, number:0}); + this.resultTypes.values.push({name: this.openaireEntities.DATASETS , id:"datasets",selected:false, number:0}); } if(this.showSoftware){ - this.resultTypes.values.push({name: OpenaireEntities.SOFTWARE , id:"software",selected:false, number:0}); + this.resultTypes.values.push({name: this.openaireEntities.SOFTWARE , id:"software",selected:false, number:0}); } if(this.showOrp){ - this.resultTypes.values.push({name: OpenaireEntities.OTHER , id:"other",selected:false, number:0}); - } - if(this.numbersComponent) { - this.numbersComponent.init(false, false, this.showPublications, this.showDatasets, - this.showSoftware, this.showOrp, this.showProjects, this.showDataProviders, this.customFilter ? - StringUtils.URIEncode(this.customFilter.queryFieldName + " exact " + StringUtils.quote((this.customFilter.valueId))) : ''); + this.resultTypes.values.push({name: this.openaireEntities.OTHER , id:"other",selected:false, number:0}); } + this.init(false, false, this.showPublications, this.showDatasets, this.showSoftware, this.showOrp, this.showProjects, this.showDataProviders, this.showOrganizations, + this.customFilter ? StringUtils.URIEncode(this.customFilter.queryFieldName + " exact " + StringUtils.quote((this.customFilter.valueId))) : ''); this.getFunders(); } }, @@ -281,7 +282,6 @@ export class HomeComponent { } } }); - // console.log(this.funders); })); } @@ -295,8 +295,63 @@ export class HomeComponent { return false; } + init(getDatasetsLinked = false, getSoftwareLinked = false, getPublications = true, getDatasets = true, + getSoftware = true, getOther = true, getProjects = true, getDataProviders = true, getOrganizations = true, refineValue: string = null) { + let refineParams = (refineValue) ? ('&fq=' + refineValue) : null; + this.subs.push(zip( + (getPublications) ? this._searchResearchResultsService.numOfSearchResults('publication', '', this.properties, refineParams) : of(0), + (getDatasets) ? this._searchResearchResultsService.numOfSearchResults('dataset', '', this.properties, refineParams) : of(0), + (getDatasetsLinked) ? this._searchResearchResultsService.numOfSearchResultsLinkedToPub("dataset", this.properties) : of(0), + (getSoftware) ? this._searchResearchResultsService.numOfSearchResults('software', '', this.properties, refineParams) : of(0), + (getSoftwareLinked) ? this._searchResearchResultsService.numOfSearchResultsLinkedToPub("software", this.properties) : of(0), + (getOther) ? this._searchResearchResultsService.numOfSearchResults('other', '', this.properties, refineParams) : of(0), + (getProjects) ? this._refineFieldResultsService.getRefineFieldsResultsByEntityName(['funder'], 'project', this.properties, refineParams) : of(0), + (getDataProviders) ? this._searchDataprovidersService.numOfSearchDataproviders('', this.properties, refineParams) : of(0), + (getOrganizations) ? this._searchOrganizationsService.numOfSearchOrganizations2('', this.properties, refineParams) : of(0) + ).subscribe((data: any[]) => { + if (data[0] && data[0] > 0) { + this.numbers.publicationsSize = NumberUtils.roundNumber(data[0]); + } + if (data[1] && data[1] > 0) { + this.numbers.datasetsSize = NumberUtils.roundNumber(data[1]); + } + if (data[2] && data[2] > 0) { + this.numbers.datasetsLinkedSize = NumberUtils.roundNumber(data[2]); + } + if (data[3] && data[3] > 0) { + this.numbers.softwareSize = NumberUtils.roundNumber(data[3]); + } + if (data[4] && data[4] > 0) { + this.numbers.softwareLinkedSize = NumberUtils.roundNumber(data[4]); + } + if (data[5] && data[5] > 0) { + this.numbers.otherSize = NumberUtils.roundNumber(data[5]); + } + if (data[6][0] && data[6][0] > 0) { + this.numbers.projectsSize = NumberUtils.roundNumber(data[6][0]); + } + if (data[6][1] && data[6][1].length > 0 && data[6][1][0].filterId == 'funder' && data[6][1][0].values) { + this.numbers.fundersSize = NumberUtils.roundNumber(data[6][1][0].values.length); + } + if (data[7] && data[7] > 0) { + this.numbers.datasourcesSize = NumberUtils.roundNumber(data[7]); + } + if (data[8] && data[8] > 0) { + this.numbers.organizationsSize = NumberUtils.roundNumber(data[8]); + } + }, err => { + this.handleError('Error getting numbers', err); + })); +} + disableSelectChange(event: boolean) { this.disableSelect = event; this.cdr.detectChanges(); + } + + public get showContentWithNumbers() { + if (this.numbers && this.numbers.publicationsSize && this.numbers.datasetsSize && (this.numbers.softwareSize || !this.showSoftware) && this.numbers.datasourcesSize && this.numbers.projectsSize && this.numbers.organizationsSize) { + return true; + } } } diff --git a/src/app/openaireLibrary b/src/app/openaireLibrary index 65cc850..c862be7 160000 --- a/src/app/openaireLibrary +++ b/src/app/openaireLibrary @@ -1 +1 @@ -Subproject commit 65cc8504eaa645b32af7ea4238445d9cc47c2556 +Subproject commit c862be75613fa1cf08a3bf276b9f4e1b56a3321c diff --git a/src/assets/aggregator-assets/fos-icon.svg b/src/assets/aggregator-assets/fos-icon.svg new file mode 100644 index 0000000..dbac42f --- /dev/null +++ b/src/assets/aggregator-assets/fos-icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/aggregator-assets/home/canada.png b/src/assets/aggregator-assets/home/canada.png new file mode 100644 index 0000000..b2f9fb1 Binary files /dev/null and b/src/assets/aggregator-assets/home/canada.png differ diff --git a/src/assets/aggregator-assets/home/deposit-home-img.svg b/src/assets/aggregator-assets/home/deposit-home-img.svg new file mode 100644 index 0000000..18f579c --- /dev/null +++ b/src/assets/aggregator-assets/home/deposit-home-img.svg @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/aggregator-assets/home/linking-home-img.svg b/src/assets/aggregator-assets/home/linking-home-img.svg new file mode 100644 index 0000000..e905820 --- /dev/null +++ b/src/assets/aggregator-assets/home/linking-home-img.svg @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/aggregator-assets/home/mask.svg b/src/assets/aggregator-assets/home/mask.svg new file mode 100644 index 0000000..11e6f1e --- /dev/null +++ b/src/assets/aggregator-assets/home/mask.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/aggregator-assets/sdg-dot-img.svg b/src/assets/aggregator-assets/sdg-dot-img.svg new file mode 100644 index 0000000..e4df544 --- /dev/null +++ b/src/assets/aggregator-assets/sdg-dot-img.svg @@ -0,0 +1,406 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/common-assets b/src/assets/common-assets index 2de3f62..050fcbc 160000 --- a/src/assets/common-assets +++ b/src/assets/common-assets @@ -1 +1 @@ -Subproject commit 2de3f625b772a264acb0579126b2bfce42778d0c +Subproject commit 050fcbce9343f849956800b4634f62fefee7e210 diff --git a/src/assets/openaire-theme b/src/assets/openaire-theme index f902074..35ab282 160000 --- a/src/assets/openaire-theme +++ b/src/assets/openaire-theme @@ -1 +1 @@ -Subproject commit f902074e00e01165f489e2fef12aad6551c03ccd +Subproject commit 35ab282e53ad5b7790bc431820a4400cfc36c977