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

This commit is contained in:
Konstantinos Triantafyllou 2022-08-01 22:26:09 +03:00
commit a42140bb1c
6 changed files with 45 additions and 5 deletions

View File

@ -1,4 +1,4 @@
<div class="linking">
<div class="linking uk-background-default">
<div class="uk-container uk-container-large uk-section uk-section-small uk-padding-remove-bottom">
<div class="uk-padding-small uk-padding-remove-horizontal">
<breadcrumbs [breadcrumbs]="breadcrumbs"></breadcrumbs>

View File

@ -23,6 +23,44 @@ export class Layout {
variables['@general-search-form-background-position'] = options.backgrounds.form.position;
variables['@base-body-background'] = options.backgrounds.light.color;
}
if(options.buttons){
//general
variables['@button-border-width'] = options.buttons.lightBackground.borderWidth + "px";
variables['@button-border-radius'] = options.buttons.lightBackground.borderRadius + "px";
// default -> on dark background todo check again when we have sucj=h buttons
variables['@button-default-background'] = options.buttons.darkBackground.backgroundColor;
variables['@button-default-color'] = options.buttons.darkBackground.color;
variables['@button-default-border'] = options.buttons.darkBackground.borderColor;
variables['@button-default-hover-background'] = options.buttons.darkBackground.onHover.backgroundColor;
variables['@button-default-hover-color'] = options.buttons.darkBackground.onHover.color;
variables['@button-default-hover-border'] = options.buttons.darkBackground.onHover.borderColor;
variables['@button-default-active-background'] = options.buttons.darkBackground.onHover.backgroundColor;
variables['@button-default-active-color'] = options.buttons.darkBackground.onHover.color;
variables['@button-default-active-border'] = options.buttons.darkBackground.onHover.borderColor;
// primary
variables['@button-primary-background'] = options.buttons.lightBackground.backgroundColor;
variables['@button-primary-color'] = options.buttons.lightBackground.color;
variables['@button-primary-border'] = options.buttons.lightBackground.borderColor;
variables['@button-primary-hover-background'] = options.buttons.lightBackground.onHover.backgroundColor;
variables['@button-primary-hover-color'] = options.buttons.lightBackground.onHover.color;
variables['@button-primary-hover-border'] = options.buttons.lightBackground.onHover.borderColor;
variables['@button-primary-active-background'] = options.buttons.lightBackground.onHover.backgroundColor;
variables['@button-primary-active-color'] = options.buttons.lightBackground.onHover.color;
variables['@button-primary-active-border'] = options.buttons.lightBackground.onHover.borderColor;
// secondary
variables['@button-secondary-background'] = options.buttons.lightBackground.color;
variables['@button-secondary-color'] = options.buttons.lightBackground.backgroundColor;
variables['@button-secondary-border'] = options.buttons.lightBackground.backgroundColor;
variables['@button-secondary-hover-background'] = options.buttons.lightBackground.backgroundColor;
variables['@button-secondary-hover-color'] = options.buttons.lightBackground.color;
variables['@button-secondary-hover-border'] = options.buttons.lightBackground.borderColor;
variables['@button-secondary-active-background'] = options.buttons.lightBackground.backgroundColor;
variables['@button-secondary-active-color'] = options.buttons.lightBackground.color;
variables['@button-secondary-active-border'] = options.buttons.lightBackground.borderColor;
}
return variables;
}
return null;

View File

@ -78,7 +78,7 @@ export class EntitiesSelectionComponent {
}
if(showPage[this.simpleView ? this.properties.searchLinkToResults : this.properties.searchLinkToAdvancedResults]
&& (showEntity["publication"] || showEntity["dataset"] || showEntity["software"] || showEntity["orp"])) {
this.entities.push({label: OpenaireEntities.RESULTS, value: 'result'});
this.entities.push({label: OpenaireEntities.RESULTS, value: 'result', tooltip: OpenaireEntities.PUBLICATIONS+', '+OpenaireEntities.DATASETS+', '+OpenaireEntities.SOFTWARE+', '+OpenaireEntities.OTHER});
}
if(showPage[this.simpleView ? this.properties.searchLinkToProjects : this.properties.searchLinkToAdvancedProjects] && showEntity["project"]) {
this.entities.push({label: OpenaireEntities.PROJECTS, value: 'project'});

View File

@ -20,8 +20,8 @@ export class LayoutService {
}
}
}
createCSS( pid: string, suffix = null, layout = null): Observable<any> {
return this.http.post("http://scoobydoo.di.uoa.gr:4200/build-css/" + (layout?"preview/":"") + pid + (suffix?("/"+ suffix):""), layout );
createCSS( pid: string, connectPortalUrl:string, suffix = null, layout = null): Observable<any> {
return this.http.post(connectPortalUrl + "/build-css/" + (layout?"preview/":"") + pid + (suffix?("/"+ suffix):""), layout );
}
saveLayout(properties: EnvProperties, pid: string, layout: Layout): Observable<Layout> {

View File

@ -27,6 +27,7 @@ export interface Option {
iconClass?: string,
value: any,
label: string,
tooltip?: string,
disabled?: boolean
}
@ -143,7 +144,7 @@ declare var UIkit;
<li *ngFor="let option of filteredOptions; let i=index" [class.uk-active]="(formControl.value === option.value) || selectedIndex === i">
<a (click)="selectOption(option, $event)"
[class]="option.disabled ? 'uk-disabled uk-text-muted' : ''">
<span [attr.uk-tooltip]="(tooltip)?('title: ' + option.label + '; delay: 500; pos:bottom-left'):null">{{option.label}}</span>
<span [attr.uk-tooltip]="(tooltip)?('title: ' + (option.tooltip ? option.tooltip : option.label) + '; delay: 500; pos:bottom-left'):null">{{option.label}}</span>
</a>
</li>
</ul>

View File

@ -143,4 +143,5 @@ export interface EnvProperties {
footerGrantText?: string;
egiNotebookLink?: string;
portalBuildTime?;
connectPortalUrl?;
}