@@ -176,14 +203,6 @@
-
+
diff --git a/sharedComponents/bottom.component.ts b/sharedComponents/bottom.component.ts
index 25ec88ae..8af2c7f3 100644
--- a/sharedComponents/bottom.component.ts
+++ b/sharedComponents/bottom.component.ts
@@ -5,6 +5,7 @@ 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';
@Component({
selector: 'bottom',
@@ -25,9 +26,10 @@ 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;
+@Input() properties:EnvProperties = properties;
@Input() darkBackground:boolean=true;
@Input() centered:boolean=false;
+@Input() shortView: boolean = false;
sectionClass= "uk-section-primary";
subs: Subscription[] = [];
diff --git a/sharedComponents/menu.ts b/sharedComponents/menu.ts
index ec65630f..6e478988 100644
--- a/sharedComponents/menu.ts
+++ b/sharedComponents/menu.ts
@@ -7,12 +7,13 @@ export class MenuItem {
entitiesRequired: string[] = []; // openaire entities used in page "publication, dataset, organization, software, project, datasource"
routeRequired: string[] = []; // the routes that if aren't enable the menu item doesn't make sense
params: any = {};
+ fragment: string;
markAsActive: boolean;
items: MenuItem[] = [];
icon: string;
open: boolean;
- constructor(id: string, title: string, url: string, route: string, needsAuthorization: boolean, entitiesRequired: string[], routeRequired: string[], params, icon=null) {
+ constructor(id: string, title: string, url: string, route: string, needsAuthorization: boolean, entitiesRequired: string[], routeRequired: string[], params, icon=null, fragment = null) {
this.id = id;
this.title = title;
this.url = url;
@@ -24,6 +25,7 @@ export class MenuItem {
this.markAsActive = true;
this.items = [];
this.icon = icon;
+ this.fragment = fragment;
}
public setMarkAsActive(showActive: boolean) {
diff --git a/sharedComponents/navigationBar.component.html b/sharedComponents/navigationBar.component.html
index efd4aa13..ebc4ede1 100644
--- a/sharedComponents/navigationBar.component.html
+++ b/sharedComponents/navigationBar.component.html
@@ -87,7 +87,7 @@
0 && isEnabled([menu.rootItem.route], showPage) || !menu.rootItem.routeRequired "
routerLinkActive="uk-link" routerLink="{{menu.rootItem.route}}"
- [queryParams]=menu.rootItem.params
+ [queryParams]="menu.rootItem.params" [fragment]="menu.rootItem.fragment"
class="uk-offcanvas-close custom-offcanvas-close">{{menu.rootItem.title}}
0"
routerLinkActive="uk-link" href="{{menu.rootItem.url}}" target="_blank"
@@ -99,7 +99,7 @@
0 || submenu.url.length > 0)">
0" routerLinkActive="uk-link"
- routerLink="{{submenu.route}}" [queryParams]=submenu.params
+ routerLink="{{submenu.route}}" [queryParams]=submenu.params [fragment]="submenu.fragment"
class="uk-offcanvas-close custom-offcanvas-close">{{submenu.title}}
0" routerLinkActive="uk-link"
href="{{submenu.url}}" target="_blank"
@@ -264,7 +264,7 @@
0 && (isEnabled([menu.rootItem.route], showPage) || !menu.rootItem.routeRequired )"
routerLinkActive="uk-link" routerLink="{{menu.rootItem.route}}"
- [queryParams]=menu.rootItem.params> {{menu.rootItem.title}}
+ [queryParams]="menu.rootItem.params" [fragment]="menu.rootItem.fragment"> {{menu.rootItem.title}}
0" routerLinkActive="uk-link"
href="{{menu.rootItem.url}}" target="_blank" aria-expanded="false">{{menu.rootItem.title}}
0 && menu.rootItem.routeRequired && !isEnabled([menu.rootItem.route], showPage) && isAtleastOneEnabled(menu.rootItem.routeRequired, showPage)) "
@@ -279,7 +279,7 @@
0 || submenu.url.length > 0)">
0" routerLinkActive="uk-link"
- routerLink="{{submenu.route}}" [queryParams]=submenu.params>{{submenu.title}}
+ routerLink="{{submenu.route}}" [queryParams]="submenu.params" [fragment]="submenu.fragment">{{submenu.title}}
0" routerLinkActive="uk-link"
href="{{submenu.url}}" target="_blank">{{submenu.title}}
diff --git a/utils/full-page-slider/full-page-slider.component.css b/utils/full-page-slider/full-page-slider.component.css
index 290de04e..32c01643 100644
--- a/utils/full-page-slider/full-page-slider.component.css
+++ b/utils/full-page-slider/full-page-slider.component.css
@@ -1,15 +1,24 @@
.top-bar {
position: fixed;
top: 0;
- left: 0;
+ left: 121px;
height: 100px;
- width: 100%;
+ width: calc(100% - 121px);
+ z-index: 1;
+}
+
+.bottom-bar {
+ position: fixed;
+ bottom: 0;
+ left: 121px;
+ height: 100px;
+ width: calc(100% - 121px);
z-index: 1;
}
section {
position: fixed;
- top:10%;
+ top: 100px;
left: 120px;
height: calc(100% - 100px);
width: calc(100% - 120px);
@@ -23,7 +32,7 @@ section {
width: 120px;
border-right: 1px solid #4687E6;
background-color: white;
- z-index: 2;
+ z-index: 1;
}
.menu .logo {
diff --git a/utils/full-page-slider/full-page-slider.component.ts b/utils/full-page-slider/full-page-slider.component.ts
index 720d0541..afcf74d8 100644
--- a/utils/full-page-slider/full-page-slider.component.ts
+++ b/utils/full-page-slider/full-page-slider.component.ts
@@ -1,12 +1,13 @@
import {AfterContentInit, Component, ContentChildren, Input, OnInit, QueryList} from "@angular/core";
import {SlideComponent} from "./slide.component";
+import {BehaviorSubject, Observable} from 'rxjs';
@Component({
selector: 'fp-slider',
template: `
`,
+
+
+ `,
styleUrls: ['full-page-slider.component.css']
})
export class FullPageSliderComponent implements AfterContentInit {
@@ -46,12 +51,14 @@ export class FullPageSliderComponent implements AfterContentInit {
@Input()
public logoURL;
@Input() topBar: string = null;
+ @Input() hasFooter: boolean = null;
+ @Input() footerClass: string;
public animate: boolean = false;
- public state = 0;
+ public state: BehaviorSubject
= new BehaviorSubject(0);
ngAfterContentInit() {
- this.state = this.initSlide;
- this.setSlides(this.state);
+ this.state.next(this.initSlide);
+ this.setSlides(this.state.value);
}
setSlides(state = 1) {
@@ -64,15 +71,15 @@ export class FullPageSliderComponent implements AfterContentInit {
onWheel(event) {
if (!this.animate) {
this.animate = true;
- if (event.deltaY > 0 && (this.state < this.slides.length)) {
- this.state++;
- this.setSlides(this.state);
+ if (event.deltaY > 0 && (this.state.value < this.slides.length)) {
+ this.state.next(+this.state.value + 1);
+ this.setSlides(this.state.value);
setTimeout(() => {
this.animate = false;
}, 500);
- } else if (event.deltaY < 0 && (this.state !== 1)) {
- this.state--;
- this.setSlides(this.state);
+ } else if (event.deltaY < 0 && (this.state.value !== 1)) {
+ this.state.next(this.state.value - 1);
+ this.setSlides(this.state.value);
setTimeout(() => {
this.animate = false;
}, 500);
@@ -85,11 +92,19 @@ export class FullPageSliderComponent implements AfterContentInit {
public onClick(index: number) {
if (!this.animate) {
this.animate = true;
- this.state = index;
- this.setSlides(this.state);
+ this.state.next(index);
+ this.setSlides(this.state.value);
setTimeout(() => {
this.animate = false;
}, 500);
}
}
+
+ public get stateValue() {
+ return this.state.value;
+ }
+
+ public get stateAsObservable(): Observable {
+ return this.state.asObservable();
+ }
}
diff --git a/utils/full-page-slider/full-page-slider.module.ts b/utils/full-page-slider/full-page-slider.module.ts
index a9366168..204464fa 100644
--- a/utils/full-page-slider/full-page-slider.module.ts
+++ b/utils/full-page-slider/full-page-slider.module.ts
@@ -2,9 +2,10 @@ import {NgModule} from "@angular/core";
import {CommonModule} from "@angular/common";
import {FullPageSliderComponent} from "./full-page-slider.component";
import {SlideComponent} from "./slide.component";
+import {BottomModule} from '../../sharedComponents/bottom.module';
@NgModule({
- imports: [CommonModule],
+ imports: [CommonModule, BottomModule],
declarations: [FullPageSliderComponent, SlideComponent],
exports: [FullPageSliderComponent, SlideComponent],
})
diff --git a/utils/full-page-slider/slide.component.ts b/utils/full-page-slider/slide.component.ts
index 15b7f487..177b7355 100644
--- a/utils/full-page-slider/slide.component.ts
+++ b/utils/full-page-slider/slide.component.ts
@@ -1,4 +1,4 @@
-import {Component} from "@angular/core";
+import {Component, Input} from '@angular/core';
import {animation} from "./animation";
import {transition, trigger} from "@angular/animations";
diff --git a/utils/iframe.component.ts b/utils/iframe.component.ts
index 460d11dc..e76ddade 100644
--- a/utils/iframe.component.ts
+++ b/utils/iframe.component.ts
@@ -5,7 +5,7 @@ import { SafeResourceUrl, DomSanitizer } from '@angular/platform-browser';
selector: 'i-frame',
template: `
-
+
@@ -17,21 +17,22 @@ export class IFrameComponent {
@Input() url ;
@Input() width: number;
@Input() height: number;
+ @Input() unit: string = 'px';
public style: any;
constructor(private sanitizer: DomSanitizer) {
}
ngOnInit() {
this.safeUrl = this.sanitizer.bypassSecurityTrustResourceUrl(this.url);
+ let width = 'width.' + this.unit;
+ let height = 'height.' + this.unit;
if(this.width && this.height) {
- this.style = {
- "width.px": this.width,
- "height.px": this.height
- };
+ this.style = {};
+ this.style[width] = this.width;
+ this.style[height] = this.height;
} else if(this.height) {
- this.style = {
- "height.px": this.height
- };
+ this.style = {};
+ this.style[height] = this.height;
}
}
}
diff --git a/utils/properties/env-properties.ts b/utils/properties/env-properties.ts
index 81bbc4ba..144115ec 100644
--- a/utils/properties/env-properties.ts
+++ b/utils/properties/env-properties.ts
@@ -120,4 +120,5 @@ export interface EnvProperties {
altMetricsAPIURL?: string;
b2noteAPIURL?: string;
adminPortalURL?: string;
+ sushiliteURL?: string;
}