design-comuni-plone-theme 10.2.0 → 10.2.1

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,18 @@
1
1
 
2
2
 
3
+ ## [10.2.1](https://github.com/redturtle/design-comuni-plone-theme/compare/v10.2.0...v10.2.1) (2023-11-06)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * fix id for gallery video title ([5d35058](https://github.com/redturtle/design-comuni-plone-theme/commit/5d35058308c04eaa416146a3966a9cfb4915bbab))
9
+ * sidemenu by titles work only with h2 and not items with id #header-* ([71ca592](https://github.com/redturtle/design-comuni-plone-theme/commit/71ca5921f68ade764e9aaab47b529342befe51d3))
10
+
11
+
12
+ ### Maintenance
13
+
14
+ * updated publiccode ([3041114](https://github.com/redturtle/design-comuni-plone-theme/commit/3041114b59fced1d47ea05812f19006daf55eb0b))
15
+
3
16
  ## [10.2.0](https://github.com/RedTurtle/design-comuni-plone-theme/compare/v10.1.1...v10.2.0) (2023-11-06)
4
17
 
5
18
 
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.1",
6
6
  "main": "src/index.js",
7
7
  "keywords": [
8
8
  "volto-addon",
package/publiccode.yml CHANGED
@@ -229,7 +229,7 @@ platforms:
229
229
  - web
230
230
  releaseDate: '2023-11-06'
231
231
  softwareType: standalone/web
232
- softwareVersion: 10.2.0
232
+ softwareVersion: 10.2.1
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
  )}
@@ -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;