From 3680a0b51c4c9d5455d4b430074de9af9ecc4af1 Mon Sep 17 00:00:00 2001 From: Wagner Trezub Date: Thu, 1 Feb 2024 10:44:22 +0100 Subject: [PATCH] fix: more fixes for subsite and info block --- .../ItaliaTheme/Blocks/Info/Edit.jsx | 8 ++---- theme/ItaliaTheme/Blocks/_info.scss | 11 +++++++- .../Subsites/ItaliaTheme/Blocks/_info.scss | 28 +++++++++++++++++++ theme/ItaliaTheme/Subsites/_mixin.scss | 3 ++ 4 files changed, 43 insertions(+), 7 deletions(-) create mode 100644 theme/ItaliaTheme/Subsites/ItaliaTheme/Blocks/_info.scss diff --git a/src/components/ItaliaTheme/Blocks/Info/Edit.jsx b/src/components/ItaliaTheme/Blocks/Info/Edit.jsx index 706e35702..9642ccec0 100644 --- a/src/components/ItaliaTheme/Blocks/Info/Edit.jsx +++ b/src/components/ItaliaTheme/Blocks/Info/Edit.jsx @@ -9,12 +9,8 @@ import { connect } from 'react-redux'; import { compose } from 'redux'; import { injectIntl } from 'react-intl'; import cx from 'classnames'; -import { - Container, - Row, - Col, - Icon, -} from 'design-react-kit/dist/design-react-kit'; +import { Container, Row, Col } from 'design-react-kit/dist/design-react-kit'; +import { Icon } from '@italia/components/ItaliaTheme'; import { createContent } from '@plone/volto/actions'; import { SidebarPortal } from '@plone/volto/components'; diff --git a/theme/ItaliaTheme/Blocks/_info.scss b/theme/ItaliaTheme/Blocks/_info.scss index 99c577ea2..eb7ae44df 100644 --- a/theme/ItaliaTheme/Blocks/_info.scss +++ b/theme/ItaliaTheme/Blocks/_info.scss @@ -37,10 +37,19 @@ $tertiary-hover: darken($gray-border, 10%); &.bg-color-true { .draftjs-buttons a { background-color: #fff; + border: 1px solid transparent; color: $text-color; + span { + color: $text-color; + } + &:hover { - background-color: #000; + background-color: $primary; + border-color: #fff; color: #fff; + span { + color: #fff; + } } } } diff --git a/theme/ItaliaTheme/Subsites/ItaliaTheme/Blocks/_info.scss b/theme/ItaliaTheme/Subsites/ItaliaTheme/Blocks/_info.scss new file mode 100644 index 000000000..3d3f58db0 --- /dev/null +++ b/theme/ItaliaTheme/Subsites/ItaliaTheme/Blocks/_info.scss @@ -0,0 +1,28 @@ +@use '../../all_variables' as *; + +@mixin info($subsite-primary) { + .public-ui, + &.public-ui { + .infoblock { + .bg-alert-primary, + .bg-alert-secondary, + .bg-alert-tertiary { + &.bg-color-true { + .draftjs-buttons a { + &:hover { + background-color: $subsite-primary; + } + } + } + } + .bg-alert-primary.bg-color-true { + p, + span, + svg.icon.left-image { + color: $body-color; + fill: $body-color; + } + } + } + } +} diff --git a/theme/ItaliaTheme/Subsites/_mixin.scss b/theme/ItaliaTheme/Subsites/_mixin.scss index a92ddd5ec..06c7eee30 100644 --- a/theme/ItaliaTheme/Subsites/_mixin.scss +++ b/theme/ItaliaTheme/Subsites/_mixin.scss @@ -19,6 +19,7 @@ @use 'ItaliaTheme/Blocks/highlitedContent' as it-highlight; @use 'ItaliaTheme/Blocks/argumentsInEvidence' as it-args-evidence; @use 'ItaliaTheme/Blocks/searchSections' as it-search-sections; +@use 'ItaliaTheme/Blocks/info' as it-info; @use 'ItaliaTheme/Views/common' as it-views; @use 'ItaliaTheme/common' as it-common; @use 'ItaliaTheme/cms-ui' as it-cms-ui; @@ -99,6 +100,8 @@ $subsite-secondary, $subsite-secondary-text ); + @include it-info.info($subsite-primary); + @include it-views.common( $subsite-primary, $subsite-secondary,