From ac25e160fe41df9fd9e2169e4bb4089f0bceb6e9 Mon Sep 17 00:00:00 2001 From: Alex Martzios Date: Thu, 29 Sep 2022 12:09:37 +0300 Subject: [PATCH] Monitor - Add color coding in browse dashboards --- .../portal-search-result.component.html | 2 +- .../portal-search-result.component.less | 23 +++++++++++++++++++ .../portal-search-result.component.ts | 3 ++- 3 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 searchPages/searchUtils/portal-search-result.component.less diff --git a/searchPages/searchUtils/portal-search-result.component.html b/searchPages/searchUtils/portal-search-result.component.html index 60975ab2..3a3b6c91 100644 --- a/searchPages/searchUtils/portal-search-result.component.html +++ b/searchPages/searchUtils/portal-search-result.component.html @@ -3,7 +3,7 @@
  • + [ngClass]="result.type" [class.uk-disabled]="!hasPermission(result)">
    diff --git a/searchPages/searchUtils/portal-search-result.component.less b/searchPages/searchUtils/portal-search-result.component.less new file mode 100644 index 00000000..0381bcbf --- /dev/null +++ b/searchPages/searchUtils/portal-search-result.component.less @@ -0,0 +1,23 @@ +@import (reference) "~src/assets/openaire-theme/less/color.less"; + +.setType(@color) { + border-left: 4px solid fade(@color, 30%); + + & .type { + color: @color; + } +} + +.uk-card { + &.funder { + .setType(@funder-color); + } + + &.ri { + .setType(@ri-color); + } + + &.organization { + .setType(@organization-color); + } +} \ No newline at end of file diff --git a/searchPages/searchUtils/portal-search-result.component.ts b/searchPages/searchUtils/portal-search-result.component.ts index 28f0036f..dfc77c92 100644 --- a/searchPages/searchUtils/portal-search-result.component.ts +++ b/searchPages/searchUtils/portal-search-result.component.ts @@ -10,7 +10,8 @@ import {StringUtils} from '../../utils/string-utils.class'; @Component({ selector: 'portal-search-result', - templateUrl: 'portal-search-result.component.html' + templateUrl: 'portal-search-result.component.html', + styleUrls: ['portal-search-result.component.less'] }) export class PortalSearchResultComponent implements OnInit{