diff --git a/src/app/affiliations/affiliations.component.html b/src/app/affiliations/affiliations.component.html index b522b9b..12878a5 100644 --- a/src/app/affiliations/affiliations.component.html +++ b/src/app/affiliations/affiliations.component.html @@ -28,19 +28,21 @@
-
- - - - - - -
+
+
+ + + + + + +
+
diff --git a/src/app/curators/curators.component.html b/src/app/curators/curators.component.html index 67cb9b9..71f1ce2 100644 --- a/src/app/curators/curators.component.html +++ b/src/app/curators/curators.component.html @@ -22,7 +22,7 @@
-
+
Curator Photo @@ -66,18 +66,20 @@
-
+
Affiliations
-
- - - - - - +
+
+ + + + + + +
diff --git a/src/app/htmlPages/organizations/organizationsPage.component.ts b/src/app/htmlPages/organizations/organizationsPage.component.ts index d482d24..88914a7 100644 --- a/src/app/htmlPages/organizations/organizationsPage.component.ts +++ b/src/app/htmlPages/organizations/organizationsPage.component.ts @@ -10,7 +10,7 @@ import {Breadcrumb} from "../../openaireLibrary/utils/breadcrumbs/breadcrumbs.co
-

Supporting
Organizations

+

Supporting Organizations

diff --git a/src/app/openaireLibrary b/src/app/openaireLibrary index 18b403b..4966a1d 160000 --- a/src/app/openaireLibrary +++ b/src/app/openaireLibrary @@ -1 +1 @@ -Subproject commit 18b403bec044e2b4c803f9a19d54f9e0e408c3d9 +Subproject commit 4966a1d342ae711a1a84ee924ab23e2f79271ec9 diff --git a/src/app/subjects/subjects.component.ts b/src/app/subjects/subjects.component.ts index 397cb26..e5422b2 100644 --- a/src/app/subjects/subjects.component.ts +++ b/src/app/subjects/subjects.component.ts @@ -37,20 +37,64 @@ import {Subscriber, Subscription} from "rxjs"; [texts]="pageContents['top']">
-
-
- - - - {{subject}} - - , - - + +
+
-
+ + + + +
@@ -64,6 +108,12 @@ export class SubjectsComponent { public properties: EnvProperties = properties; public pageContents = null; public divContents = null; + public groupedSubjects = []; + public index: number = 0; + public subjectsLimit: number = 6; + public viewAll: boolean = false; + public maxCharacters: number = 25; + public subjectsColumns = []; public url: string = null; public pageTitle: string = "Subjects"; @@ -98,6 +148,7 @@ export class SubjectsComponent { //this.getDivContents(); this.getPageContents(); this.subjects = community.subjects; + this.groupSubjects(); this.showLoading = false; } })); @@ -126,6 +177,42 @@ export class SubjectsComponent { this.divContents = contents; })); } + + private groupSubjects() { + if(this.subjects.length === 0) { + return []; + } + this.groupedSubjects = Object.values( + this.subjects.reduce((acc, subject) => { + let firstLetter = subject[0].toLocaleUpperCase(); + if(!acc[firstLetter]) { + acc[firstLetter] = {group: firstLetter, data: [subject]}; + } else { + acc[firstLetter].data.push(subject); + } + return acc; + },{}) + ) + if(this.subjects.length > 1) { + this.groupedSubjects.unshift({group: 'All', data: this.subjects}); + } + } + + public changeDisplayedSubjects(i, group) { + this.subjectsColumns = []; + this.index = i; + if(group.data.length > this.subjectsLimit && group.group != 'All') { + this.divideSubjects(group); + } + } + + public divideSubjects(group) { + let columns = []; + for(let i = 0; i < (group.data.length / this.subjectsLimit); i++) { + columns.push(group.data.slice(i * this.subjectsLimit, ((i + 1) * this.subjectsLimit))); + } + this.subjectsColumns = columns; + } private updateDescription(description: string) { this._meta.updateTag({content: description}, "name='description'"); diff --git a/src/assets/common-assets b/src/assets/common-assets index d6fd642..752859b 160000 --- a/src/assets/common-assets +++ b/src/assets/common-assets @@ -1 +1 @@ -Subproject commit d6fd642f214ce91e0eefaa06a9e8b50fedf9b7d8 +Subproject commit 752859b10d3e110fdc9a4360bb7cb005ef6225ed diff --git a/src/assets/openaire-theme b/src/assets/openaire-theme index 4fca369..ec73c67 160000 --- a/src/assets/openaire-theme +++ b/src/assets/openaire-theme @@ -1 +1 @@ -Subproject commit 4fca369b2e4f4f2c2689e0efc501d2c548dfeb68 +Subproject commit ec73c67c591eca9fe68f7a6c6f65ce4332852b2f