From 21f314c1f1f09c2ea366bb665700d71a308e69ce Mon Sep 17 00:00:00 2001 From: stefano bovio Date: Thu, 19 Aug 2021 11:11:48 +0200 Subject: [PATCH] update mapstore submodule to branch 2021.02.xx (#441) --- geonode_mapstore_client/client/MapStore2 | 2 +- .../client/js/apps/gn-home.jsx | 103 ------- geonode_mapstore_client/client/package.json | 2 +- .../static/mapstore/configs/localConfig.json | 3 +- .../client/themes/default/less/geonode.less | 22 +- .../geonode/scss/_bootstrap-variables.scss | 13 - .../themes/geonode/scss/_brand-navbar.scss | 67 ----- .../themes/geonode/scss/_card-grid.scss | 53 ---- .../themes/geonode/scss/_details-panel.scss | 79 ----- .../geonode/scss/_filter-by-extent.scss | 19 -- .../themes/geonode/scss/_filter-form.scss | 48 --- .../themes/geonode/scss/_filter-menu.scss | 54 ---- .../client/themes/geonode/scss/_footer.scss | 38 --- .../client/themes/geonode/scss/_hero.scss | 33 --- .../client/themes/geonode/scss/_loader.scss | 37 --- .../themes/geonode/scss/_main-loader.scss | 62 ---- .../themes/geonode/scss/_menu-index.scss | 103 ------- .../client/themes/geonode/scss/_mixins.scss | 199 ------------- .../themes/geonode/scss/_resource-card.scss | 90 ------ .../themes/geonode/scss/_search-bar.scss | 37 --- .../themes/geonode/scss/_swipe-menu.scss | 28 -- .../client/themes/geonode/scss/_tag.scss | 30 -- .../themes/geonode/scss/_variables.scss | 140 --------- .../client/themes/geonode/scss/geonode.scss | 275 ------------------ .../client/themes/preview/less/geonode.less | 29 +- 25 files changed, 43 insertions(+), 1523 deletions(-) delete mode 100644 geonode_mapstore_client/client/js/apps/gn-home.jsx delete mode 100644 geonode_mapstore_client/client/themes/geonode/scss/_bootstrap-variables.scss delete mode 100644 geonode_mapstore_client/client/themes/geonode/scss/_brand-navbar.scss delete mode 100644 geonode_mapstore_client/client/themes/geonode/scss/_card-grid.scss delete mode 100644 geonode_mapstore_client/client/themes/geonode/scss/_details-panel.scss delete mode 100644 geonode_mapstore_client/client/themes/geonode/scss/_filter-by-extent.scss delete mode 100644 geonode_mapstore_client/client/themes/geonode/scss/_filter-form.scss delete mode 100644 geonode_mapstore_client/client/themes/geonode/scss/_filter-menu.scss delete mode 100644 geonode_mapstore_client/client/themes/geonode/scss/_footer.scss delete mode 100644 geonode_mapstore_client/client/themes/geonode/scss/_hero.scss delete mode 100644 geonode_mapstore_client/client/themes/geonode/scss/_loader.scss delete mode 100644 geonode_mapstore_client/client/themes/geonode/scss/_main-loader.scss delete mode 100644 geonode_mapstore_client/client/themes/geonode/scss/_menu-index.scss delete mode 100644 geonode_mapstore_client/client/themes/geonode/scss/_mixins.scss delete mode 100644 geonode_mapstore_client/client/themes/geonode/scss/_resource-card.scss delete mode 100644 geonode_mapstore_client/client/themes/geonode/scss/_search-bar.scss delete mode 100644 geonode_mapstore_client/client/themes/geonode/scss/_swipe-menu.scss delete mode 100644 geonode_mapstore_client/client/themes/geonode/scss/_tag.scss delete mode 100644 geonode_mapstore_client/client/themes/geonode/scss/_variables.scss delete mode 100644 geonode_mapstore_client/client/themes/geonode/scss/geonode.scss diff --git a/geonode_mapstore_client/client/MapStore2 b/geonode_mapstore_client/client/MapStore2 index 65257cdd04..52d99c4011 160000 --- a/geonode_mapstore_client/client/MapStore2 +++ b/geonode_mapstore_client/client/MapStore2 @@ -1 +1 @@ -Subproject commit 65257cdd04368340b78340d958056987477102db +Subproject commit 52d99c40112f75391ff544ca084abb8300c0de40 diff --git a/geonode_mapstore_client/client/js/apps/gn-home.jsx b/geonode_mapstore_client/client/js/apps/gn-home.jsx deleted file mode 100644 index 5d53d51348..0000000000 --- a/geonode_mapstore_client/client/js/apps/gn-home.jsx +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright 2020, GeoSolutions Sas. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. - */ - -import main from '@mapstore/framework/components/app/main'; -import Router, { withRoutes } from '@js/components/app/Router'; -import MainLoader from '@js/components/app/MainLoader'; -import { connect } from 'react-redux'; - -import security from '@mapstore/framework/reducers/security'; - -import Home from '@js/routes/Home'; - -import gnsearch from '@js/reducers/gnsearch'; -import gnresource from '@js/reducers/gnresource'; -import gnsearchEpics from '@js/epics/gnsearch'; -import gnlocaleEpics from '@js/epics/gnlocale'; - -import { - getConfiguration, - getEndpoints, - getAccountInfo, - getResourcesTotalCount -} from '@js/api/geonode/v2'; - -import { - setupConfiguration, - initializeApp -} from '@js/utils/AppUtils'; - -// TODO: we should compile .scss as .less file in MapStore -// and add a link tag with the compiled css in the template -// this will ensure more control on override or custom css -import '../../themes/geonode/scss/geonode.scss'; - -const SearchRoute = connect(() => ({ hideHero: true }))(Home); -const DEFAULT_LOCALE = {}; -const ConnectedRouter = connect((state) => ({ - locale: state?.locale || DEFAULT_LOCALE -}))(Router); - -const routes = [ - { - name: 'homepage', - path: '/', - component: Home - }, - { - name: 'resources', - path: [ - '/search/', - '/search/:pk', - '/search/:ctype/:pk' - ], - component: SearchRoute - } -]; - -initializeApp(); - -Promise.all([ - getConfiguration(), - getAccountInfo(), - getResourcesTotalCount(), - getEndpoints() -]) - .then(([localConfig, user, resourcesTotalCount]) => { - const { - securityState, - geoNodeConfiguration - } = setupConfiguration({ - localConfig, - user, - resourcesTotalCount - }); - - // home app entry point - main({ - appComponent: withRoutes(routes)(ConnectedRouter), - loaderComponent: MainLoader, - initialState: { - defaultState: { - ...securityState - } - }, - pluginsConfig: localConfig.plugins || [], - themeCfg: null, - appReducers: { - gnsearch, - gnresource, - security - }, - appEpics: { - ...gnsearchEpics, - ...gnlocaleEpics - }, - geoNodeConfiguration - }); - }); diff --git a/geonode_mapstore_client/client/package.json b/geonode_mapstore_client/client/package.json index c09e1da400..c7e006930d 100644 --- a/geonode_mapstore_client/client/package.json +++ b/geonode_mapstore_client/client/package.json @@ -27,7 +27,7 @@ "author": "GeoSolutions", "license": "BSD-2-Clause", "devDependencies": { - "@mapstore/project": "1.0.7" + "@mapstore/project": "1.0.17" }, "dependencies": { "@fortawesome/fontawesome-free": "5.15.1", diff --git a/geonode_mapstore_client/client/static/mapstore/configs/localConfig.json b/geonode_mapstore_client/client/static/mapstore/configs/localConfig.json index bf73a2bbf7..6092b6a9b7 100644 --- a/geonode_mapstore_client/client/static/mapstore/configs/localConfig.json +++ b/geonode_mapstore_client/client/static/mapstore/configs/localConfig.json @@ -2446,7 +2446,8 @@ "name": "DashboardEditor", "cfg": { "disablePluginIf": "{state('gnResourcePermissions') && state('gnResourcePermissions').canEdit ? false : true}", - "catalog": "{ state('settings') && state('settings').initialCatalog }", + "selectedService": "{state('settings') && state('settings').catalogueSelectedService ? state('settings').catalogueSelectedService : ''}", + "services": "{state('settings') && state('settings').catalogueServices ? state('settings').catalogueServices : {}}", "disableEmptyMap": true, "containerPosition": "columns" } diff --git a/geonode_mapstore_client/client/themes/default/less/geonode.less b/geonode_mapstore_client/client/themes/default/less/geonode.less index 1a15a77018..a98ab3ad5e 100644 --- a/geonode_mapstore_client/client/themes/default/less/geonode.less +++ b/geonode_mapstore_client/client/themes/default/less/geonode.less @@ -90,8 +90,26 @@ } } -.gn-share-modal .modal-footer { - display: none; +.gn-share-modal { + overflow: visible; + .modal-dialog, + .ms-resizable-modal > .modal-content > .modal-body > div { + overflow: visible; + } + .col-md-4 { + padding-left: 0; + padding-right: 0; + } + .row { + margin-left: 0; + margin-right: 0; + } + .modal-body { + margin: 8px; + } + .modal-footer { + display: none; + } } // the style of geonode add a margin on label diff --git a/geonode_mapstore_client/client/themes/geonode/scss/_bootstrap-variables.scss b/geonode_mapstore_client/client/themes/geonode/scss/_bootstrap-variables.scss deleted file mode 100644 index 057d29c1cf..0000000000 --- a/geonode_mapstore_client/client/themes/geonode/scss/_bootstrap-variables.scss +++ /dev/null @@ -1,13 +0,0 @@ -/* - * Copyright 2020, GeoSolutions Sas. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. - */ - -$font-family-sans-serif: 'Montserrat', sans-serif; -$jumbotron-bg: transparent; - -$primary: $gn-primary-bg; -$font-size-base: 0.875rem; // 16px root diff --git a/geonode_mapstore_client/client/themes/geonode/scss/_brand-navbar.scss b/geonode_mapstore_client/client/themes/geonode/scss/_brand-navbar.scss deleted file mode 100644 index 5cc8236501..0000000000 --- a/geonode_mapstore_client/client/themes/geonode/scss/_brand-navbar.scss +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright 2020, GeoSolutions Sas. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. - */ - -.gn-brand-navbar { - position: fixed; - top: 0; - left: 0; - z-index: 20; - padding: 0.5rem 0; - min-height: 4rem; - width: 100%; - color: $gn-body-color; - background-color: $gn-body-bg; - - .gn-brand-navbar-container { - display: flex; - flex-direction: row; - align-items: center; - width: 100%; - max-width: $gn-page-max-width; - margin: auto; - .gn-brand-navbar-left-side, - .gn-brand-navbar-right-side { - flex: 1; - white-space: nowrap; - padding: 0 0.5rem; - list-style-type: none; - margin: 0; - margin: 0 0.4rem; - } - .gn-brand-navbar-left-side img, - .gn-brand-navbar-right-side img { - width: auto; - height: 2.5rem; - } - .gn-brand-navbar-left-side img { - padding: 0 0.5rem; - } - .gn-brand-navbar-center { - width: 100%; - max-width: 716px; - position: relative; - } - .gn-brand-navbar-right-side { - display: flex; - flex-direction: row-reverse; - } - } - .gn-user-dropdown { - .btn { - padding: 0 0.4rem; - } - .dropdown-toggle > img { - width: auto; - height: 2.5rem; - border-radius: 50%; - } - .dropdown-item .fa { - margin-right: 0.5rem; - } - } -} diff --git a/geonode_mapstore_client/client/themes/geonode/scss/_card-grid.scss b/geonode_mapstore_client/client/themes/geonode/scss/_card-grid.scss deleted file mode 100644 index 437b6245ed..0000000000 --- a/geonode_mapstore_client/client/themes/geonode/scss/_card-grid.scss +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright 2020, GeoSolutions Sas. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. - */ - -.gn-card-grid { - color: $gn-body-shade-color; - background-color: $gn-body-shade-bg; - .gn-card-grid-container { - position: relative; - max-width: $gn-page-max-width; - margin: auto; - width: 100%; - min-height: 100vh; - } - .gn-card-grid-container > ul { - list-style-type: none; - padding: 0; - margin: 0; - display: flex; - flex-wrap: wrap; - max-width: $gn-page-max-width; - margin: auto; - width: 100%; - li { - padding: 0; - margin: 0; - } - } - .gn-card-grid-message { - padding: 9rem 1rem; - text-align: center; - h1 { - font-size: 2.75rem; - margin-bottom: 2rem; - } - p { - font-size: 2rem; - font-weight: lighter; - line-height: 2.5rem; - } - a { - text-decoration: underline; - } - } - .gn-card-grid-pagination { - padding: 1rem; - text-align: center; - } -} diff --git a/geonode_mapstore_client/client/themes/geonode/scss/_details-panel.scss b/geonode_mapstore_client/client/themes/geonode/scss/_details-panel.scss deleted file mode 100644 index 5dc67f6ceb..0000000000 --- a/geonode_mapstore_client/client/themes/geonode/scss/_details-panel.scss +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright 2020, GeoSolutions Sas. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. - */ - -.gn-details-panel { - position: relative; - color: $gn-body-color; - background-color: $gn-body-bg; - z-index: 10; - section { - @extend .shadow; - position: absolute; - width: 100%; - height: 100%; - overflow-y: scroll; - } - &.loading .gn-details-panel-content { - h1, - a, - p { - color: transparent; - background-color: $gn-placeholder-bg; - } - a, .btn { - display: none; - } - } -} - -.gn-details-panel-header { - display: flex; - flex-direction: row-reverse; -} - -.gn-details-panel-preview { - position: relative; - width: 100%; - padding-bottom: 56.25%; - color: $gn-image-color; - background-color: $gn-image-bg; - .gn-details-panel-preview-loader { - background-color: $gn-image-bg; - } -} - -.gn-details-panel-content { - padding: 1rem; - font-size: 0.9em; -} - -.gn-details-panel-title { - display: flex; - margin-bottom: 1rem; - h1 { - flex: 1; - word-break: break-word; - font-size: 1.2rem; - margin: 0; - .fa { - margin: 0; - margin-right: 0.6rem; - } - } -} - -.gn-details-panel-description { - font-size: 0.9rem; - text-align: justify; - word-break: break-word; - // force styles of html coming from WYSIWYG - img { - width: 100% !important; - height: auto !important; - } -} diff --git a/geonode_mapstore_client/client/themes/geonode/scss/_filter-by-extent.scss b/geonode_mapstore_client/client/themes/geonode/scss/_filter-by-extent.scss deleted file mode 100644 index 4b2a2c8467..0000000000 --- a/geonode_mapstore_client/client/themes/geonode/scss/_filter-by-extent.scss +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright 2020, GeoSolutions Sas. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. - */ - -.gn-filter-by-extent { - display: flex; - flex-direction: column; - width: 100%; - height: 100%; - margin: 0; - .gn-filter-by-extent-map { - background-color: $gn-image-bg; - color: $gn-image-color; - } -} diff --git a/geonode_mapstore_client/client/themes/geonode/scss/_filter-form.scss b/geonode_mapstore_client/client/themes/geonode/scss/_filter-form.scss deleted file mode 100644 index cbcf6ef5fb..0000000000 --- a/geonode_mapstore_client/client/themes/geonode/scss/_filter-form.scss +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2020, GeoSolutions Sas. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. - */ - -.gn-filter-form { - color: $gn-body-color; - background-color: $gn-body-bg; - padding: 1rem; - position: relative; - width: 100%; - .gn-filter-form-header { - display: flex; - align-items: center; - margin-bottom: 0.5rem; - } - .gn-filter-form-title { - flex: 1; - } - .gn-filter-form-footer { - display: flex; - flex-direction: row-reverse; - align-items: center; - } -} - -.gn-search-bar { - z-index: 16; - .gn-filter-form { - @extend .shadow-lg; - position: absolute; - margin-top: 0.5rem; - // width: 140%; - max-width: $gn-page-max-width; - width: 985px; - left: 50%; - transform: translateX(-50%); - - } - @media screen and (max-width: 1128px) { - .gn-filter-form { - width: 100%; - } - } -} diff --git a/geonode_mapstore_client/client/themes/geonode/scss/_filter-menu.scss b/geonode_mapstore_client/client/themes/geonode/scss/_filter-menu.scss deleted file mode 100644 index 8cafed05a7..0000000000 --- a/geonode_mapstore_client/client/themes/geonode/scss/_filter-menu.scss +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2020, GeoSolutions Sas. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. - */ - -.gn-filters-menu { - position: sticky; - min-height: 3rem; - width: 100%; - background-color: inherit; - display: flex; - flex-direction: row; - align-items: center; - padding: 0.5rem 0; - z-index: 10; - .gn-filters-menu-container { - display: flex; - flex-direction: row; - align-items: center; - max-width: $gn-page-max-width; - margin: auto; - width: 100%; - padding: 0 0.5rem; - .gn-filters-menu-content { - flex: 1; - margin: 0 0.4rem; - .btn-default { - background-color: inherit; - } - .dropdown-toggle:after { - display: none; - } - li + li { - margin-left: 0.25rem; - } - } - .gn-filters-menu-tools > * { - margin: 0 0.4rem; - } - .gn-filters-menu-tools { - /* remove this inline style of dropdown because they cause issue with overflow x*/ - .dropdown-menu { - transform: none !important; - inset: unset !important; - } - .dropdown-menu-right { - right: 0 !important; - } - } - } -} diff --git a/geonode_mapstore_client/client/themes/geonode/scss/_footer.scss b/geonode_mapstore_client/client/themes/geonode/scss/_footer.scss deleted file mode 100644 index f81e5cbd11..0000000000 --- a/geonode_mapstore_client/client/themes/geonode/scss/_footer.scss +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright 2020, GeoSolutions Sas. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. - */ - -.gn-footer { - position: fixed; - bottom: 0; - color: $gn-body-shade-color; - background-color: $gn-body-shade-bg; - z-index: 18; - padding: 0.5rem; - width: 100%; - ul { - list-style-type: none; - padding: 0; - margin: 0; - display: flex; - flex-wrap: wrap; - max-width: $gn-page-max-width; - margin: auto; - width: 100%; - li { - padding: 0; - margin: 0; - font-size: $font-size-base * 0.78; - padding: 0 0.5rem; - min-width: 90px; - text-align: center; - } - } - .nav-link { - padding: 0 0.5rem; - } -} diff --git a/geonode_mapstore_client/client/themes/geonode/scss/_hero.scss b/geonode_mapstore_client/client/themes/geonode/scss/_hero.scss deleted file mode 100644 index 145780dc60..0000000000 --- a/geonode_mapstore_client/client/themes/geonode/scss/_hero.scss +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2020, GeoSolutions Sas. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. - */ - -.gn-hero { - background-color: $gn-jumbotron-bg; - color: $gn-jumbotron-color; - position: relative; - z-index: 16; - .jumbotron { - max-width: $gn-hero-max-width; - margin: auto; - .gn-hero-description { - word-break: break-word; - font-size: $font-size-base * 1.5; font-weight: lighter; - h1 { font-size: $font-size-base * 6; font-weight: lighter; } - h2 { font-size: $font-size-base * 5.5; font-weight: lighter; } - h3 { font-size: $font-size-base * 5; font-weight: lighter; } - h4 { font-size: $font-size-base * 4; font-weight: lighter; } - h5 { font-size: $font-size-base * 3; font-weight: lighter; } - h6 { font-size: $font-size-base * 1.5; font-weight: lighter; } - p:not(.gn-hero-tools) { font-size: $font-size-base * 1.5; font-weight: lighter; } - } - } - .gn-search-bar { - background-color: $gn-body-bg; - color: $gn-body-color; - } -} diff --git a/geonode_mapstore_client/client/themes/geonode/scss/_loader.scss b/geonode_mapstore_client/client/themes/geonode/scss/_loader.scss deleted file mode 100644 index c8c305cb81..0000000000 --- a/geonode_mapstore_client/client/themes/geonode/scss/_loader.scss +++ /dev/null @@ -1,37 +0,0 @@ - - -$gn-loader-placeholder-bg: 251, 251, 251; -.gn-loader-placeholder { - position: relative; - height: 100%; - width: 100%; - overflow: hidden; - .fa { - font-size: 6rem; - } - &::after { - content: ''; - display: block; - position: absolute; - left: -45%; - height: 100%; - width: 45%; - mix-blend-mode: overlay; - @include gradient-x-three-colors( - rgba(251,251,251, 0), - rgba(251,251,251, .3), - 50%, - rgba(251,251,251, .0) - ); - animation: background-loading 1.25s infinite; - @keyframes background-loading { - 0%{ - left: -45%; - } - 100%{ - left: 100%; - } - } - } -} - diff --git a/geonode_mapstore_client/client/themes/geonode/scss/_main-loader.scss b/geonode_mapstore_client/client/themes/geonode/scss/_main-loader.scss deleted file mode 100644 index c88a84f541..0000000000 --- a/geonode_mapstore_client/client/themes/geonode/scss/_main-loader.scss +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright 2020, GeoSolutions Sas. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. - */ - -.gn-main-loader-container { - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - display: flex; - align-items: center; - justify-content: center; - font-size: 14px; - flex-direction: column; -} -.gn-main-loader-content { - position: relative; - font-size: inherit; -} -.gn-main-loader { - border-radius: 50%; - width: 12em; - height: 12em; - box-sizing: border-box; - border: 1em solid rgba(119,119,119, 0.2); - border-left: 1em solid #777777; - -webkit-animation: gn-main-loader-animation 1.1s infinite linear; - animation: gn-main-loader-animation 1.1s infinite linear; -} -.gn-main-loader-text { - position: absolute; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); - font-size: 1.5em; - text-align: center; -} -@-webkit-keyframes gn-main-loader-animation { - 0% { - -webkit-transform: rotate(0deg); - transform: rotate(0deg); - } - 100% { - -webkit-transform: rotate(360deg); - transform: rotate(360deg); - } -} -@keyframes gn-main-loader-animation { - 0% { - -webkit-transform: rotate(0deg); - transform: rotate(0deg); - } - 100% { - -webkit-transform: rotate(360deg); - transform: rotate(360deg); - } -} diff --git a/geonode_mapstore_client/client/themes/geonode/scss/_menu-index.scss b/geonode_mapstore_client/client/themes/geonode/scss/_menu-index.scss deleted file mode 100644 index d5623615e7..0000000000 --- a/geonode_mapstore_client/client/themes/geonode/scss/_menu-index.scss +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright 2020, GeoSolutions Sas. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. - */ - -.gn-menu-index { - position: sticky; - min-height: 3rem; - width: 100%; - padding: 0.5rem 0; - color: $gn-primary-color; - background-color: $gn-primary-bg; - z-index: 15; - display: flex; - flex-direction: row; - align-items: center; - .badge { - margin-left: 0.5rem; - padding: 0.2rem; - font-size: 0.6rem; - border-radius: 0.2rem; - } - .gn-menu-index-container { - display: flex; - flex-direction: row; - align-items: center; - max-width: $gn-page-max-width; - margin: auto; - width: 100%; - padding: 0 0.5rem; - .gn-menu-index-content { - flex: 1; - margin: 0 0.4rem; - } - .gn-menu-index-tools > * { - margin: 0 0.4rem; - } - .gn-menu-index-divider { - width: 1px; - height: 1.2rem; - } - .gn-menu-index-tools { - display: flex; - align-items: center; - /* remove this inline style of dropdown because they cause issue with overflow x*/ - .dropdown-menu { - transform: none !important; - inset: unset !important; - } - .dropdown-menu-right { - right: 0 !important; - } - .gn-menu-index-right-items { - display: flex; - align-items: center; - list-style-type: none; - padding: 0; - margin: 0; - li + li { - margin-left: 0.4rem; - } - } - } - - .btn-default, - .gn-tag { - font-size: $font-size-base; - color: $gn-primary-color; - background-color: $gn-primary-bg; - border: none; - padding: 0.25rem 0.5rem; - border-radius: 0.25rem; - &.active { - color: $gn-primary-bg; - background-color: $gn-primary-color; - } - @include hover() { - color: $gn-primary-bg; - background-color: $gn-primary-color; - opacity: 1; - } - } - .gn-language-selector { - &> .btn-default { - &.active { - color: inherit; - background-color: inherit; - font-weight: bold; - text-decoration: underline; - } - @include hover() { - color: inherit; - background-color: inherit; - font-weight: bold; - text-decoration: underline; - } - } - } - } -} diff --git a/geonode_mapstore_client/client/themes/geonode/scss/_mixins.scss b/geonode_mapstore_client/client/themes/geonode/scss/_mixins.scss deleted file mode 100644 index 47e6d52083..0000000000 --- a/geonode_mapstore_client/client/themes/geonode/scss/_mixins.scss +++ /dev/null @@ -1,199 +0,0 @@ -/* - * Copyright 2020, GeoSolutions Sas. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. - */ - -@mixin color-var($fallback, $color) { - color: $fallback; - color: var($color, $fallback); -} - -@mixin background-color-var($fallback, $color) { - background-color: $fallback; - background-color: var($color, $fallback); -} - -@mixin border-color-var($fallback, $color) { - border-color: $fallback; - border-color: var($color, $fallback); -} - -@mixin outline-color-var($fallback, $color) { - outline-color: $fallback; - outline-color: var($color, $fallback); -} - -@mixin box-shadow-var($fallback, $color) { - box-shadow: 0 0 0 0.2rem $fallback; - box-shadow: 0 0 0 0.2rem var($color, $fallback); -} - -@mixin react-select-theme($theme-vars) { - .Select.is-disabled>.Select-control { - @include background-color-var(map.get($theme-vars, 'disabled-bg'), --gn-disabled-bg); - } - - .Select.is-disabled>.Select-control:hover { - box-shadow: none; - } - - .Select.is-open>.Select-control { - @include color-var(map.get($theme-vars, 'body-color'), --gn-body-color); - @include background-color-var(map.get($theme-vars, 'body-bg'), --gn-body-bg); - @include border-color-var(map.get($theme-vars, 'body-border-color'), --gn-body-border-color); - } - - .Select.is-open>.Select-control .Select-arrow { - border-bottom-color: map.get($theme-vars, 'body-color'); - border-bottom-color: var(map.get($theme-vars, 'body-color'), --gn-body-color); - } - - .Select.is-focused>.Select-control { - @include background-color-var(map.get($theme-vars, 'body-bg'), --gn-body-bg); - } - - .Select.is-focused:not(.is-open)>.Select-control { - box-shadow: none; - outline: 2px solid map.get($theme-vars, 'focus-color'); - @include outline-color-var(map.get($theme-vars, 'focus-color'), --gn-focus-color); - @include border-color-var(map.get($theme-vars, 'focus-color'), --gn-focus-color); - @include background-color-var(map.get($theme-vars, 'body-bg'), --gn-body-bg); - } - - .Select.has-value.Select--single>.Select-control .Select-value .Select-value-label, - .Select.has-value.is-pseudo-focused.Select--single>.Select-control .Select-value .Select-value-label { - @include color-var(map.get($theme-vars, 'body-color'), --gn-body-color); - } - - .Select.has-value.Select--single>.Select-control .Select-value a.Select-value-label:hover, - .Select.has-value.is-pseudo-focused.Select--single>.Select-control .Select-value a.Select-value-label:hover, - .Select.has-value.Select--single>.Select-control .Select-value a.Select-value-label:focus, - .Select.has-value.is-pseudo-focused.Select--single>.Select-control .Select-value a.Select-value-label:focus { - @include color-var(map.get($theme-vars, 'body-color'), --gn-body-color); - } - - .Select.has-value.Select--single>.Select-control .Select-value a.Select-value-label:focus, - .Select.has-value.is-pseudo-focused.Select--single>.Select-control .Select-value a.Select-value-label:focus { - @include background-color-var(map.get($theme-vars, 'body-bg'), --gn-body-bg); - } - - .Select.is-open .Select-arrow, - .Select .Select-arrow-zone:hover>.Select-arrow { - border-top-color: map.get($theme-vars, 'body-color'); - border-top-color: var(map.get($theme-vars, 'body-color'), --gn-body-color); - } - - .Select-control { - @include color-var(map.get($theme-vars, 'body-color'), --gn-body-color); - @include background-color-var(map.get($theme-vars, 'body-bg'), --gn-body-bg); - @include border-color-var(map.get($theme-vars, 'body-border-color'), --gn-body-border-color); - } - - .Select-control:hover { - box-shadow: none; - } - - .Select-control .Select-input:focus { - @include background-color-var(map.get($theme-vars, 'body-bg'), --gn-body-bg); - } - - .Select-placeholder, - .Select--single>.Select-control .Select-value { - @include color-var(map.get($theme-vars, 'placeholder-color'), --gn-placeholder-color); - } - - .Select-loading { - @include border-color-var(map.get($theme-vars, 'body-border-color'), --gn-body-border-color); - border-right-color: map.get($theme-vars, 'body-color'); - border-right-color: var(map.get($theme-vars, 'body-color'), --gn-body-color); - } - - .Select-clear-zone { - @include color-var(map.get($theme-vars, 'body-color'), --gn-body-color); - } - - .Select-clear-zone:hover { - @include color-var(map.get($theme-vars, 'danger-color'), --gn-danger-color); - } - - .Select-arrow { - border-top-color: map.get($theme-vars, 'body-color'); - border-top-color: var(map.get($theme-vars, 'body-color'), --gn-body-color); - } - - .Select-menu-outer { - @include color-var(map.get($theme-vars, 'body-color'), --gn-body-color); - @include background-color-var(map.get($theme-vars, 'body-bg'), --gn-body-bg); - @include border-color-var(map.get($theme-vars, 'body-border-color'), --gn-body-border-color); - } - - .Select-option { - @include color-var(map.get($theme-vars, 'body-color'), --gn-body-color); - @include background-color-var(map.get($theme-vars, 'body-bg'), --gn-body-bg); - } - - .Select-option.is-selected { - @include color-var(map.get($theme-vars, 'tag-active-color'), --gn-tag-active-color); - @include background-color-var(map.get($theme-vars, 'tag-active-bg'), --gn-tag-active-bg); - } - - .Select-option.is-focused { - @include color-var(map.get($theme-vars, 'tag-hover-color'), --gn-tag-hover-color); - @include background-color-var(map.get($theme-vars, 'tag-hover-bg'), --gn-tag-hover-bg); - } - - .Select-option.is-disabled { - @include color-var(map.get($theme-vars, 'disabled-color'), --gn-disabled-color); - } - - .Select-noresults { - @include color-var(map.get($theme-vars, 'placeholder-color'), --gn-placeholder-color); - } - - .Select--multi .Select-value { - @include color-var(map.get($theme-vars, 'tag-active-color'), --gn-tag-active-color); - @include background-color-var(map.get($theme-vars, 'tag-active-bg'), --gn-tag-active-bg); - border-color: transparent; - } - - .Select--multi a.Select-value-label { - @include color-var(map.get($theme-vars, 'link-color'), --gn-link-color); - } - - .Select--multi .Select-value-icon { - @include border-color-var(map.get($theme-vars, 'tag-active-color'), --gn-tag-active-color); - } - - .Select--multi .Select-value-icon:hover, - .Select--multi .Select-value-icon:focus { - @include color-var(map.get($theme-vars, 'tag-hover-color'), --gn-tag-hover-color); - @include background-color-var(map.get($theme-vars, 'tag-hover-bg'), --gn-tag-hover-bg); - } - - .Select--multi .Select-value-icon:active { - @include background-color-var(map.get($theme-vars, 'tag-active-bg'), --gn-tag-active-bg); - } - - .Select--multi.Select--rtl .Select-value-icon { - @include border-color-var(map.get($theme-vars, 'tag-active-color'), --gn-tag-active-color); - } - - .Select--multi.is-disabled .Select-value { - @include background-color-var(map.get($theme-vars, 'disabled-bg'), --gn-disabled-bg); - @include border-color-var(map.get($theme-vars, 'disabled-color'), --gn-disabled-color); - @include color-var(map.get($theme-vars, 'disabled-color'), --gn-disabled-color); - } - - .Select--multi.is-disabled .Select-value-icon { - @include border-color-var(map.get($theme-vars, 'disabled-color'), --gn-disabled-color); - } - - .Select--multi.is-disabled .Select-value-icon:hover, - .Select--multi.is-disabled .Select-value-icon:focus, - .Select--multi.is-disabled .Select-value-icon:active { - @include background-color-var(map.get($theme-vars, 'disabled-bg'), --gn-disabled-bg); - } -} diff --git a/geonode_mapstore_client/client/themes/geonode/scss/_resource-card.scss b/geonode_mapstore_client/client/themes/geonode/scss/_resource-card.scss deleted file mode 100644 index 052baad9df..0000000000 --- a/geonode_mapstore_client/client/themes/geonode/scss/_resource-card.scss +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright 2020, GeoSolutions Sas. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. - */ - -.gn-resource-card { - @extend .shadow-sm; - transition: box-shadow, border 0.3s; - .gn-resource-card-link { - position: absolute; - width: 100%; - height: 100%; - } - .gn-card-options { - position: absolute; - right: 0; - top: 0; - margin: 0.25rem; - background-color: $gn-body-bg; - @extend .shadow-sm; - } - .gn-card-options .dropdown-toggle::after { - display: none; - } - .gn-card-options, - a { - pointer-events: auto; - } - .card-body { - pointer-events: none; - z-index: 2; - } - .card-img-top { - height: 160px; - object-fit: cover; - color: $gn-image-color; - background-color: $gn-image-bg; - } - .gn-resource-card-category { - text-transform: uppercase; - } - .card-title, - .card-text { - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - } - .card-title { - font-size: 0.875rem; - .fa { - margin: 0; - margin-right: 0.4rem; - } - a { - color: $gn-body-color; - @include hover() { - text-decoration: underline; - } - } - } - .card-text { - font-size: 0.69rem; - } - - .gn-tag { - color: $gn-body-color; - padding: 0; - margin: 0; - font-size: inherit; - @include hover() { - color: inherit; - opacity: 0.8; - background-color: transparent; - } - } - &.active { - border-color: $primary; - border-color: var(--gn-primary-bg, $primary); - outline: 0.25rem solid rgba($primary, 0.3); - @extend .shadow; - } - @include hover() { - border-color: $primary; - border-color: var(--gn-primary-bg, $primary); - @extend .shadow; - } -} diff --git a/geonode_mapstore_client/client/themes/geonode/scss/_search-bar.scss b/geonode_mapstore_client/client/themes/geonode/scss/_search-bar.scss deleted file mode 100644 index 436d35f686..0000000000 --- a/geonode_mapstore_client/client/themes/geonode/scss/_search-bar.scss +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright 2020, GeoSolutions Sas. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. - */ - -.gn-search-bar { - @extend .shadow-sm; - position: relative; - width: 100%; - z-index: 2; - border: 2px solid $gn-body-border-color; - background-color: $gn-body-bg; - &.focus { - outline: 3px solid $gn-focus-color; - } - .form-control { - border: none; - } - .gn-suggestions { - @extend .shadow-lg; - background-color: $gn-body-bg; - position: absolute; - width: 100%; - margin-top: 0.5rem; - .gn-suggestions-header { - display: flex; - flex-direction: row-reverse; - } - .list-group { - overflow-y: auto; - max-height: 300px; - } - } -} diff --git a/geonode_mapstore_client/client/themes/geonode/scss/_swipe-menu.scss b/geonode_mapstore_client/client/themes/geonode/scss/_swipe-menu.scss deleted file mode 100644 index 79a0b0603f..0000000000 --- a/geonode_mapstore_client/client/themes/geonode/scss/_swipe-menu.scss +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright 2020, GeoSolutions Sas. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. - */ - -.gn-swipe-menu { - display: flex; - align-items: center; - white-space: nowrap; - ul { - list-style-type: none; - padding: 0; - margin: 0; - } - li { - display: flex; - align-items: center; - } - li + li { - margin-left: 0.4rem; - } - .btn { - height: 100%; - } -} diff --git a/geonode_mapstore_client/client/themes/geonode/scss/_tag.scss b/geonode_mapstore_client/client/themes/geonode/scss/_tag.scss deleted file mode 100644 index 79c52ad453..0000000000 --- a/geonode_mapstore_client/client/themes/geonode/scss/_tag.scss +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2020, GeoSolutions Sas. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. - */ - -.gn-tag { - font-size: $font-size-sm; - padding: 0.1rem 0.25rem; - color: $gn-tag-color; - background-color: transparent; - .fa, - + .gn-tag:not(.dropdown-item) { - margin-left: 0.5rem; - } - &.dropdown-item { - margin: 0.2rem; - width: calc(100% - 0.4rem); - } - &.active { - color: $gn-tag-active-color; - background-color: $gn-tag-active-bg; - } - @include hover() { - color: $gn-tag-hover-color; - background-color: $gn-tag-hover-bg; - } -} diff --git a/geonode_mapstore_client/client/themes/geonode/scss/_variables.scss b/geonode_mapstore_client/client/themes/geonode/scss/_variables.scss deleted file mode 100644 index c355a273aa..0000000000 --- a/geonode_mapstore_client/client/themes/geonode/scss/_variables.scss +++ /dev/null @@ -1,140 +0,0 @@ -/* - * Copyright 2020, GeoSolutions Sas. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. - */ - -$gn-page-max-width: 1440px; -$gn-hero-max-width: 716px; - -$gn-body-color: #000000; -$gn-body-bg: #ffffff; -$gn-body-border-color: #dddddd; - -$gn-body-shade-color: #000000; -$gn-body-shade-bg: #f2f0f0; - -$gn-placeholder-color: #aaaaaa; -$gn-placeholder-bg: #dddddd; - -$gn-disabled-color: #acacac; -$gn-disabled-bg: #fcfcfc; - -$gn-danger-color: #D0021B; - -$gn-primary-color: #ffffff; -$gn-primary-bg: #397AAB; - -$gn-link-color: #397AAB; -$gn-link-hover-color: #1b4d74; - -$gn-image-color: #333333; -$gn-image-bg: #f2f2f2; - -$gn-jumbotron-color: #ffffff; -$gn-jumbotron-bg: #333333; - -$gn-focus-color: rgba(#397AAB, 0.4); - -$gn-tag-color: #000000; -$gn-tag-hover-color: #ffffff; -$gn-tag-hover-bg: rgba(#397AAB, 0.75); -$gn-tag-active-color: #ffffff; -$gn-tag-active-bg: #397AAB; - -$gn-footer-color: #ffffff; -$gn-footer-bg: rgba(#397AAB, 0.75); -$gn-footer-link-color: #ffffff; -$gn-footer-link-hover-color: #397AAB; - -$gn-theme-light: ( - 'body-color': $gn-body-color, - 'body-bg': $gn-body-bg, - 'body-border-color': $gn-body-border-color, - - 'body-shade-color': $gn-body-shade-color, - 'body-shade-bg': $gn-body-shade-bg, - - 'placeholder-color': $gn-placeholder-color, - 'placeholder-bg': $gn-placeholder-bg, - - 'disabled-color': $gn-placeholder-color, - 'disabled-bg': $gn-placeholder-bg, - - 'danger-color': $gn-danger-color, - - 'primary-color': $gn-primary-color, - 'primary-bg': $gn-primary-bg, - - 'link-color': $gn-link-color, - 'link-hover-color': $gn-link-hover-color, - - 'image-color': $gn-image-color, - 'image-bg': $gn-image-bg, - - 'jumbotron-color': $gn-jumbotron-color, - 'jumbotron-bg': $gn-jumbotron-bg, - - 'focus-color': $gn-focus-color, - - 'tag-color': $gn-tag-color, - 'tag-hover-color': $gn-tag-hover-color, - 'tag-hover-bg': $gn-tag-hover-bg, - 'tag-active-color': $gn-tag-active-color, - 'tag-active-bg': $gn-tag-active-bg, - - - 'footer-color': $gn-body-color, - 'footer-bg': $gn-body-bg, - 'footer-link-color': $gn-link-color, - 'footer-link-hover-color': $gn-link-hover-color -); - -$gn-theme-dark: ( - 'body-color':#dddddd, - 'body-bg': #222222, - 'body-border-color': #444444, - - 'body-shade-color': #f2f2f2, - 'body-shade-bg': #111111, - - 'placeholder-color': #999999, - 'placeholder-bg': #777777, - - 'disabled-color': #999999, - 'disabled-bg': #777777, - - 'primary-color': #292929, - 'primary-bg': #70b0e0, - - 'danger-color': #D0021B, - - 'link-color': #70b0e0, - 'link-hover-color': #397AAB, - - 'image-color': #ffffff, - 'image-bg': #333333, - - 'jumbotron-color': #ffffff, - 'jumbotron-bg': #333333, - - 'focus-color': rgba(#70b0e0, 0.4), - - 'tag-color': #dddddd, - 'tag-hover-color': #292929, - 'tag-hover-bg': rgba(#a7d0f0, 0.75), - 'tag-active-color': #292929, - 'tag-active-bg': #a7d0f0, - - 'footer-color': #dddddd, - 'footer-bg': #222222, - 'footer-link-color': #70b0e0, - 'footer-link-hover-color': #397AAB -); - -$gn-themes: ( - 'light': $gn-theme-light, - 'dark': $gn-theme-dark -); diff --git a/geonode_mapstore_client/client/themes/geonode/scss/geonode.scss b/geonode_mapstore_client/client/themes/geonode/scss/geonode.scss deleted file mode 100644 index e17cb2a911..0000000000 --- a/geonode_mapstore_client/client/themes/geonode/scss/geonode.scss +++ /dev/null @@ -1,275 +0,0 @@ -/* - * Copyright 2020, GeoSolutions Sas. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. - */ - -@use 'sass:map'; - -@import 'variables', - -'bootstrap-variables', -'~bootstrap-v4/scss/bootstrap', - -'mixins', - -'brand-navbar', -'card-grid', -'details-panel', -'filter-by-extent', -'filter-form', -'filter-menu', -'footer', -'hero', -'loader', -'main-loader', -'menu-index', -'resource-card', -'search-bar', -'swipe-menu', -'tag'; - -@import '~react-select/dist/react-select.css'; -@import '~@fortawesome/fontawesome-free/css/all.min.css'; -@import '~ol/ol.css'; - -:root { - font-size: 16px; -} - -@each $theme, $theme-vars in $gn-themes { - .gn-theme-#{$theme} { - @include color-var(map.get($theme-vars, 'body-color'), --gn-body-color); - @include background-color-var(map.get($theme-vars, 'body-bg'), --gn-body-bg); - - .btn:focus, - .btn.focus { - @include box-shadow-var(map.get($theme-vars, 'focus-color'), --gn-focus-color); - @include outline-color-var(map.get($theme-vars, 'focus-color'), --gn-focus-color); - } - - .gn-brand-navbar, - .gn-details-panel, - .gn-details-panel > *, - .gn-footer, - .gn-resource-card, - .gn-filter-form, - .gn-hero .gn-search-bar, - .gn-card-options, - .gn-search-bar, - input, - input:focus, - .gn-suggestions, - .dropdown-menu { - @include color-var(map.get($theme-vars, 'body-color'), --gn-body-color); - @include background-color-var(map.get($theme-vars, 'body-bg'), --gn-body-bg); - } - - .gn-card-grid, - .gn-filters-menu, - .gn-filters-menu-content .gn-swipe-menu .btn { - @include color-var(map.get($theme-vars, 'body-shade-color'), --gn-body-shade-color); - @include background-color-var(map.get($theme-vars, 'body-shade-bg'), --gn-body-shade-bg); - } - - .gn-menu-index { - @include color-var(map.get($theme-vars, 'primary-color'), --gn-primary-color); - @include background-color-var(map.get($theme-vars, 'primary-bg'), --gn-primary-bg); - .badge { - @include color-var(map.get($theme-vars, 'primary-bg'), --gn-primary-bg); - @include background-color-var(map.get($theme-vars, 'primary-color'), --gn-primary-color); - } - .dropdown-menu .badge { - @include color-var(map.get($theme-vars, 'primary-color'), --gn-primary-color); - @include background-color-var(map.get($theme-vars, 'primary-bg'), --gn-primary-bg); - } - } - .gn-menu-index-divider { - @include background-color-var(map.get($theme-vars, 'primary-color'), --gn-primary-color); - } - - .gn-filter-by-extent-map, - .gn-details-panel-preview, - .gn-details-panel-preview-loader, - .gn-resource-card .card-img-top, - .gn-loader-placeholder { - @include color-var(map.get($theme-vars, 'image-color'), --gn-image-color); - @include background-color-var(map.get($theme-vars, 'image-bg'), --gn-image-bg); - } - - .gn-hero { - @include color-var(map.get($theme-vars, 'jumbotron-color'), --gn-image-color); - @include background-color-var(map.get($theme-vars, 'jumbotron-bg'), --gn-image-bg); - } - - a { - @include color-var(map.get($theme-vars, 'link-color'), --gn-link-color); - text-decoration: none; - - @include hover() { - @include color-var(map.get($theme-vars, 'link-hover-color'), --gn-link-hover-color); - text-decoration: none; - } - } - - .custom-control-input:checked~.custom-control-label::before { - @include color-var(map.get($theme-vars, 'primary-color'), --gn-primary-color); - @include background-color-var(map.get($theme-vars, 'primary-bg'), --gn-primary-bg); - @include border-color-var(map.get($theme-vars, 'primary-bg'), --gn-primary-bg); - } - - .custom-switch .custom-control-input:checked~.custom-control-label::after { - @include background-color-var(map.get($theme-vars, 'primary-color'), --gn-primary-color); - } - - .gn-menu-index .gn-tag, - .gn-menu-index .btn-default { - @include color-var(map.get($theme-vars, 'primary-color'), --gn-primary-color); - @include background-color-var(map.get($theme-vars, 'primary-bg'), --gn-primary-bg); - border: none; - - &.active { - @include color-var(map.get($theme-vars, 'primary-bg'), --gn-primary-bg); - @include background-color-var(map.get($theme-vars, 'primary-color'), --gn-primary-color); - } - - @include hover() { - @include color-var(map.get($theme-vars, 'primary-bg'), --gn-primary-bg); - @include background-color-var(map.get($theme-vars, 'primary-color'), --gn-primary-color); - opacity: 1; - .badge { - @include color-var(map.get($theme-vars, 'primary-color'), --gn-primary-color); - @include background-color-var(map.get($theme-vars, 'primary-bg'), --gn-primary-bg); - } - } - } - - .btn-default { - color: inherit; - @include hover() { - color: inherit; - opacity: 0.8; - } - } - - .gn-details-panel.loading .gn-details-panel-content { - h1, a, p { - color: transparent; - @include background-color-var(map.get($theme-vars, 'placeholder-bg'), --gn-placeholder-bg); - } - } - - .gn-loader-placeholder .fa { - @include color-var(map.get($theme-vars, 'body-bg'), --gn-body-bg); - } - - .gn-resource-card { - .card-title a { - @include color-var(map.get($theme-vars, 'body-color'), --gn-body-color); - - @include hover() { - text-decoration: underline; - } - } - - .gn-tag { - @include color-var(map.get($theme-vars, 'body-color'), --gn-body-color); - font-size: inherit; - - @include hover() { - color: inherit; - background-color: transparent; - } - } - - &.active { - @include border-color-var(map.get($theme-vars, 'focus-color'), --gn-focus-color); - @include outline-color-var(map.get($theme-vars, 'focus-color'), --gn-focus-color); - } - - @include hover() { - @include border-color-var(map.get($theme-vars, 'focus-color'), --gn-focus-color); - } - } - - .gn-search-bar { - @include border-color-var(map.get($theme-vars, 'body-border-color'), --gn-body-border-color); - - &.focus { - @include outline-color-var(map.get($theme-vars, 'focus-color'), --gn-focus-color); - } - } - - .gn-tag { - @include color-var(map.get($theme-vars, 'tag-color'), --gn-tag-color); - background-color: transparent; - &.active { - @include color-var(map.get($theme-vars, 'tag-active-color'), --gn-tag-active-color); - @include background-color-var(map.get($theme-vars, 'tag-active-bg'), --gn-tag-active-bg); - } - @include hover() { - @include color-var(map.get($theme-vars, 'tag-hover-color'), --gn-tag-active-color); - @include background-color-var(map.get($theme-vars, 'tag-hover-bg'), --gn-tag-active-bg); - } - } - - .gn-footer { - @include color-var(map.get($theme-vars, 'footer-color'), --gn-footer-color); - @include background-color-var(map.get($theme-vars, 'footer-bg'), --gn-footer-bg); - a { - @include color-var(map.get($theme-vars, 'footer-link-color'), --gn-footer-link-color); - text-decoration: none; - - @include hover() { - @include color-var(map.get($theme-vars, 'footer-link-hover-color'), --gn-footer-link-hover-color); - text-decoration: none; - } - } - } - - .dropdown-item { - @include hover-focus() { - @include background-color-var(map.get($theme-vars, 'body-shade-bg'), --gn-body-shade-bg); - text-decoration: none; - } - - &.active, - &:active { - @include color-var(map.get($theme-vars, 'primary-color'), --gn-primary-color); - @include background-color-var(map.get($theme-vars, 'primary-bg'), --gn-primary-bg); - @include hover-focus() { - @include color-var(map.get($theme-vars, 'primary-color'), --gn-primary-color); - @include background-color-var(map.get($theme-vars, 'primary-bg'), --gn-primary-bg); - } - } - } - - .list-group-item-action { - @include color-var(map.get($theme-vars, 'body-color'), --gn-body-color); - @include background-color-var(map.get($theme-vars, 'body-bg'), --gn-body-bg); - @include hover-focus() { - @include color-var(map.get($theme-vars, 'body-shade-color'), --gn-body-shade-color); - @include background-color-var(map.get($theme-vars, 'body-shade-bg'), --gn-body-shade-bg); - } - &:active { - @include color-var(map.get($theme-vars, 'body-shade-color'), --gn-body-shade-color); - @include background-color-var(map.get($theme-vars, 'body-shade-bg'), --gn-body-shade-bg); - } - } - - .list-group-item { - @include color-var(map.get($theme-vars, 'body-color'), --gn-body-color); - @include background-color-var(map.get($theme-vars, 'body-bg'), --gn-body-bg); - @include border-color-var(map.get($theme-vars, 'body-border-color'), --gn-body-border-color); - - &.active { - @include color-var(map.get($theme-vars, 'body-shade-color'), --gn-body-shade-color); - @include background-color-var(map.get($theme-vars, 'body-shade-bg'), --gn-body-shade-bg); - @include border-color-var(map.get($theme-vars, 'body-border-color'), --gn-body-border-color); - } - } - @include react-select-theme($theme-vars); - } -} diff --git a/geonode_mapstore_client/client/themes/preview/less/geonode.less b/geonode_mapstore_client/client/themes/preview/less/geonode.less index dee9192a7d..afb3c5865e 100644 --- a/geonode_mapstore_client/client/themes/preview/less/geonode.less +++ b/geonode_mapstore_client/client/themes/preview/less/geonode.less @@ -6,22 +6,22 @@ @icon-size: 18px; @small-icon-size: 14px; - @padding-left-square: floor(@icon-size/@icon-margin-ratio); - @square-btn-size: @padding-left-square * 2 + @icon-size; + @padding-left-square: floor((@icon-size/@icon-margin-ratio)); + @square-btn-size: (@padding-left-square * 2 + @icon-size); - @icon-size-md: floor(26px / @icon-resize-ratio); - @padding-left-square-md: floor(@icon-size-md / @icon-margin-ratio); - @square-btn-medium-size: @padding-left-square-md * 2 + @icon-size-md; + @icon-size-md: floor((26px / @icon-resize-ratio)); + @padding-left-square-md: floor((@icon-size-md / @icon-margin-ratio)); + @square-btn-medium-size: (@padding-left-square-md * 2 + @icon-size-md); - @icon-size-sm: floor(@icon-size-md / @icon-resize-ratio); - @padding-left-square-sm: floor(@icon-size-sm / @icon-margin-ratio); - @square-btn-small-size: @padding-left-square-sm * 2 + @icon-size-sm; + @icon-size-sm: floor((@icon-size-md / @icon-resize-ratio)); + @padding-left-square-sm: floor((@icon-size-sm / @icon-margin-ratio)); + @square-btn-small-size: (@padding-left-square-sm * 2 + @icon-size-sm); @icon-size: 18px; - @padding-left-square: floor(@icon-size/@icon-margin-ratio); - @square-btn-size: @padding-left-square * 2 + @icon-size; + @padding-left-square: floor((@icon-size/@icon-margin-ratio)); + @square-btn-size: (@padding-left-square * 2 + @icon-size); @import (multiple) "~mapstore/web/client/themes/default/ms2-theme.less"; #mapstore-navbar-container{ height: @square-btn-size; @@ -48,6 +48,15 @@ } @import "../../default/less/geonode.less"; +// ensure the inline-flex of square-buttons does not override +// the vertical group style in preview mode +.btn-group-vertical > .btn, +.btn-group-vertical > .btn-group, +.btn-group-vertical > .btn-group > .btn { + display: block; + width: 100%; +} + #map{ bottom: 0px !important; }