diff --git a/sharedComponents/bottom.component.html b/sharedComponents/bottom.component.html index b6e0500f..0b6c6c19 100644 --- a/sharedComponents/bottom.component.html +++ b/sharedComponents/bottom.component.html @@ -1,318 +1,278 @@ + +
+ flag black white low +
+
+ +
+ +
+
+
-
+
- flag black white low + alt="flag black white low" width="50px" loading="lazy"> +
+
+ +
+
+ +
+
+
+
+ +
+
-
- -
-
- -
-
-
-
- -
-
-
- OpenAIRE
-
-
- -
-
- -
- - OpenAIRE -
-
- - - - - - - - - - - -
-
- flag black white low -
-
- -
- -
+
+
+
+
+
+
+
+ OpenAIRE +
+
+
+
-
- - -
-
-
-
- - - +
+
+
+ +
+
+ +
+
+
Dashboards
+ +
+
+
+
+
Support
+ +
+
+
+
+
Updates
+ +
+
+
-
-
-
-
Dashboards
- -
-
-
-
-
Support
- -
-
-
-
-
Updates
- +
+
+
+
+ +
+
+ +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ +
-
- +
+
+
+ + + + + Unless otherwise indicated, all materials created by OpenAIRE are licenced under + CC ATTRIBUTION 4.0 INTERNATIONALLICENSE
- +
+ + + +
- -
-
-
-
-
-
-
-
- - - - - - - - - -   - - - {{' '}} - - - - - - - - - - - - - - - - - - license - -  Unless otherwise indicated, all materials created by OpenAIRE are licenced under CC ATTRIBUTION 4.0 INTERNATIONAL - LICENSE. +
+
+
+
+
+
+
+ OpenAIRE +
+
+
+ +
+
+
+
+
+
+
+ +
+
+ +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ +
+
-
- +
+
+
+ + + + Unless otherwise indicated, all materials created by OpenAIRE are licenced under
+ +
+
diff --git a/sharedComponents/bottom.component.ts b/sharedComponents/bottom.component.ts index d810b9e6..e8158bfa 100644 --- a/sharedComponents/bottom.component.ts +++ b/sharedComponents/bottom.component.ts @@ -1,8 +1,8 @@ -import { Component, Input } from '@angular/core'; +import {Component, Input} from '@angular/core'; import {ActivatedRoute} from '@angular/router'; import 'rxjs'; -import{MenuItem} from './menu'; -import { ConfigurationService } from '../utils/configuration/configuration.service'; +import {MenuItem} from './menu'; +import {ConfigurationService} from '../utils/configuration/configuration.service'; import {EnvProperties} from "../utils/properties/env-properties"; import {Subscription} from "rxjs"; import {properties} from '../../../environments/environment'; @@ -13,81 +13,71 @@ import {HelperService} from "../utils/helper/helper.service"; templateUrl: 'bottom.component.html' }) export class BottomComponent { - -@Input() showSocialButtons:boolean = true; -@Input() showOpenaire:boolean = true; -@Input() showMenuItems:boolean = false; -@Input() showCommision:boolean = true; -@Input() assetsPath:string ='assets/common-assets/'; -@Input() menuItems:MenuItem []; - -@Input() communityId; -// @Input() environment:string = "beta"; -showPage ={}; -@Input() grantAdvance:boolean = true; -// grantAdvanceText = "OpenAIRE-Advance receives funding from the European Union's Horizon 2020 Research and Innovation programme under Grant Agreement No. 777541."; -// grantConenctText = "OpenAIRE-Connect receives funding from the European Union's Horizon 2020 Research and Innovation programme under grant agreement No. 731011 and No. 777541."; -@Input() properties:EnvProperties = properties; -@Input() darkBackground:boolean=true; -@Input() centered:boolean=false; -@Input() shortView: boolean = false; -sectionClass= "uk-tile-default"; - -subs: Subscription[] = []; -public divContents = null; - -constructor(private config: ConfigurationService, private route: ActivatedRoute, - private helper: HelperService) { -} - + @Input() showSocialButtons: boolean = true; + @Input() showOpenaire: boolean = true; + @Input() showMenuItems: boolean = false; + @Input() showCommision: boolean = true; + @Input() assetsPath: string = 'assets/common-assets/'; + @Input() menuItems: MenuItem []; + @Input() communityId; + showPage = {}; + @Input() grantAdvance: boolean = true; + @Input() properties: EnvProperties = properties; + @Input() centered: boolean = false; + @Input() shortView: boolean = false; + @Input() background: string = "uk-tile-default"; + subs: Subscription[] = []; + public divContents = null; + + constructor(private config: ConfigurationService, private route: ActivatedRoute, + private helper: HelperService) { + } + ngOnInit() { - if(!properties.footerGrantText) { - this.getDivContents(); - } - if(!this.darkBackground){ - this.sectionClass= " footer-light-background"; - } - this.subs.push(this.route.queryParams.subscribe(params => { - if(this.showMenuItems){ - if( this.properties.adminToolsAPIURL && this.communityId ){ - //this.subs.push(this.config.getCommunityInformation(this.properties, this.communityId ).subscribe(data => { - this.subs.push(this.config.communityInformationState.subscribe(data => { - if(data) { - for (var i = 0; i < data['pages'].length; i++) { - this.showPage[data['pages'][i]["route"]] = data['pages'][i]["isEnabled"]; - - } - // console.log(this.showPage) - } - })); - } + if (!properties.footerGrantText) { + this.getDivContents(); } - })); + this.subs.push(this.route.queryParams.subscribe(params => { + if (this.showMenuItems) { + if (this.properties.adminToolsAPIURL && this.communityId) { + //this.subs.push(this.config.getCommunityInformation(this.properties, this.communityId ).subscribe(data => { + this.subs.push(this.config.communityInformationState.subscribe(data => { + if (data) { + for (var i = 0; i < data['pages'].length; i++) { + this.showPage[data['pages'][i]["route"]] = data['pages'][i]["isEnabled"]; + + } + // console.log(this.showPage) + } + })); + } + } + })); } - + public ngOnDestroy() { for (let sub of this.subs) { sub.unsubscribe(); } } - - isEnabled(required, enabled){ - - if(!required ){ + + isEnabled(required, enabled) { + + if (!required) { return true; } - for(let requiredEntity of required){ + for (let requiredEntity of required) { // console.log("R "+requiredEntity +" E " + enabled[requiredEntity]) - if(typeof enabled[requiredEntity] === "undefined" || enabled[requiredEntity] == false){ - return false; - } + if (typeof enabled[requiredEntity] === "undefined" || enabled[requiredEntity] == false) { + return false; + } } return true; } - + private getDivContents() { - let communityId = this.communityId; - if(!communityId) { + let communityId = this.communityId; + if (!communityId) { communityId = properties.adminToolsCommunity; } this.subs.push(this.helper.getDivHelpContents(this.properties, communityId, "/").subscribe(contents => { diff --git a/sharedComponents/bottom.module.ts b/sharedComponents/bottom.module.ts index 23dacc1e..c8464867 100644 --- a/sharedComponents/bottom.module.ts +++ b/sharedComponents/bottom.module.ts @@ -1,22 +1,25 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { FormsModule } from '@angular/forms'; -import { RouterModule } from "@angular/router"; +import {NgModule} from '@angular/core'; +import {CommonModule} from '@angular/common'; +import {FormsModule} from '@angular/forms'; +import {RouterModule} from "@angular/router"; import {BottomComponent} from './bottom.component'; import {HelperModule} from "../utils/helper/helper.module"; +import {IconsModule} from "../utils/icons/icons.module"; +import {IconsService} from "../utils/icons/icons.service"; +import {by, cc, facebook, linkedin, newsletter, slideshare, twitter, youtube} from "../utils/icons/icons"; @NgModule({ imports: [ - CommonModule, FormsModule, RouterModule, HelperModule - + CommonModule, FormsModule, RouterModule, HelperModule, IconsModule ], declarations: [ BottomComponent ], - - exports: [ - BottomComponent - ] + exports: [BottomComponent] }) -export class BottomModule{ } +export class BottomModule{ + constructor(private iconsService: IconsService) { + this.iconsService.registerIcons([by, cc, twitter, facebook, linkedin, slideshare, youtube, newsletter]); + } +} diff --git a/utils/icons/icons-preview/icons-preview.component.ts b/utils/icons/icons-preview/icons-preview.component.ts index deb26a9a..3675cb74 100644 --- a/utils/icons/icons-preview/icons-preview.component.ts +++ b/utils/icons/icons-preview/icons-preview.component.ts @@ -54,6 +54,38 @@ import {Component} from "@angular/core";
mining
+
+ +
by
+
+
+ +
cc
+
+
+ +
twitter
+
+
+ +
facebook
+
+
+ +
linkedin
+
+
+ +
slideshare
+
+
+ +
youtube
+
+
+ +
newsletter
+

Usage

diff --git a/utils/icons/icons-preview/icons-preview.module.ts b/utils/icons/icons-preview/icons-preview.module.ts index 5ce06c31..31f3916b 100644 --- a/utils/icons/icons-preview/icons-preview.module.ts +++ b/utils/icons/icons-preview/icons-preview.module.ts @@ -15,7 +15,9 @@ import { orcid_add, orcid_bin, quotes, - restricted + restricted, + by, + cc, twitter, facebook, linkedin, slideshare, youtube, newsletter } from "../icons"; @NgModule({ @@ -27,6 +29,6 @@ import { }) export class IconsPreviewModule { constructor(private iconsService: IconsService) { - this.iconsService.registerIcons([book, database, cog, earth, incognito, restricted, graph, filters, orcid_add, orcid_bin, link, quotes, mining]) + this.iconsService.registerIcons([book, database, cog, earth, incognito, restricted, graph, filters, orcid_add, orcid_bin, link, quotes, mining, by, cc, twitter, facebook, linkedin, slideshare, youtube, newsletter]) } } diff --git a/utils/icons/icons.component.ts b/utils/icons/icons.component.ts index e44a1468..6ed6b574 100644 --- a/utils/icons/icons.component.ts +++ b/utils/icons/icons.component.ts @@ -46,7 +46,7 @@ export interface StopRule { @Component({ selector: 'icon', template: ` - + {{iconName}} @@ -125,6 +125,8 @@ export class IconsComponent implements AfterViewInit, OnChanges { public stopRules: StopRule[]= [{class: 'start', offset: 0}, {class: 'end', offset: 100}]; @ViewChild("icon") public icon: ElementRef; + @Input() + public preserveColor: boolean = false; constructor(private iconsService: IconsService, private cdr: ChangeDetectorRef) {} diff --git a/utils/icons/icons.ts b/utils/icons/icons.ts index 1a6447dd..ebd3ff0f 100644 --- a/utils/icons/icons.ts +++ b/utils/icons/icons.ts @@ -3,30 +3,6 @@ export interface Icon { data: string } -/** @deprecated */ -export const arrow_left: Icon = { - name: 'arrow_left', - data: '' -} - -/** @deprecated */ -export const arrow_right: Icon = { - name: 'arrow_right', - data: '' -}; - -/** @deprecated */ -export const arrow_up: Icon = { - name: 'arrow_up', - data: '' -} - -/** @deprecated */ -export const arrow_down: Icon = { - name: 'arrow_down', - data: '' -} - export const book: Icon = { name: 'book', data: '' @@ -47,137 +23,6 @@ export const earth: Icon = { data: '' } -/** @deprecated */ -export const edit: Icon = { - name: 'edit', - data: '' -} - -/** @deprecated - * - * Use delete - * */ -export const remove: Icon = { - name: 'remove', - data: '' -} - -/** @deprecated - * Use visibility - * */ -export const preview: Icon = { - name: 'preview', - data: '' -} - -/** @deprecated */ -export const bullet: Icon = { - name: 'bullet', - data: '' -} - -/** @deprecated */ -export const remove_circle = { - name: 'remove_circle', - data: '' -} - -/** @deprecated */ -export const remove_circle_outline = { - name: 'remove_circle_outline', - data: '' -} - -/** @deprecated */ -export const person_add = { - name: 'person_add', - data: '' -} - -/** @deprecated */ -export const cloud_upload = { - name: 'cloud_upload', - data: '' -} - -/** @deprecated */ -export const add = { - name: 'add', - data: '' -} - -/** @deprecated */ -export const group = { - name: 'group', - data: '' -} - -/** @deprecated */ -export const lock = { - name: 'lock', - data: '' -} - -/** @deprecated */ -export const search = { - name: 'search', - data: '' -} - -/** @deprecated */ -export const refresh = { - name: 'refresh', - data: '' -} - -/** @deprecated */ -export const close = { - name: 'close', - data: '' -} - -/** @deprecated */ -export const done = { - name: 'done', - data: '' -} - -/** @deprecated */ -export const mail = { - name: 'mail', - data: '' -} - -/** @deprecated */ -export const photo = { - name: 'photo', - data: '' -} - -/** @deprecated */ -export const check_circle_outlined = { - name: 'check_circle_outlined', - data: '' -} - -/** @deprecated */ -export const reset = { - name: 'reset', - data: '' -} - -/** @deprecated */ -export const send = { - name: 'send', - data: '' -} - -/** @deprecated */ -export const print = { - name: 'print', - data: '' -} - export const incognito = { name: 'incognito', data: '' @@ -223,4 +68,43 @@ export const mining = { data: '' } +export const by = { + name: 'by', + data: '' +} + +export const cc = { + name: 'cc', + data: '' +} + +export const twitter = { + name: 'twitter', + data: '' +} + +export const facebook = { + name: 'facebook', + data: '' +} + +export const linkedin = { + name: 'linkedin', + data: '' +} + +export const slideshare = { + name: 'slideshare', + data: '' +} + +export const youtube = { + name: 'youtube', + data: '' +} + +export const newsletter = { + name: 'newsletter', + data: '' +} /** Add new icon under this line to be sure that it will be added on preview */