Merge branch 'new-theme' of code-repo.d4science.org:MaDgIK/openaire-library into new-theme

This commit is contained in:
Konstantinos Triantafyllou 2022-06-20 13:11:29 +03:00
commit d01ba65537
8 changed files with 115 additions and 97 deletions

View File

@ -405,23 +405,6 @@
<!-- right box/ sidebar-->
<ng-container *ngIf="resultLandingInfo && hasRightSidebarInfo">
<div id="right-sidebar-switcher" uk-toggle href="#right-column-offcanvas"
class="uk-offcanvas-switcher uk-flex uk-flex-center uk-flex-middle uk-hidden@m"
(click)="rightSidebarOffcanvasClicked = true;">
<icon name="more" ratio="1.5" customClass="uk-text-primary" flex="true" visuallyHidden="sidebar"></icon>
</div>
<div id="right-column-offcanvas" class="uk-offcanvas" uk-offcanvas="flip: true; overlay: true;">
<div class="uk-offcanvas-bar">
<button class="uk-offcanvas-close uk-close uk-icon" type="button"
(click)="rightSidebarOffcanvasClicked = false">
<icon name="close" ratio="1.5" visuallyHidden="close"></icon>
</button>
<div *ngIf="rightSidebarOffcanvasClicked">
<ng-container *ngTemplateOutlet="right_column"></ng-container>
</div>
</div>
</div>
<div *ngIf="!rightSidebarOffcanvasClicked" class="landing-right-sidebar-min-width uk-width-1-3 uk-width-1-4@l uk-padding-remove landing-background-grey-color uk-text-small uk-visible@m"
[class.uk-animation-right]="viewAll">
<div class="uk-sticky landing-sidebar-height" uk-sticky="bottom: true" [attr.offset]="offset">
@ -430,59 +413,79 @@
</div>
</div>
</div>
<ng-template #right_column>
<div class="uk-margin-medium-top uk-list uk-list-large uk-padding uk-padding-remove-vertical" [class.uk-list-divider]="!viewAll">
<!-- EOSC Services-->
<!-- 1 link -->
<div *ngIf="resultLandingInfo.eoscSubjects?.length == 1 && (properties.adminToolsPortalType == 'explore' || properties.adminToolsPortalType == 'eosc')
&& (!viewAll || viewAll=='egiNotebook')">
<a class="uk-link-text uk-text-bold custom-external"
target="_blank" [href]="resultLandingInfo.eoscSubjects[0].link">
<img src="assets/common-assets/eosc-logo.png"
loading="lazy" alt="eosc_logo" style="width:27px; height:27px">
<span class="uk-margin-small-left uk-text-uppercase"><u>Check compatible EOSC services</u></span>
</a>
</div>
<!-- more than 1 links -->
<div *ngIf="resultLandingInfo.eoscSubjects?.length > 1 && (properties.adminToolsPortalType == 'explore' || properties.adminToolsPortalType == 'eosc')
&& (!viewAll || viewAll=='egiNotebook')">
<a class="uk-link-text uk-text-bold">
<img src="assets/common-assets/eosc-logo.png"
loading="lazy" alt="eosc_logo" style="width:27px; height:27px">
<span class="uk-margin-small-left uk-text-uppercase"><u>Check compatible EOSC services</u></span>
</a>
<div class="uk-dropdown" uk-dropdown="pos: bottom-right; offset: 10; delay-hide: 0; mode:click">
<ul class="uk-nav uk-dropdown-nav">
<li *ngFor="let item of resultLandingInfo.eoscSubjects">
<a [href]="item.link" target="_blank" class="custom-external">{{item.value}}</a>
</li>
</ul>
</div>
</div>
<div *ngIf="resultLandingInfo.sdg && resultLandingInfo.sdg.length > 0 && (!viewAll || viewAll=='sdg')">
<sdg [subjects]="resultLandingInfo.sdg" (viewAllClicked)="viewAll=$event" (feedbackClicked)="feedbackClicked('Sustainable Development Goals (SDGs)')"></sdg>
</div>
<div *ngIf="resultLandingInfo.fos && resultLandingInfo.fos.length > 0 && (!viewAll || viewAll=='fos')">
<fos [subjects]="resultLandingInfo.fos" (viewAllClicked)="viewAll=$event" (feedbackClicked)="feedbackClicked('Fields of Science and Technology (FOS)')"></fos>
</div>
<!-- Funded By -->
<div *ngIf="resultLandingInfo.fundedByProjects && resultLandingInfo.fundedByProjects.length > 0 && (!viewAll || viewAll=='fundedBy')">
<fundedBy [fundedByProjects]="resultLandingInfo.fundedByProjects" (viewAllClicked)="viewAll=$event"></fundedBy>
</div>
<!-- Communities -->
<div *ngIf="resultLandingInfo.contexts && resultLandingInfo.contexts.length > 0 && !noCommunities && (!viewAll || viewAll=='relatedTo')">
<relatedTo [contexts]="resultLandingInfo.contexts" [viewAll]="viewAll=='relatedTo'"
(viewAllClicked)="viewAll=$event" (noCommunities)="noCommunities = true"></relatedTo>
</div>
<!-- Download From -->
<div *ngIf="resultLandingInfo.hostedBy_collectedFrom && resultLandingInfo.hostedBy_collectedFrom.length > 0 && (!viewAll || viewAll=='availableOn')">
<availableOn [availableOn]="resultLandingInfo.hostedBy_collectedFrom" (viewAllClicked)="viewAll=$event"></availableOn>
</div>
</div>
</ng-template>
</ng-container>
</div>
<!-- right box/ sidebar-->
<ng-container *ngIf="!showFeedback && resultLandingInfo && hasRightSidebarInfo">
<div id="right-sidebar-switcher" uk-toggle href="#right-column-offcanvas"
class="uk-offcanvas-switcher uk-flex uk-flex-center uk-flex-middle uk-hidden@m"
(click)="rightSidebarOffcanvasClicked = true;">
<icon name="more" ratio="1.5" customClass="uk-text-primary" flex="true" visuallyHidden="sidebar"></icon>
</div>
<div id="right-column-offcanvas" class="uk-offcanvas" uk-offcanvas="flip: true; overlay: true;">
<div class="uk-offcanvas-bar">
<button class="uk-offcanvas-close uk-close uk-icon" type="button"
(click)="rightSidebarOffcanvasClicked = false">
<icon name="close" ratio="1.5" visuallyHidden="close"></icon>
</button>
<div *ngIf="rightSidebarOffcanvasClicked">
<ng-container *ngTemplateOutlet="right_column"></ng-container>
</div>
</div>
</div>
</ng-container>
<ng-template #right_column>
<div class="uk-margin-medium-top uk-list uk-list-large uk-padding uk-padding-remove-vertical" [class.uk-list-divider]="!viewAll">
<!-- EOSC Services-->
<!-- 1 link -->
<div *ngIf="resultLandingInfo.eoscSubjects?.length == 1 && (properties.adminToolsPortalType == 'explore' || properties.adminToolsPortalType == 'eosc')
&& (!viewAll || viewAll=='egiNotebook')">
<a class="uk-link-text uk-text-bold custom-external"
target="_blank" [href]="resultLandingInfo.eoscSubjects[0].link">
<img src="assets/common-assets/eosc-logo.png"
loading="lazy" alt="eosc_logo" style="width:27px; height:27px">
<span class="uk-margin-small-left uk-text-uppercase"><u>Check compatible EOSC services</u></span>
</a>
</div>
<!-- more than 1 links -->
<div *ngIf="resultLandingInfo.eoscSubjects?.length > 1 && (properties.adminToolsPortalType == 'explore' || properties.adminToolsPortalType == 'eosc')
&& (!viewAll || viewAll=='egiNotebook')">
<a class="uk-link-text uk-text-bold">
<img src="assets/common-assets/eosc-logo.png"
loading="lazy" alt="eosc_logo" style="width:27px; height:27px">
<span class="uk-margin-small-left uk-text-uppercase"><u>Check compatible EOSC services</u></span>
</a>
<div class="uk-dropdown" uk-dropdown="pos: bottom-right; offset: 10; delay-hide: 0; mode:click">
<ul class="uk-nav uk-dropdown-nav">
<li *ngFor="let item of resultLandingInfo.eoscSubjects">
<a [href]="item.link" target="_blank" class="custom-external">{{item.value}}</a>
</li>
</ul>
</div>
</div>
<div *ngIf="resultLandingInfo.sdg && resultLandingInfo.sdg.length > 0 && (!viewAll || viewAll=='sdg')">
<sdg [subjects]="resultLandingInfo.sdg" (viewAllClicked)="viewAll=$event" (feedbackClicked)="feedbackClicked('Sustainable Development Goals (SDGs)')"></sdg>
</div>
<div *ngIf="resultLandingInfo.fos && resultLandingInfo.fos.length > 0 && (!viewAll || viewAll=='fos')">
<fos [subjects]="resultLandingInfo.fos" (viewAllClicked)="viewAll=$event" (feedbackClicked)="feedbackClicked('Fields of Science and Technology (FOS)')"></fos>
</div>
<!-- Funded By -->
<div *ngIf="resultLandingInfo.fundedByProjects && resultLandingInfo.fundedByProjects.length > 0 && (!viewAll || viewAll=='fundedBy')">
<fundedBy [fundedByProjects]="resultLandingInfo.fundedByProjects" (viewAllClicked)="viewAll=$event"></fundedBy>
</div>
<!-- Communities -->
<div *ngIf="resultLandingInfo.contexts && resultLandingInfo.contexts.length > 0 && !noCommunities && (!viewAll || viewAll=='relatedTo')">
<relatedTo [contexts]="resultLandingInfo.contexts" [viewAll]="viewAll=='relatedTo'"
(viewAllClicked)="viewAll=$event" (noCommunities)="noCommunities = true"></relatedTo>
</div>
<!-- Download From -->
<div *ngIf="resultLandingInfo.hostedBy_collectedFrom && resultLandingInfo.hostedBy_collectedFrom.length > 0 && (!viewAll || viewAll=='availableOn')">
<availableOn [availableOn]="resultLandingInfo.hostedBy_collectedFrom" (viewAllClicked)="viewAll=$event"></availableOn>
</div>
</div>
</ng-template>
</div>
</div>

