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--> <!-- right box/ sidebar-->
<ng-container *ngIf="resultLandingInfo && hasRightSidebarInfo"> <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" <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" class="uk-offcanvas-switcher uk-flex uk-flex-center uk-flex-middle uk-hidden@m"
(click)="rightSidebarOffcanvasClicked = true;"> (click)="rightSidebarOffcanvasClicked = true;">
@ -421,15 +434,7 @@
</div> </div>
</div> </div>
</div> </div>
</ng-container>
<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-template #right_column> <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"> <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>
</div> </div>
</ng-template> </ng-template>
</ng-container>
</div>
</div> </div>
</div> </div>

View File

@ -87,8 +87,8 @@ declare var UIkit: any;
</span> </span>
</ng-container> </ng-container>
<modal-alert #grantModal (alertOutput)="openGrantWindow()"> <modal-alert #grantModal [overflowBody]=false (alertOutput)="openGrantWindow()">
<div class="uk-text-center"> <div>
<div>{{requestGrantMessage}}</div> <div>{{requestGrantMessage}}</div>
<!-- <div class="uk-margin-medium-top uk-align-right">--> <!-- <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 { public static getQueryPrefix(type: "all" | "registries" | "journals" | "compatible" | "deposit" | "services"): string {
if(properties.environment == "production") { // if(properties.environment == "production") {
if (type == "registries") { // if (type == "registries") {
return ' (datasourcetypeuiid = "entityregistry" or datasourcetypeuiid = "entityregistry::products" or datasourcetypeuiid = "entityregistry::repositories" ' + // return ' (datasourcetypeuiid = "entityregistry" or datasourcetypeuiid = "entityregistry::products" or datasourcetypeuiid = "entityregistry::repositories" ' +
'or datasourcetypeuiid = "entityregistry::organizations" or datasourcetypeuiid = "entityregistry::researchers" ) '; // 'or datasourcetypeuiid = "entityregistry::organizations" or datasourcetypeuiid = "entityregistry::researchers" ) ';
//
} else if (type == "journals") { // } else if (type == "journals") {
// return ' not(datasourcecompatibilityid = UNKNOWN) not(datasourcecompatibilityid = notCompatible) and (datasourcetypeuiid exact "pubsrepository::journal" or datasourcetypeuiid exact "aggregator::pubsrepository::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" ) '; // return 'oaftype exact datasource not datasourcecompatibilityid = notCompatible and (datasourcetypeuiid exact "pubsrepository::journal" or datasourcetypeuiid exact "aggregator::pubsrepository::journals" ) ';
//
} else if (type == "compatible") { // } else if (type == "compatible") {
return ' oaftype exact datasource and datasourcecompatibilityid <> notCompatible and datasourcetypeuiid <> other and datasourcetypeuiid <> "pubsrepository::journal" and datasourcetypeuiid <> "aggregator::pubsrepository::journals" '; // return ' oaftype exact datasource and datasourcecompatibilityid <> notCompatible and datasourcetypeuiid <> other and datasourcetypeuiid <> "pubsrepository::journal" and datasourcetypeuiid <> "aggregator::pubsrepository::journals" ';
} else if (type == "deposit") { // } else if (type == "deposit") {
return ' oaftype exact datasource '; // return ' oaftype exact datasource ';
} else { // } else {
return ""; // return "";
} // }
}else{ // }else{
if (type == "registries") { if (type == "registries") {
return 'datasourcetypeuiname exact "Registry"'; return 'datasourcetypeuiname exact "Registry"';
} else if (type == "journals") { } else if (type == "journals") {
@ -77,7 +77,7 @@ export class DatasourcesHelperClass {
} else { } else {
return ""; return "";
} }
} // }
} }
public static createFilters(type: "all" | "registries" | "journals" | "compatible" | "deposit" | "services"): Filter[] { 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 {AlertModal} from "../../utils/modal/alert";
import {Subscriber} from "rxjs"; import {Subscriber} from "rxjs";
import {IndexInfoService} from "../../utils/indexInfo.service"; import {IndexInfoService} from "../../utils/indexInfo.service";
import {Background} from "../../utils/background-utils";
export interface SearchForm { export interface SearchForm extends Background {}
class: string,
dark: boolean
}
declare var UIkit: any; declare var UIkit: any;

View File

@ -7,7 +7,7 @@
<div #drop id="quick-contact" class="uk-drop" <div #drop id="quick-contact" class="uk-drop"
uk-drop="mode: click; pos: top-right; animation: uk-animation-fade; offset: 20"> 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 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"> <div class="uk-text-small">
Send a message Send a message
</div> </div>

View File

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