design-comuni-plone-theme 10.2.0 → 10.2.2

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,30 @@
1
1
 
2
2
 
3
+ ## [10.2.2](https://github.com/redturtle/design-comuni-plone-theme/compare/v10.2.1...v10.2.2) (2023-11-07)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * header Metadata to h2 ([d2952b7](https://github.com/redturtle/design-comuni-plone-theme/commit/d2952b781df8b7e42f9e8c48999aa9f79538081e))
9
+
10
+
11
+ ### Maintenance
12
+
13
+ * preparing release ([6b70a73](https://github.com/redturtle/design-comuni-plone-theme/commit/6b70a739835175b39478156d29a6f144b1ecb9ae))
14
+
15
+ ## [10.2.1](https://github.com/redturtle/design-comuni-plone-theme/compare/v10.2.0...v10.2.1) (2023-11-06)
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * fix id for gallery video title ([5d35058](https://github.com/redturtle/design-comuni-plone-theme/commit/5d35058308c04eaa416146a3966a9cfb4915bbab))
21
+ * sidemenu by titles work only with h2 and not items with id #header-* ([71ca592](https://github.com/redturtle/design-comuni-plone-theme/commit/71ca5921f68ade764e9aaab47b529342befe51d3))
22
+
23
+
24
+ ### Maintenance
25
+
26
+ * updated publiccode ([3041114](https://github.com/redturtle/design-comuni-plone-theme/commit/3041114b59fced1d47ea05812f19006daf55eb0b))
27
+
3
28
  ## [10.2.0](https://github.com/RedTurtle/design-comuni-plone-theme/compare/v10.1.1...v10.2.0) (2023-11-06)
4
29
 
5
30
 
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": "10.2.0",
5
+ "version": "10.2.2",
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-11-06'
230
+ releaseDate: '2023-11-07'
231
231
  softwareType: standalone/web
232
- softwareVersion: 10.2.0
232
+ softwareVersion: 10.2.2
233
233
  url: 'https://github.com/italia/design-comuni-plone-theme'
234
234
  usedBy:
235
235
  - ASP Comuni Modenesi Area Nord
@@ -202,8 +202,18 @@ const Gallery = ({
202
202
  {title_video && (
203
203
  <div className="it-header-block">
204
204
  <div className="it-header-block-title">
205
- {title_type === 'h4' && <h4 id="galleria">{title_video}</h4>}
206
- {title_type === 'h5' && <h5 id="galleria">{title_video}</h5>}
205
+ {title_type === 'h2' && (
206
+ <h2 className="h4" id={title_id}>
207
+ {title_video}
208
+ </h2>
209
+ )}
210
+ {title_type === 'h3' && (
211
+ <h3 className="h5" id={title_id}>
212
+ {title_video}
213
+ </h3>
214
+ )}
215
+ {title_type === 'h4' && <h4 id={title_id}>{title_video}</h4>}
216
+ {title_type === 'h5' && <h5 id={title_id}>{title_video}</h5>}
207
217
  </div>
208
218
  </div>
209
219
  )}
@@ -43,9 +43,9 @@ const Metadata = ({
43
43
  className={cx('it-page-section', { 'mb-5': !noMargin })}
44
44
  >
45
45
  {showSectionTitle && title && (
46
- <h4 id="header-metadata" className="mb-3">
46
+ <h2 id="header-metadata" className="mb-3">
47
47
  {title}
48
- </h4>
48
+ </h2>
49
49
  )}
50
50
  {children}
51
51
  <p className="font-serif mb-0 mt-4 last-modified">
@@ -28,25 +28,14 @@ const extractHeaders = (elements, intl) => {
28
28
  for (var index = 0; index < elements.length; index++) {
29
29
  item = elements[index];
30
30
 
31
- if (item.id === 'text-body') {
32
- const h = item.getElementsByTagName('h2');
33
-
34
- for (var hi = 0; hi < h.length; hi++) {
35
- headers.push({
36
- id: h[hi].id,
37
- title: h[hi].innerText,
38
- item: h[hi],
39
- });
40
- }
41
- } else {
42
- let item_header = item.querySelector('#header-' + item.id);
43
- if (item_header) {
44
- headers.push({
45
- id: item.id,
46
- title: item_header.textContent,
47
- item: item,
48
- });
49
- }
31
+ const h = item.getElementsByTagName('h2');
32
+
33
+ for (var hi = 0; hi < h.length; hi++) {
34
+ headers.push({
35
+ id: h[hi].id,
36
+ title: h[hi].innerText,
37
+ item: h[hi],
38
+ });
50
39
  }
51
40
  }
52
41
  return headers;