View File

@ -87,8 +87,8 @@ declare var UIkit: any;
</span>
</ng-container>
<modal-alert #grantModal (alertOutput)="openGrantWindow()">
<div class="uk-text-center">
<modal-alert #grantModal [overflowBody]=false (alertOutput)="openGrantWindow()">
<div>
<div>{{requestGrantMessage}}</div>
<!-- <div class="uk-margin-medium-top uk-align-right">-->

View File

@ -47,23 +47,23 @@ export class DatasourcesHelperClass {
}
}
public static getQueryPrefix(type: "all" | "registries" | "journals" | "compatible" | "deposit" | "services"): string {
if(properties.environment == "production") {
if (type == "registries") {
return ' (datasourcetypeuiid = "entityregistry" or datasourcetypeuiid = "entityregistry::products" or datasourcetypeuiid = "entityregistry::repositories" ' +
'or datasourcetypeuiid = "entityregistry::organizations" or datasourcetypeuiid = "entityregistry::researchers" ) ';
} else if (type == "journals") {
// return ' not(datasourcecompatibilityid = UNKNOWN) not(datasourcecompatibilityid = notCompatible) and (datasourcetypeuiid exact "pubsrepository::journal" or datasourcetypeuiid exact "aggregator::pubsrepository::journals" ) ';
return 'oaftype exact datasource not datasourcecompatibilityid = notCompatible and (datasourcetypeuiid exact "pubsrepository::journal" or datasourcetypeuiid exact "aggregator::pubsrepository::journals" ) ';
} else if (type == "compatible") {
return ' oaftype exact datasource and datasourcecompatibilityid <> notCompatible and datasourcetypeuiid <> other and datasourcetypeuiid <> "pubsrepository::journal" and datasourcetypeuiid <> "aggregator::pubsrepository::journals" ';
} else if (type == "deposit") {
return ' oaftype exact datasource ';
} else {
return "";
}
}else{
// if(properties.environment == "production") {
// if (type == "registries") {
// return ' (datasourcetypeuiid = "entityregistry" or datasourcetypeuiid = "entityregistry::products" or datasourcetypeuiid = "entityregistry::repositories" ' +
// 'or datasourcetypeuiid = "entityregistry::organizations" or datasourcetypeuiid = "entityregistry::researchers" ) ';
//
// } else if (type == "journals") {
// // return ' not(datasourcecompatibilityid = UNKNOWN) not(datasourcecompatibilityid = notCompatible) and (datasourcetypeuiid exact "pubsrepository::journal" or datasourcetypeuiid exact "aggregator::pubsrepository::journals" ) ';
// return 'oaftype exact datasource not datasourcecompatibilityid = notCompatible and (datasourcetypeuiid exact "pubsrepository::journal" or datasourcetypeuiid exact "aggregator::pubsrepository::journals" ) ';
//
// } else if (type == "compatible") {
// return ' oaftype exact datasource and datasourcecompatibilityid <> notCompatible and datasourcetypeuiid <> other and datasourcetypeuiid <> "pubsrepository::journal" and datasourcetypeuiid <> "aggregator::pubsrepository::journals" ';
// } else if (type == "deposit") {
// return ' oaftype exact datasource ';
// } else {
// return "";
// }
// }else{
if (type == "registries") {
return 'datasourcetypeuiname exact "Registry"';
} else if (type == "journals") {
@ -77,7 +77,7 @@ export class DatasourcesHelperClass {
} else {
return "";
}
}
// }
}
public static createFilters(type: "all" | "registries" | "journals" | "compatible" | "deposit" | "services"): Filter[] {

View File

@ -34,11 +34,9 @@ import {properties} from "../../../../environments/environment";
import {AlertModal} from "../../utils/modal/alert";
import {Subscriber} from "rxjs";
import {IndexInfoService} from "../../utils/indexInfo.service";
import {Background} from "../../utils/background-utils";
export interface SearchForm {
class: string,
dark: boolean
}
export interface SearchForm extends Background {}
declare var UIkit: any;

View File

@ -7,7 +7,7 @@
<div #drop id="quick-contact" class="uk-drop"
uk-drop="mode: click; pos: top-right; animation: uk-animation-fade; offset: 20">
<div class="uk-card uk-card-default uk-box-shadow-default uk-flex uk-flex-column uk-height-1-1">
<div class="uk-card-header uk-padding-small uk-text-center" [ngClass]="background">
<div class="uk-card-header uk-padding-small uk-text-center" [class.uk-light]="backgroundHeader.dark" [ngClass]="backgroundHeader.class">
<div class="uk-text-small">
Send a message
</div>

View File

@ -1,6 +1,8 @@
import {Component, ElementRef, EventEmitter, Input, OnDestroy, OnInit, Output, ViewChild} from '@angular/core';
import {FormGroup} from "@angular/forms";
import {Subscriber} from "rxjs";
import {SearchForm} from "../../searchPages/searchUtils/newSearchPage.component";
import {Background} from "../../utils/background-utils";
declare var UIkit;
@ -17,8 +19,7 @@ export class QuickContactComponent implements OnInit, OnDestroy {
public images: string[] = [];
@Input()
public contact: string = 'contact';
@Input()
public background: string = 'uk-background-primary';
public backgroundHeader: Background = {class: 'uk-background-primary', dark: true};
@Input()
public sending = false;
@Input()
@ -27,6 +28,15 @@ export class QuickContactComponent implements OnInit, OnDestroy {
private subscriptions: any[] = [];
@ViewChild('drop') drop: ElementRef;
@Input()
set background(background: Background | string) {
if(typeof background === 'string') {
this.backgroundHeader = {class: background, dark: true}
} else {
this.backgroundHeader = background;
}
}
ngOnInit() {
if (typeof document !== 'undefined') {
this.subscriptions.push(UIkit.util.on(document, 'beforehide', '#quick-contact', (event) => {
@ -41,6 +51,9 @@ export class QuickContactComponent implements OnInit, OnDestroy {
this.showDrop = false;
}));
}
if(typeof this.background === 'string' ) {
this.background = {class: this.background, dark: true};
}
}
ngOnDestroy() {

View File

@ -0,0 +1,4 @@
export interface Background {
class: string,
dark: boolean
}

View File

@ -5,9 +5,9 @@ declare var UIkit: any;
@Component({
selector: 'modal-alert',
template: `
<div #element class="uk-modal" [class.uk-modal-container]="large" [id]="id" uk-modal="container: #here">
<div #element class="uk-modal" [class.uk-modal-container]="large" [id]="id" uk-modal="container: #modal-container">
<div class="uk-modal-dialog">
<div class="uk-modal-header uk-flex uk-flex-middle uk-flex-between" [ngClass]="classTitle">
<div class="uk-modal-header uk-text-left uk-flex uk-flex-middle uk-flex-between" [ngClass]="classTitle">
<div class="uk-modal-title" [hidden]=!alertHeader>
<h5 class="uk-margin-remove">{{alertTitle}}</h5>
</div>