From a5a26bc5936b9bef784322ed2976286b647ed124 Mon Sep 17 00:00:00 2001 From: "konstantina.galouni" Date: Mon, 3 Oct 2022 20:25:37 +0300 Subject: [PATCH] [Aggregator]: Updates in css | Bug fix in isRouteEnabled check. 1. portal.ts & aggregators.ts: [Bug fix] In method "getMockCommunityInfo()" set also pid for community (isRouteEnabled.guard needs it) | Updates in less files (overrides of colors) 2. styles.less: Updated imports (added linking, landing and canada-custom and removed aggregator-custom). 3. numbers.component.ts: Updated default value of @Input() colorClass to "uk-text-primary". 4. connectHelper.ts: In method "getCommunityFromDomain()" added also "aggregator" and "eosc" portal types to set domain on development. --- src/app/openaireLibrary | 2 +- src/app/utils/aggregators.ts | 5 +- src/assets/aggregator-custom.less | 116 ------------------------------ src/assets/canada-custom.less | 52 ++++++++++++++ src/assets/openaire-theme | 2 +- src/styles.less | 4 +- 6 files changed, 60 insertions(+), 121 deletions(-) delete mode 100644 src/assets/aggregator-custom.less create mode 100644 src/assets/canada-custom.less diff --git a/src/app/openaireLibrary b/src/app/openaireLibrary index 3605621..3c1623d 160000 --- a/src/app/openaireLibrary +++ b/src/app/openaireLibrary @@ -1 +1 @@ -Subproject commit 360562178bff4ef9a94b2481b4b84ba9c32e599c +Subproject commit 3c1623d12c2ae6a9a244ee34b3b22ede23f6680c diff --git a/src/app/utils/aggregators.ts b/src/app/utils/aggregators.ts index a335202..473cfac 100644 --- a/src/app/utils/aggregators.ts +++ b/src/app/utils/aggregators.ts @@ -13,6 +13,7 @@ export class AggregatorInfo { graphSectionTitle: string; graphSectionText: string; enableLogin: boolean; + /** @deprecated */ customCss:string; showHeaderAlways:boolean; @@ -104,9 +105,9 @@ export class PortalAggregators { public static getCommunityInfoByMenuId(menuId: string): any { if(PortalAggregators.disabled[menuId]){ - return Portal.getMockCommunityInfo(PortalAggregators.disabled[menuId].entities,PortalAggregators.disabled[menuId].pages); + return Portal.getMockCommunityInfo(menuId, PortalAggregators.disabled[menuId].entities,PortalAggregators.disabled[menuId].pages); } - return Portal.getMockCommunityInfo([],[]); + return Portal.getMockCommunityInfo(menuId, [],[]); } } diff --git a/src/assets/aggregator-custom.less b/src/assets/aggregator-custom.less deleted file mode 100644 index 0f6c964..0000000 --- a/src/assets/aggregator-custom.less +++ /dev/null @@ -1,116 +0,0 @@ -:root { - --portal-main-color: #313179; - --portal-main-contrast: white; - --portal-dark-color: #4687E6; - --openaire-main-color: #313179; - - --explore-portal-color: #D95F2D; - --provide-portal-color: #37C7E9; - --monitor-portal-color: #9ABB55; - --connect-portal-color: #EBB13E; - --develop-portal-color: #DA65AB; - - --explore-portal-lower-tone: #a0462c; - --provide-portal-lower-tone: #3A8FA3; - --monitor-portal-lower-tone: #7c9144; - --connect-portal-lower-tone: #b48536; - --develop-portal-lower-tone: #9f4e7e; -} - - -.tm-toolbar .uk-subnav-line .custom-explore-li { - background:var(--portal-main-color) !important; -} - -.mainPageSearchForm{ - background-image: /*linear-gradient(rgba(255, 255, 255, 0.5),rgba(255, 255, 255, 0.5)),*/ url('home.jpg'); - -} - -.mainPageBottomInfo{ - background: linear-gradient( rgba(255, 255, 255, 0.5),rgba(255, 255, 255, 0.5)), url('home.jpg'); - background-attachment: scroll, scroll; - background-size: auto auto, auto auto; - background-size: cover; - background-attachment: fixed; - box-sizing: border-box; - min-height: calc(100vh - 412.767px); -} -.box-links .uk-card-header:hover { - text-decoration: underline; - text-decoration-color: currentcolor; - text-decoration-color: #90929D; -} - -.searchForm, .generalSearchForm, -.publicationsSearchForm, -.projectsSearchForm, .projectsTableSearchForm, -.organizationsSearchForm, -.datasetsSearchForm, -.softwareSearchForm, -.orpsSearchForm, -.datasourcesSearchForm, .compatibleDatasourcesSearchForm, .compatibleDatasourcesTableSearchForm, .datasourcesTableSearchForm, - .journalsSearchForm, .journalsTableSearchForm, -.entityRegistriesSearchForm, .entityRegistriesTableSearchForm { - - background: url('./Εxplore-sub.jpg') right !important; - -} - -.ask-explore.uk-grid-divider > :not(.uk-first-column)::before { - border-left: 1px solid var(--portal-main-color) ; -} - -.questions .tm-child-list-divider > ul > li:nth-child(n+2), .questions .uk-list-divider > li:nth-child(n+2) { - border-top: 1px solid #c5c5c5; -} - -.questions { - font-size: 15px; - font-weight: bold; - color: #4687E6; -} - -.uk-card-explore { - background-color: var(--portal-main-color); - color: #fff !important; -} - -.uk-card-explore .uk-h3 { - color: #fff !important; -} - -.uk-card-explore .uk-h6 a { - color: #fff !important; - text-decoration: underline; -} - -.uk-card-explore .uk-h5 { - color: #fff !important; - text-transform: uppercase; - font-size: 15px; - font-weight: bolder; -} - -.emphasis { - color: #000; - font-size: 17px; - font-weight: bold; -} - -.portal-color.emphasis { - color: #37C7E9; - font-size: 60px; - font-weight: 300; -} - -.numbers-background { - background: transparent url('numbers_background_pattern.svg') repeat-x center bottom; -} - -.graph-background { - background-size: cover !important; - padding-bottom: 100px; - background-color: #FAFAFA !important; - background: var(--graph-background); -} \ No newline at end of file diff --git a/src/assets/canada-custom.less b/src/assets/canada-custom.less new file mode 100644 index 0000000..93a94dd --- /dev/null +++ b/src/assets/canada-custom.less @@ -0,0 +1,52 @@ +/* Canada Aggregator */ +@aggregator-color: #E80000; +@aggregator-light-color: #E80000; +@aggregator-dark-color: #AD0000; +@aggregator-secondary-color: #AD0000; + +//@global-primary-gradient: linear-gradient(104deg, @aggregator-dark-color 0%, @aggregator-light-color 100%); +@global-primary-gradient: @aggregator-light-color; + +/* Button */ +@button-primary-background: @aggregator-color; +@inverse-button-primary-background: @aggregator-color; +@button-primary-hover-background: @aggregator-secondary-color; + +/* Background */ +@background-primary-background: @aggregator-color; +@background-primary-background-gradient: none; + +/* Text */ +@text-primary-color: @aggregator-color; + +/* Label */ +@label-secondary-color: @aggregator-color; + +/* General */ +@general-tab-featured-tab: @aggregator-color; + +/* Landing */ +@landing-portal-color: @aggregator-color; + +//.deposit { +// @import (multiple) "~src/assets/openaire-theme/less/_import"; +//} + +a.uk-link-text:hover { + color: @aggregator-dark-color; +} + +.search-form { + background-color: rgba(173, 0, 0, 0.7); +} + +.graph-background { + background-size: cover !important; + padding-bottom: 100px; + background-color: #FAFAFA !important; + background: url('canada-background.svg') no-repeat bottom; +} + +.numbers-background { + background: transparent url('numbers_background_pattern.svg') repeat-x center bottom !important; +} \ No newline at end of file diff --git a/src/assets/openaire-theme b/src/assets/openaire-theme index bc0edde..cb006f4 160000 --- a/src/assets/openaire-theme +++ b/src/assets/openaire-theme @@ -1 +1 @@ -Subproject commit bc0edde68dccfc17c1abc5d5aa3721f720aee852 +Subproject commit cb006f41395304e085d4ac012c7a031e46458f59 diff --git a/src/styles.less b/src/styles.less index fba6633..8ad0324 100644 --- a/src/styles.less +++ b/src/styles.less @@ -2,4 +2,6 @@ @import "~src/assets/openaire-theme/less/_import"; @import "~src/assets/common-assets/less/general"; @import "~src/assets/common-assets/less/user"; -@import "assets/aggregator-custom"; +@import "~src/assets/common-assets/less/linking"; +@import "~src/assets/common-assets/less/landing"; +@import "assets/canada-custom"; \ No newline at end of file