design-comuni-plone-theme 11.0.0 → 11.0.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 +25 -0
- package/RELEASE.md +7 -1
- package/package.json +1 -1
- package/publiccode.yml +2 -2
- package/src/components/ItaliaTheme/Blocks/VideoGallery/Block/ViewBlock.jsx +1 -1
- package/src/components/ItaliaTheme/View/Commons/EmbeddedVideo.jsx +1 -1
- package/src/components/ItaliaTheme/View/ServizioView/ServizioMetatag.jsx +15 -13
- package/src/helpers/videoUrlHelper.js +3 -5
- package/src/helpers/videoUrlHelper.test.js +1 -1
- package/src/theme/ItaliaTheme/Subsites/ItaliaTheme/Blocks/_searchSections.scss +6 -0
- package/src/theme/ItaliaTheme/Subsites/ItaliaTheme/_common.scss +50 -5
- package/src/theme/ItaliaTheme/Subsites/bootstrap-italia/custom/_card.scss +5 -0
- package/src/theme/ItaliaTheme/Subsites/bootstrap-italia/custom/_headercenter.scss +3 -3
- package/src/theme/ItaliaTheme/Subsites/bootstrap-italia/custom/_navigation.scss +7 -19
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
+
## [11.0.2](https://github.com/redturtle/design-comuni-plone-theme/compare/v11.0.1...v11.0.2) (2023-12-20)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* subsite mixin styles ([#442](https://github.com/redturtle/design-comuni-plone-theme/issues/442)) ([84719fe](https://github.com/redturtle/design-comuni-plone-theme/commit/84719fe08521076c62e09c2ad1fd840fb65e6f45))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Documentation
|
|
12
|
+
|
|
13
|
+
* updated publiccode ([aed0730](https://github.com/redturtle/design-comuni-plone-theme/commit/aed073008414c8ca7f4b726410ec20f9333ff297))
|
|
14
|
+
|
|
15
|
+
## [11.0.1](https://github.com/redturtle/design-comuni-plone-theme/compare/v11.0.0...v11.0.1) (2023-12-19)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* schema.org serviceUrl construction ([93f0f39](https://github.com/redturtle/design-comuni-plone-theme/commit/93f0f39bc817cf40ad506e7dd4b6d8f2ada41e18))
|
|
21
|
+
* youtube preview image ([#441](https://github.com/redturtle/design-comuni-plone-theme/issues/441)) ([93af45c](https://github.com/redturtle/design-comuni-plone-theme/commit/93af45cd2dce0cd6de83174660b665399096e481))
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### Documentation
|
|
25
|
+
|
|
26
|
+
* updated publiccode and release log ([13befcb](https://github.com/redturtle/design-comuni-plone-theme/commit/13befcb56bf3a7d527b552369f253efeb5f5cd5a))
|
|
27
|
+
|
|
3
28
|
## [11.0.0](https://github.com/redturtle/design-comuni-plone-theme/compare/v10.6.4...v11.0.0) (2023-12-18)
|
|
4
29
|
|
|
5
30
|
|
package/RELEASE.md
CHANGED
package/package.json
CHANGED
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-12-
|
|
230
|
+
releaseDate: '2023-12-20'
|
|
231
231
|
softwareType: standalone/web
|
|
232
|
-
softwareVersion: 11.0.
|
|
232
|
+
softwareVersion: 11.0.2
|
|
233
233
|
url: 'https://github.com/italia/design-comuni-plone-theme'
|
|
234
234
|
usedBy:
|
|
235
235
|
- ASP Comuni Modenesi Area Nord
|
|
@@ -47,7 +47,7 @@ const ViewBlock = ({ data, index, isEditMode = false }) => {
|
|
|
47
47
|
const videoID = data.url.match(/.be\//)
|
|
48
48
|
? data.url.match(/^.*\.be\/(.*)/)?.[1]
|
|
49
49
|
: data.url.match(/^.*\?v=(.*)$/)?.[1];
|
|
50
|
-
placeholder = 'https://img.youtube.com/vi/' + videoID + '/
|
|
50
|
+
placeholder = 'https://img.youtube.com/vi/' + videoID + '/hqdefault.jpg';
|
|
51
51
|
} else if (data.url.match('vimeo')) {
|
|
52
52
|
const videoID = data.url.match(/^.*\.com\/(.*)/)[1];
|
|
53
53
|
placeholder = 'https://vumbnail.com/' + videoID + '.jpg';
|
|
@@ -56,7 +56,7 @@ const EmbeddedVideo = ({ video_url, title, id }) => {
|
|
|
56
56
|
defaultActive: false,
|
|
57
57
|
autoplay: false,
|
|
58
58
|
aspectRatio: '16:9',
|
|
59
|
-
placeholder: 'https://img.youtube.com/vi/' + video_id + '/
|
|
59
|
+
placeholder: 'https://img.youtube.com/vi/' + video_id + '/hqdefault.jpg',
|
|
60
60
|
tabIndex: 0,
|
|
61
61
|
onKeyPress: onKeyDown,
|
|
62
62
|
ref: ref,
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { Helmet, toPublicURL } from '@plone/volto/helpers';
|
|
1
|
+
import { Helmet, toPublicURL, isInternalURL } from '@plone/volto/helpers';
|
|
2
2
|
import { getSiteProperty } from 'design-comuni-plone-theme/helpers';
|
|
3
3
|
import { richTextHasContent } from 'design-comuni-plone-theme/components/ItaliaTheme/View';
|
|
4
4
|
|
|
5
|
+
const fieldDataToPlainText = (field) => {
|
|
6
|
+
return field.blocks_layout.items.reduce((accumulator, item, index) => {
|
|
7
|
+
if (field.blocks[item]['@type'] === 'text') {
|
|
8
|
+
if (index > 0) accumulator += ' ';
|
|
9
|
+
accumulator += field.blocks[item].text?.blocks[0].text ?? '';
|
|
10
|
+
}
|
|
11
|
+
return accumulator;
|
|
12
|
+
}, '');
|
|
13
|
+
};
|
|
14
|
+
|
|
5
15
|
const ServizioMetatag = ({ content }) => {
|
|
6
16
|
const siteTitle = getSiteProperty('siteTitle');
|
|
7
17
|
|
|
8
|
-
const fieldDataToPlainText = (field) => {
|
|
9
|
-
return field.blocks_layout.items.reduce((accumulator, item, index) => {
|
|
10
|
-
if (field.blocks[item]['@type'] === 'text') {
|
|
11
|
-
if (index > 0) accumulator += ' ';
|
|
12
|
-
accumulator += field.blocks[item].text?.blocks[0].text ?? '';
|
|
13
|
-
}
|
|
14
|
-
return accumulator;
|
|
15
|
-
}, '');
|
|
16
|
-
};
|
|
17
|
-
|
|
18
18
|
const schemaOrg = {
|
|
19
19
|
'@context': 'https://schema.org',
|
|
20
20
|
'@type': 'GovernmentService',
|
|
@@ -49,9 +49,11 @@ const ServizioMetatag = ({ content }) => {
|
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
if (content.canale_digitale_link) {
|
|
52
|
-
schemaOrg.availableChannel.serviceUrl =
|
|
52
|
+
schemaOrg.availableChannel.serviceUrl = isInternalURL(
|
|
53
53
|
content.canale_digitale_link,
|
|
54
|
-
)
|
|
54
|
+
)
|
|
55
|
+
? toPublicURL(content.canale_digitale_link)
|
|
56
|
+
: content.canale_digitale_link;
|
|
55
57
|
} else {
|
|
56
58
|
schemaOrg.availableChannel.serviceUrl = toPublicURL(content['@id']);
|
|
57
59
|
}
|
|
@@ -4,13 +4,11 @@ import { isInternalURL, flattenToAppURL } from '@plone/volto/helpers';
|
|
|
4
4
|
// test against all yt link formats I am aware of, not easy, can't find official docs.
|
|
5
5
|
// Try all possible formats, match an alphanumeric token in the expected position, length should be 10-20 chars, that's the ID.
|
|
6
6
|
// Reference sheet used and improved with support to shorts: https://gist.github.com/rodrigoborgesdeoliveira/987683cfbfcc8d800192da1e73adc486
|
|
7
|
-
const ytReg =
|
|
8
|
-
/^(?:http|https?:)?(?:\/\/)?(?:(?:www\.|m\.)?youtube(?:-nocookie)?\.com\/(?:(?:watch)?\?(?:feature=\w*&)?vi?=|embed\/|vi?\/|e\/|shorts\/)|youtu.be\/)([\w\-]{10,20})/i;
|
|
7
|
+
const ytReg = /^(?:http|https?:)?(?:\/\/)?(?:(?:www\.|m\.)?youtube(?:-nocookie)?\.com\/(?:(?:watch)?\?(?:feature=\w*&)?vi?=|embed\/|vi?\/|e\/|shorts\/)|youtu.be\/)([\w\-]{10,20})/i;
|
|
9
8
|
|
|
10
9
|
// Vimeo IDs should be only digits, let's try to get only a group of digits and suppose that's the video ID, scrap everything after.
|
|
11
10
|
// Docs link, watch for changes https://developer.vimeo.com/api/common-formats
|
|
12
|
-
const vimeoReg =
|
|
13
|
-
/(?:http|https)?:?\/?\/?(?:www\.)?(?:player\.)?vimeo\.com\/(?:(?:channels\/(?:[\w*\/]*\/))|(?:groups\/(?:[\w*\/]*\/))|(?:videos\/|video\/|albums\/))?(\d+)/i;
|
|
11
|
+
const vimeoReg = /(?:http|https)?:?\/?\/?(?:www\.)?(?:player\.)?vimeo\.com\/(?:(?:channels\/(?:[\w*\/]*\/))|(?:groups\/(?:[\w*\/]*\/))|(?:videos\/|video\/|albums\/))?(\d+)/i;
|
|
14
12
|
|
|
15
13
|
// Use regex against url to get video ID, video urls supported are youtube and vimeo.
|
|
16
14
|
// Return videoID and placeholder (if needed), null if no match found.
|
|
@@ -25,7 +23,7 @@ export const videoUrlHelper = (url, previewImage) => {
|
|
|
25
23
|
if (ytVideoMatch) {
|
|
26
24
|
videoID = ytVideoMatch[1];
|
|
27
25
|
if (!placeholder)
|
|
28
|
-
placeholder = 'https://img.youtube.com/vi/' + videoID + '/
|
|
26
|
+
placeholder = 'https://img.youtube.com/vi/' + videoID + '/hqdefault.jpg';
|
|
29
27
|
|
|
30
28
|
return [videoID, placeholder];
|
|
31
29
|
} else {
|
|
@@ -294,7 +294,7 @@ describe('videoUrlHelper', () => {
|
|
|
294
294
|
);
|
|
295
295
|
|
|
296
296
|
expect(placeholder).toBe(
|
|
297
|
-
'https://img.youtube.com/vi/' + YT_TEST_ID + '/
|
|
297
|
+
'https://img.youtube.com/vi/' + YT_TEST_ID + '/hqdefault.jpg',
|
|
298
298
|
);
|
|
299
299
|
});
|
|
300
300
|
it('generates vimeo placeholder correctly', async () => {
|
|
@@ -27,11 +27,6 @@
|
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
// TO DO: questo serve?
|
|
31
|
-
// a.btn-tertiary {
|
|
32
|
-
// color: $subsite-tertiary-text;
|
|
33
|
-
// }
|
|
34
|
-
|
|
35
30
|
.btn-outline-tertiary {
|
|
36
31
|
@include button-outline-variant($subsite-tertiary);
|
|
37
32
|
}
|
|
@@ -45,11 +40,34 @@
|
|
|
45
40
|
background-color: $subsite-primary !important;
|
|
46
41
|
}
|
|
47
42
|
|
|
43
|
+
//fix per bg-primary in CT servizio
|
|
44
|
+
// .contenttype-servizio {
|
|
45
|
+
.it-page-section.bg-primary {
|
|
46
|
+
background-color: $subsite-primary-a0 !important;
|
|
47
|
+
}
|
|
48
|
+
// }
|
|
49
|
+
|
|
48
50
|
.bg-secondary {
|
|
49
51
|
background-color: $subsite-secondary !important;
|
|
50
52
|
color: $subsite-secondary-text;
|
|
51
53
|
}
|
|
52
54
|
|
|
55
|
+
//text
|
|
56
|
+
.text-primary {
|
|
57
|
+
color: $subsite-primary-text !important;
|
|
58
|
+
}
|
|
59
|
+
.select-pill.text-primary {
|
|
60
|
+
color: $subsite-primary !important;
|
|
61
|
+
|
|
62
|
+
div {
|
|
63
|
+
color: inherit;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.text-secondary {
|
|
68
|
+
color: $subsite-secondary-text !important;
|
|
69
|
+
}
|
|
70
|
+
|
|
53
71
|
//btn mini
|
|
54
72
|
.select-all-cts.btn.btn-link.btn-mini,
|
|
55
73
|
.subsite-header .text a.select-all-cts.btn-link.btn-mini {
|
|
@@ -293,6 +311,10 @@
|
|
|
293
311
|
|
|
294
312
|
// date picker - general
|
|
295
313
|
.DateRangePicker {
|
|
314
|
+
td.CalendarDay_default {
|
|
315
|
+
color: #484848;
|
|
316
|
+
}
|
|
317
|
+
|
|
296
318
|
td.CalendarDay__selected {
|
|
297
319
|
color: $subsite-link-color;
|
|
298
320
|
|
|
@@ -301,6 +323,12 @@
|
|
|
301
323
|
}
|
|
302
324
|
}
|
|
303
325
|
|
|
326
|
+
td.CalendarDay__hovered_span {
|
|
327
|
+
background: $subsite-primary-a0;
|
|
328
|
+
border: $subsite-primary-a0;
|
|
329
|
+
color: $subsite-link-color;
|
|
330
|
+
}
|
|
331
|
+
|
|
304
332
|
@if $subsite-light-theme {
|
|
305
333
|
td.CalendarDay__selected_span {
|
|
306
334
|
background: darken($subsite-primary, 10%);
|
|
@@ -312,6 +340,7 @@
|
|
|
312
340
|
} @else {
|
|
313
341
|
td.CalendarDay__selected_span {
|
|
314
342
|
background: $subsite-primary-a0;
|
|
343
|
+
color: #484848;
|
|
315
344
|
|
|
316
345
|
&:hover {
|
|
317
346
|
border: 1px double $subsite-primary-a0;
|
|
@@ -319,4 +348,20 @@
|
|
|
319
348
|
}
|
|
320
349
|
}
|
|
321
350
|
}
|
|
351
|
+
|
|
352
|
+
.DayPickerKeyboardShortcuts_show__bottomRight::before {
|
|
353
|
+
border-right-color: $subsite-primary;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
.DayPickerKeyboardShortcuts_showSpan {
|
|
357
|
+
color: $subsite-primary-text;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
.react-select__menu-list {
|
|
361
|
+
.select-list {
|
|
362
|
+
.react-select__option--is-focused {
|
|
363
|
+
background-color: $subsite-primary-a0 !important;
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
}
|
|
322
367
|
}
|
|
@@ -26,13 +26,13 @@
|
|
|
26
26
|
|
|
27
27
|
//right zone
|
|
28
28
|
.it-right-zone {
|
|
29
|
-
color: $subsite-primary-text;
|
|
29
|
+
color: $subsite-primary-text !important;
|
|
30
30
|
|
|
31
31
|
.it-socials {
|
|
32
32
|
ul {
|
|
33
33
|
.icon {
|
|
34
|
-
color: $subsite-primary-text;
|
|
35
|
-
fill: $subsite-primary-text;
|
|
34
|
+
color: $subsite-primary-text !important;
|
|
35
|
+
fill: $subsite-primary-text !important;
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
}
|
|
@@ -13,26 +13,14 @@
|
|
|
13
13
|
.navbar-nav {
|
|
14
14
|
li {
|
|
15
15
|
a.nav-link {
|
|
16
|
-
|
|
17
|
-
color: $subsite-primary-text;
|
|
18
|
-
|
|
19
|
-
&.active {
|
|
20
|
-
border-left-color: $subsite-primary-text;
|
|
21
|
-
}
|
|
16
|
+
color: $subsite-primary-text;
|
|
22
17
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
} @else {
|
|
27
|
-
color: $subsite-link-color;
|
|
28
|
-
|
|
29
|
-
&.active {
|
|
30
|
-
border-left-color: $subsite-link-color;
|
|
31
|
-
}
|
|
18
|
+
&.active {
|
|
19
|
+
border-left-color: $subsite-primary-text;
|
|
20
|
+
}
|
|
32
21
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
22
|
+
svg {
|
|
23
|
+
fill: $subsite-primary-text !important;
|
|
36
24
|
}
|
|
37
25
|
}
|
|
38
26
|
}
|
|
@@ -76,7 +64,7 @@
|
|
|
76
64
|
}
|
|
77
65
|
|
|
78
66
|
//Tablet horizontal / small desktop
|
|
79
|
-
@media (min-width: #{map-get($grid-breakpoints, lg)}) {
|
|
67
|
+
@media (min-width: #{map-get($grid-breakpoints, md)}) and (max-width: #{map-get($grid-breakpoints, lg)}) {
|
|
80
68
|
.navbar {
|
|
81
69
|
background: $subsite-primary;
|
|
82
70
|
|