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,6 +405,19 @@
<!-- right box/ sidebar-->
<ng-container *ngIf="resultLandingInfo && hasRightSidebarInfo">
<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">
<div class="uk-overflow-auto uk-height-1-1">
<ng-container *ngTemplateOutlet="right_column"></ng-container>
</div>
</div>
</div>
</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;">
@ -421,15 +434,7 @@
</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">
<div class="uk-overflow-auto uk-height-1-1">
<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">
@ -481,8 +486,6 @@
</div>
</div>
</ng-template>
</ng-container>
</div>
</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>