[develop]: Result preview add modifier class and hover behaviour.
This commit is contained in:
parent
054d7ff51e
commit
ab4d715454
|
@ -1,4 +1,4 @@
|
|||
<div *ngIf="result" class="uk-card" [class.uk-card-default]="isMobile">
|
||||
<div *ngIf="result" class="uk-card uk-card-hover" [ngClass]="modifier">
|
||||
<div class="uk-padding-small">
|
||||
<div>
|
||||
<div class="uk-grid uk-flex uk-flex-middle">
|
||||
|
|
|
@ -7,7 +7,7 @@ import {properties} from "../../../../environments/environment";
|
|||
import {Identifier, StringUtils} from "../string-utils.class";
|
||||
import {OpenaireEntities} from "../properties/searchFields";
|
||||
import {HelperFunctions} from "../HelperFunctions.class";
|
||||
import {NumberUtils} from '../../utils/number-utils.class';
|
||||
import {NumberUtils} from '../number-utils.class';
|
||||
|
||||
@Component({
|
||||
selector: 'result-preview',
|
||||
|
@ -29,6 +29,7 @@ export class ResultPreviewComponent implements OnInit, OnChanges {
|
|||
* */
|
||||
@Input() isCard: boolean = false;
|
||||
@Input() isMobile: boolean = false;
|
||||
@Input() modifier: 'uk-card-default' | null = null;
|
||||
public routerHelper: RouterHelper = new RouterHelper();
|
||||
public urlParam: string;
|
||||
public url: string;
|
||||
|
@ -54,6 +55,9 @@ export class ResultPreviewComponent implements OnInit, OnChanges {
|
|||
public embed: boolean = false;
|
||||
|
||||
ngOnInit(): void {
|
||||
if(this.isMobile) {
|
||||
this.modifier = "uk-card-default";
|
||||
}
|
||||
if (this.hasLink) {
|
||||
if (this.result.resultType === "publication") {
|
||||
this.urlParam = "articleId";
|
||||
|
|
Loading…
Reference in New Issue