design-comuni-plone-theme 8.7.11 → 8.7.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
 
2
2
 
3
+ ## [8.7.12](https://github.com/RedTurtle/design-comuni-plone-theme/compare/v8.7.11...v8.7.12) (2023-10-27)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * backport white header preset from child themes and fix header mobile ([#380](https://github.com/RedTurtle/design-comuni-plone-theme/issues/380)) ([60276ec](https://github.com/RedTurtle/design-comuni-plone-theme/commit/60276ecc3aa0dc51016f0bc8d1fad2e4a09ccd4e))
9
+ * fixed conditions for rendering + fix title tag ([#371](https://github.com/RedTurtle/design-comuni-plone-theme/issues/371)) ([522774b](https://github.com/RedTurtle/design-comuni-plone-theme/commit/522774bee6dafd21dc09beef2fbc5b70936b7944))
10
+ * icon component for TextSizeButton in RichTextEditor ([#379](https://github.com/RedTurtle/design-comuni-plone-theme/issues/379)) ([d2160ce](https://github.com/RedTurtle/design-comuni-plone-theme/commit/d2160ce95eb8c98f1221c690f019ec42c20c8fcd))
11
+ * overlapping block chooser in small pages/screens ([#372](https://github.com/RedTurtle/design-comuni-plone-theme/issues/372)) ([3035ea2](https://github.com/RedTurtle/design-comuni-plone-theme/commit/3035ea2b2c1e7ddfa3968d3d685614cb3dda097d))
12
+ * release-log class added ([#376](https://github.com/RedTurtle/design-comuni-plone-theme/issues/376)) ([92e5a68](https://github.com/RedTurtle/design-comuni-plone-theme/commit/92e5a680afd15bc25a8b8eb97ab96845f77e8294))
13
+ * release-log text ([#377](https://github.com/RedTurtle/design-comuni-plone-theme/issues/377)) ([46a4d5f](https://github.com/RedTurtle/design-comuni-plone-theme/commit/46a4d5f174d9dedd6cf190466a88ade0d6746d68))
14
+
15
+
16
+ ### Documentation
17
+
18
+ * updated publiccode and release log ([b1e9e81](https://github.com/RedTurtle/design-comuni-plone-theme/commit/b1e9e81c3506851e41b5f35d866353b579358edd))
19
+ * updated publiccode and release log ([276ca06](https://github.com/RedTurtle/design-comuni-plone-theme/commit/276ca0605b13923f2941a9ec843ca7e04dce20a1))
20
+
3
21
  ## [8.7.11](https://github.com/redturtle/design-comuni-plone-theme/compare/v8.7.10...v8.7.11) (2023-10-23)
4
22
 
5
23
 
package/RELEASE.md CHANGED
@@ -41,6 +41,15 @@
41
41
  - ...
42
42
  -->
43
43
 
44
+ ## Versione 8.7.12 (27/10/2023)
45
+
46
+ ### Fix
47
+
48
+ - Migliorato il dimensionamento dell'icona del menù su dispositivi mobile
49
+ - Sistemata dimensione logo e bottone di ricerca su dispositivi mobile
50
+ - Migliorato il comportamento del menu laterale dei contenuti quando si aggiungono file nelle cartelle al loro interno
51
+ - Sistemata sovrapposizione della finestra di selezione blocchi con l'header del sito per alcune dimensioni dello schermo
52
+
44
53
  ## Versione 8.7.10 (19/10/2023)
45
54
 
46
55
  ## Fix
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "design-comuni-plone-theme",
3
3
  "description": "Volto Theme for Italia design guidelines",
4
4
  "license": "GPL-v3",
5
- "version": "8.7.11",
5
+ "version": "8.7.12",
6
6
  "main": "src/index.js",
7
7
  "keywords": [
8
8
  "volto-addon",
package/publiccode.yml CHANGED
@@ -227,9 +227,9 @@ maintenance:
227
227
  name: io-Comune - Il sito AgID per Comuni ed Enti Pubblici
228
228
  platforms:
229
229
  - web
230
- releaseDate: '2023-10-23'
230
+ releaseDate: '2023-10-27'
231
231
  softwareType: standalone/web
232
- softwareVersion: 8.7.11
232
+ softwareVersion: 8.7.12
233
233
  url: 'https://github.com/italia/design-comuni-plone-theme'
234
234
  usedBy:
235
235
  - ASP Comuni Modenesi Area Nord
@@ -104,17 +104,13 @@ const Attachments = ({
104
104
  <RichTextSection
105
105
  tag_id={article_id}
106
106
  className="it-page-section mb-5"
107
- title={
108
- title ? (
109
- <h2 id={`header-${article_id}`}>{title}</h2>
110
- ) : (
111
- <h2 id={`header-${article_id}`}>
112
- {intl.formatMessage(messages.attachments)}
113
- </h2>
114
- )
115
- }
107
+ title={title ? title : intl.formatMessage(messages.attachments)}
116
108
  >
117
109
  {attachments.length > 0 && attachments_view}
110
+ {/** aggiunte conditions per attendere il render del componente mentre
111
+ * i risultati della query stanno ancora caricando
112
+ */}
113
+ {searchResults?.[key]?.loading && !searchResults?.[key]?.loaded && <></>}
118
114
  </RichTextSection>
119
115
  ) : (
120
116
  <div className="mb-5 mt-3">
@@ -1,4 +1,4 @@
1
- h2 {
1
+ .release-log h2 {
2
2
  border-top: 1px solid grey;
3
3
  font-weight: 600 !important;
4
4
  }
@@ -100,7 +100,7 @@ const ReleaseLog = () => {
100
100
  <Helmet>
101
101
  <meta name="robots" content="noindex" />
102
102
  </Helmet>
103
- <Container className="px-4 my-4">
103
+ <Container className="px-4 my-4 release-log">
104
104
  <h1>Lista degli aggiornamenti</h1>
105
105
  <Nav tabs className="mb-3">
106
106
  {LOGS_TO_VIEW.filter((log) => log.file != null).map((log) => (
@@ -126,11 +126,11 @@ const ReleaseLog = () => {
126
126
  <div
127
127
  dangerouslySetInnerHTML={{
128
128
  __html:
129
- log.name === 'io-comune' ? (
129
+ log.name === 'io-Comune' ? (
130
130
  logDCPT
131
- ) : log.name == 'io-cittadino' ? (
131
+ ) : log.name == 'io-Cittadino' ? (
132
132
  logIoCittadino
133
- ) : log.name == 'io-prenoto' ? (
133
+ ) : log.name == 'io-Prenoto' ? (
134
134
  logIoPrenoto
135
135
  ) : (
136
136
  <div></div>
@@ -59,7 +59,7 @@ const TextSizeButton = (props) => {
59
59
  const createInlineStyleButton = props.draftJsCreateInlineStyleButton.default;
60
60
  return createInlineStyleButton({
61
61
  style: 'TEXT_LARGER',
62
- children: ButtonIcon,
62
+ children: <ButtonIcon />,
63
63
  });
64
64
  };
65
65
  export default TextSizeButton;
@@ -0,0 +1,157 @@
1
+ /* CUSTOMIZATIONS
2
+ - zindex for handling overlapping in small pages
3
+ */
4
+
5
+ import React from 'react';
6
+ import { doesNodeContainClick } from 'semantic-ui-react/dist/commonjs/lib';
7
+ import addSVG from '@plone/volto/icons/circle-plus.svg';
8
+ import { blockHasValue } from '@plone/volto/helpers';
9
+ import { Icon, BlockChooser } from '@plone/volto/components';
10
+ import config from '@plone/volto/registry';
11
+ import { Button, Ref } from 'semantic-ui-react';
12
+ import { defineMessages, useIntl } from 'react-intl';
13
+ import { usePopper } from 'react-popper';
14
+ import { Portal } from 'react-portal';
15
+
16
+ const messages = defineMessages({
17
+ addBlock: {
18
+ id: 'Add block',
19
+ defaultMessage: 'Add block',
20
+ },
21
+ });
22
+
23
+ export const ButtonComponent = (props) => {
24
+ const intl = useIntl();
25
+ const {
26
+ className = `block-add-button${
27
+ config.experimental.addBlockButton.enabled ? ' new-add-block' : ''
28
+ }`,
29
+ size = '19px',
30
+ onShowBlockChooser,
31
+ } = props;
32
+
33
+ return (
34
+ <Button
35
+ icon
36
+ basic
37
+ title={intl.formatMessage(messages.addBlock)}
38
+ onClick={(e) => {
39
+ e.preventDefault();
40
+ e.stopPropagation();
41
+ onShowBlockChooser();
42
+ }}
43
+ className={className}
44
+ >
45
+ <Icon name={addSVG} className={className} size={size} />
46
+ </Button>
47
+ );
48
+ };
49
+
50
+ const BlockChooserButton = (props) => {
51
+ const {
52
+ block,
53
+ allowedBlocks,
54
+ showRestricted,
55
+ data,
56
+ onMutateBlock,
57
+ onInsertBlock,
58
+ blocksConfig,
59
+ buttonComponent,
60
+ properties,
61
+ } = props;
62
+ const { disableNewBlocks } = data;
63
+ const [addNewBlockOpened, setAddNewBlockOpened] = React.useState(false);
64
+
65
+ const blockChooserRef = React.useRef();
66
+
67
+ const handleClickOutside = React.useCallback((e) => {
68
+ if (
69
+ blockChooserRef.current &&
70
+ doesNodeContainClick(blockChooserRef.current, e)
71
+ )
72
+ return;
73
+ setAddNewBlockOpened(false);
74
+ }, []);
75
+
76
+ const Component = buttonComponent || ButtonComponent;
77
+
78
+ React.useEffect(() => {
79
+ document.addEventListener('mousedown', handleClickOutside, false);
80
+ return () => {
81
+ document.removeEventListener('mousedown', handleClickOutside, false);
82
+ };
83
+ }, [handleClickOutside]);
84
+
85
+ const [referenceElement, setReferenceElement] = React.useState(null);
86
+ const [popperElement, setPopperElement] = React.useState(null);
87
+ const { styles, attributes } = usePopper(referenceElement, popperElement, {
88
+ placement: config.experimental.addBlockButton.enabled
89
+ ? 'bottom'
90
+ : 'right-start',
91
+ modifiers: [
92
+ {
93
+ name: 'offset',
94
+ options: {
95
+ offset: [-10, 5],
96
+ },
97
+ },
98
+ {
99
+ name: 'flip',
100
+ options: {
101
+ fallbackPlacements: ['right-end', 'top-start'],
102
+ },
103
+ },
104
+ ],
105
+ });
106
+
107
+ return (
108
+ <>
109
+ {!disableNewBlocks &&
110
+ (config.experimental.addBlockButton.enabled ||
111
+ !blockHasValue(data)) && (
112
+ <Ref innerRef={setReferenceElement}>
113
+ <Component
114
+ {...props}
115
+ onShowBlockChooser={() => setAddNewBlockOpened(true)}
116
+ />
117
+ </Ref>
118
+ )}
119
+ {addNewBlockOpened && (
120
+ <Portal node={document.getElementById('body')}>
121
+ <div
122
+ ref={setPopperElement}
123
+ style={{ ...styles.popper, zIndex: 1000 }}
124
+ {...attributes.popper}
125
+ >
126
+ <BlockChooser
127
+ onMutateBlock={
128
+ onMutateBlock
129
+ ? (id, value) => {
130
+ setAddNewBlockOpened(false);
131
+ onMutateBlock(id, value);
132
+ }
133
+ : null
134
+ }
135
+ onInsertBlock={
136
+ onInsertBlock
137
+ ? (id, value) => {
138
+ setAddNewBlockOpened(false);
139
+ onInsertBlock(id, value);
140
+ }
141
+ : null
142
+ }
143
+ currentBlock={block}
144
+ allowedBlocks={allowedBlocks}
145
+ blocksConfig={blocksConfig}
146
+ properties={properties}
147
+ showRestricted={showRestricted}
148
+ ref={blockChooserRef}
149
+ />
150
+ </div>
151
+ </Portal>
152
+ )}
153
+ </>
154
+ );
155
+ };
156
+
157
+ export default BlockChooserButton;
@@ -55,10 +55,6 @@ a {
55
55
  color: $secondary-text !important;
56
56
  }
57
57
 
58
- button.custom-navbar-toggler svg.icon {
59
- fill: $secondary-text;
60
- }
61
-
62
58
  ::selection {
63
59
  background-color: default;
64
60
  }
@@ -0,0 +1,62 @@
1
+ @if ($enable-header-white-background) {
2
+ .it-header-wrapper {
3
+ .it-header-center-wrapper {
4
+ .it-header-center-content-wrapper {
5
+ .it-brand-wrapper {
6
+ .it-brand-text,
7
+ .it-brand-text h2,
8
+ .it-brand-text h3 {
9
+ color: $text-color;
10
+ font-weight: 700;
11
+ }
12
+ }
13
+
14
+ .it-right-zone {
15
+ color: $text-color;
16
+
17
+ .it-socials {
18
+ ul {
19
+ .icon {
20
+ color: $primary;
21
+ fill: $primary;
22
+ }
23
+
24
+ a:hover svg {
25
+ fill: darken($primary, 10%);
26
+ }
27
+ }
28
+ }
29
+
30
+ .it-search-wrapper a.rounded-icon {
31
+ background-color: $primary;
32
+ color: white;
33
+
34
+ &:hover {
35
+ background-color: darken($primary, 10%);
36
+ }
37
+ }
38
+ }
39
+ }
40
+ }
41
+
42
+ .it-header-navbar-wrapper {
43
+ background-color: $primary;
44
+ }
45
+
46
+ .navbar .navbar-collapsable {
47
+ .menu-wrapper .it-brand-wrapper {
48
+ .it-brand-text,
49
+ .it-brand-text h2,
50
+ .it-brand-text h3 {
51
+ color: $text-color;
52
+ font-weight: 700;
53
+ }
54
+ }
55
+ }
56
+ @media (max-width: map-get($map: $grid-breakpoints, $key: 'lg') - 1px) {
57
+ button.custom-navbar-toggler svg.icon {
58
+ fill: $primary;
59
+ }
60
+ }
61
+ }
62
+ }
@@ -19,6 +19,12 @@ $tertiary-text: #fff !default;
19
19
  $highlight-search: #ff0 !default;
20
20
  $font-family-monospace-light: Roboto Mono Light !default;
21
21
 
22
+ // Per abilitare l'header bianco impostare a true
23
+ // e impostare "$header-center-bg-color: white" come qui sotto
24
+ $enable-header-white-background: false;
25
+ // $header-center-bg-color: white;
26
+ // $header-slim-bg-color: #3f3f3f;
27
+
22
28
  // GDPR-BANNER RELATED
23
29
  $gdpr-accept-all: #005700 !default;
24
30
  $gdpr-toggle-checked: #005700 !default;
@@ -188,6 +188,7 @@
188
188
  @import 'bootstrap-italia/src/scss/custom/headernavbar';
189
189
  @import 'bootstrap-italia/src/scss/custom/headernavbartheme';
190
190
  @import 'bootstrap-italia/src/scss/custom/header';
191
+ @import './bootstrap-italia/header';
191
192
 
192
193
  // footer
193
194
  @import 'bootstrap-italia/src/scss/custom/footer';
@@ -0,0 +1,19 @@
1
+ .it-header-wrapper {
2
+ @media (max-width: map-get($map: $grid-breakpoints, $key: 'lg') - 1px) {
3
+ .it-header-navbar-wrapper {
4
+ background-color: transparent;
5
+
6
+ > .container {
7
+ padding: 0;
8
+ }
9
+ }
10
+
11
+ .it-nav-wrapper .it-header-navbar-wrapper nav {
12
+ padding-right: 0;
13
+ }
14
+
15
+ .it-nav-wrapper .it-header-navbar-wrapper {
16
+ margin-top: -20px;
17
+ }
18
+ }
19
+ }
@@ -24,4 +24,23 @@
24
24
  }
25
25
  }
26
26
  }
27
+
28
+ @media (max-width: map-get($map: $grid-breakpoints, $key: 'lg') - 1px) {
29
+ .it-header-center-content-wrapper {
30
+ .it-brand-wrapper {
31
+ .header-logo {
32
+ img {
33
+ width: 30px;
34
+ height: 30px;
35
+ }
36
+ }
37
+ }
38
+
39
+ .it-right-zone .it-search-wrapper a.rounded-icon {
40
+ width: 36px;
41
+ height: 36px;
42
+ border-radius: 50%;
43
+ }
44
+ }
45
+ }
27
46
  }
@@ -21,6 +21,7 @@
21
21
  @import 'ItaliaTheme/css_variables';
22
22
  @import 'ItaliaTheme/common';
23
23
  @import 'ItaliaTheme/main';
24
+ @import 'ItaliaTheme/white-header';
24
25
  @import 'ItaliaTheme/ar';
25
26
  @import 'ItaliaTheme/home';
26
27
  @import 'ItaliaTheme/sitemap';