io-sanita-theme 2.6.0 → 2.7.0

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.
Files changed (90) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/RELEASE.md +1 -1
  3. package/locales/de/LC_MESSAGES/volto.po +10 -0
  4. package/locales/en/LC_MESSAGES/volto.po +10 -0
  5. package/locales/es/LC_MESSAGES/volto.po +10 -0
  6. package/locales/fr/LC_MESSAGES/volto.po +10 -0
  7. package/locales/it/LC_MESSAGES/volto.po +10 -0
  8. package/locales/volto.pot +11 -1
  9. package/package.json +1 -1
  10. package/src/components/Blocks/Accordion/accordion.scss +2 -2
  11. package/src/components/Blocks/Alert/alert.scss +4 -4
  12. package/src/components/Blocks/Icons/icons.scss +2 -2
  13. package/src/components/Blocks/SearchBandi/Body.jsx +4 -2
  14. package/src/components/BrandWrapper/BrandWrapper.jsx +3 -3
  15. package/src/components/Breadcrumbs/Breadcrumbs.jsx +3 -1
  16. package/src/components/Search/Search.jsx +1 -0
  17. package/src/components/Widgets/SearchCheckbox/SearchCheckbox.jsx +1 -1
  18. package/src/components/index.js +1 -1
  19. package/src/components/layout/Footer/FooterInfos.jsx +3 -2
  20. package/src/components/layout/Footer/FooterMain.jsx +3 -1
  21. package/src/components/layout/Footer/FooterSmall.jsx +5 -3
  22. package/src/components/layout/Footer/{SubsiteFooter.jsx → SubsiteFooter/SubsiteFooter.jsx} +1 -0
  23. package/src/components/layout/Footer/SubsiteFooter/subsite-footer.scss +23 -0
  24. package/src/components/layout/Header/HeaderSlim/HeaderSlim.jsx +3 -2
  25. package/src/components/layout/Header/HeaderSlim/ParentSiteMenu.jsx +3 -2
  26. package/src/components/manage/Widgets/SubsiteSocialLinksWidget/SubsiteSocialLinksWidget.jsx +71 -0
  27. package/src/config/loadables.js +2 -1
  28. package/src/config/subsites/index.js +28 -0
  29. package/src/config/subsites/light-blue.jsx +1 -0
  30. package/src/config/subsites/light-pink.jsx +1 -0
  31. package/src/config/subsites/light-teal.jsx +1 -0
  32. package/src/config/subsites/light-yellow.jsx +1 -0
  33. package/src/config/subsites/magenta.jsx +1 -0
  34. package/src/config/subsites/teal.jsx +1 -0
  35. package/src/config/subsites/white.jsx +1 -0
  36. package/src/config/subsites/yellow.jsx +1 -0
  37. package/src/config/widgets/widgets.js +7 -0
  38. package/src/helpers/RichText/RichTextSection.jsx +1 -4
  39. package/src/helpers/index.js +3 -1
  40. package/src/helpers/url.js +16 -0
  41. package/src/theme/_cms-ui.scss +7 -2
  42. package/src/theme/_css_variables.scss +1 -0
  43. package/src/theme/_variables.scss +2 -0
  44. package/src/theme/bootstrap-italia/custom/_buttons.scss +2 -2
  45. package/src/theme/io-sanita/_main.scss +8 -3
  46. package/src/theme/io-sanita/components/blocks/_skeleton.scss +0 -11
  47. package/src/theme/io-sanita/components/layout/_footer.scss +2 -4
  48. package/src/theme/io-sanita/subsites/_all_variables.scss +12 -0
  49. package/src/theme/io-sanita/subsites/_common.scss +9 -18
  50. package/src/theme/io-sanita/subsites/_mixin.scss +257 -0
  51. package/src/theme/io-sanita/subsites/bootstrap-italia/_brand-text.scss +58 -0
  52. package/src/theme/io-sanita/subsites/bootstrap-italia/custom/_buttons.scss +123 -0
  53. package/src/theme/io-sanita/subsites/bootstrap-italia/custom/_card.scss +36 -0
  54. package/src/theme/io-sanita/subsites/bootstrap-italia/custom/_chips.scss +66 -0
  55. package/src/theme/io-sanita/subsites/bootstrap-italia/custom/_dropdown.scss +17 -0
  56. package/src/theme/io-sanita/subsites/bootstrap-italia/custom/_header.scss +48 -0
  57. package/src/theme/io-sanita/subsites/bootstrap-italia/custom/_headercenter.scss +121 -0
  58. package/src/theme/io-sanita/subsites/bootstrap-italia/custom/_headernavbar.scss +25 -0
  59. package/src/theme/io-sanita/subsites/bootstrap-italia/custom/_headerslim.scss +48 -0
  60. package/src/theme/io-sanita/subsites/bootstrap-italia/custom/_linklist.scss +48 -0
  61. package/src/theme/io-sanita/subsites/bootstrap-italia/custom/_megamenu.scss +53 -0
  62. package/src/theme/io-sanita/subsites/bootstrap-italia/custom/_nav.scss +24 -0
  63. package/src/theme/io-sanita/subsites/bootstrap-italia/custom/_navigation.scss +168 -0
  64. package/src/theme/io-sanita/subsites/bootstrap-italia/custom/_navscroll.scss +71 -0
  65. package/src/theme/io-sanita/subsites/io-sanita-theme/Blocks/_calendar.scss +12 -0
  66. package/src/theme/io-sanita/subsites/io-sanita-theme/Blocks/_cardWithImageAndInEvidence.scss +25 -0
  67. package/src/theme/io-sanita/subsites/io-sanita-theme/Blocks/_cta.scss +11 -0
  68. package/src/theme/io-sanita/subsites/io-sanita-theme/Blocks/_form.scss +49 -0
  69. package/src/theme/io-sanita/subsites/io-sanita-theme/Blocks/_iconBlock.scss +14 -0
  70. package/src/theme/io-sanita/subsites/io-sanita-theme/Blocks/_ribbonCardTemplate.scss +18 -0
  71. package/src/theme/io-sanita/subsites/io-sanita-theme/Blocks/_squaresImageTemplateAndSlideUp.scss +52 -0
  72. package/src/theme/io-sanita/subsites/io-sanita-theme/Blocks/_tableOfContents.scss +17 -0
  73. package/src/theme/io-sanita/subsites/io-sanita-theme/Components/_cards.scss +11 -0
  74. package/src/theme/io-sanita/subsites/io-sanita-theme/Components/_subsiteFooter.scss +37 -0
  75. package/src/theme/io-sanita/subsites/io-sanita-theme/Components/_subsiteHeader.scss +37 -0
  76. package/src/theme/io-sanita/subsites/io-sanita-theme/Views/_common.scss +107 -0
  77. package/src/theme/io-sanita/subsites/io-sanita-theme/Widgets/reactSelect.scss +14 -0
  78. package/src/theme/io-sanita/subsites/io-sanita-theme/_common.scss +252 -0
  79. package/src/theme/io-sanita/subsites/light-blue.scss +17 -0
  80. package/src/theme/io-sanita/subsites/light-pink.scss +18 -0
  81. package/src/theme/io-sanita/subsites/light-teal.scss +19 -0
  82. package/src/theme/io-sanita/subsites/light-yellow.scss +18 -0
  83. package/src/theme/io-sanita/subsites/magenta.scss +16 -0
  84. package/src/theme/io-sanita/subsites/teal.scss +14 -0
  85. package/src/theme/io-sanita/subsites/templates/_light-pink.scss +21 -0
  86. package/src/theme/io-sanita/subsites/templates/_light-teal.scss +21 -0
  87. package/src/theme/io-sanita/subsites/templates/_light-yellow.scss +21 -0
  88. package/src/theme/io-sanita/subsites/templates/_white.scss +109 -0
  89. package/src/theme/io-sanita/subsites/white.scss +18 -0
  90. package/src/theme/io-sanita/subsites/yellow.scss +17 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.7.0](https://github.com/RedTurtle/io-sanita-theme/compare/2.6.0...2.7.0) (2025-03-12)
4
+
5
+ ### Features
6
+
7
+ * Subsites styles ([#72](https://github.com/RedTurtle/io-sanita-theme/issues/72)) ([813af14](https://github.com/RedTurtle/io-sanita-theme/commit/813af14ea6e8ea1a46b96ddf8c61c925147d6088))
8
+
9
+ ### Maintenance
10
+
11
+ * locales ([f8e4092](https://github.com/RedTurtle/io-sanita-theme/commit/f8e4092efe0edef933fe3a8c785b994a5047670b))
12
+
3
13
  ## [2.6.0](https://github.com/RedTurtle/io-sanita-theme/compare/2.5.3...2.6.0) (2025-03-11)
4
14
 
5
15
  ### Features
package/RELEASE.md CHANGED
@@ -41,7 +41,7 @@
41
41
  - ...
42
42
  -->
43
43
 
44
- ## Versione x.x.x (x/x/x)
44
+ ## Versione 2.6.0 (11/03/2025)
45
45
 
46
46
  ### Novità
47
47
 
@@ -1493,6 +1493,11 @@ msgstr ""
1493
1493
  msgid "documento_servizio_riferimento"
1494
1494
  msgstr ""
1495
1495
 
1496
+ #. Default: "Fatto"
1497
+ #: components/manage/Widgets/SubsiteSocialLinksWidget/SubsiteSocialLinksWidget
1498
+ msgid "done_edit_social_links"
1499
+ msgstr ""
1500
+
1496
1501
  #. Default: "Navigazione elementi slider"
1497
1502
  #: components/Blocks/Listing/Carousel/CarouselTemplate
1498
1503
  msgid "dots"
@@ -1513,6 +1518,11 @@ msgstr ""
1513
1518
  msgid "dropdownmenu-close-menu-button"
1514
1519
  msgstr ""
1515
1520
 
1521
+ #. Default: "Modifica i social"
1522
+ #: components/manage/Widgets/SubsiteSocialLinksWidget/SubsiteSocialLinksWidget
1523
+ msgid "edit_social_links"
1524
+ msgstr ""
1525
+
1516
1526
  #. Default: "Email"
1517
1527
  #: components/View/PuntoDiContatto/PuntoDiContattoContatti
1518
1528
  msgid "email"
@@ -1488,6 +1488,11 @@ msgstr "Responsabile"
1488
1488
  msgid "documento_servizio_riferimento"
1489
1489
  msgstr "Referral service"
1490
1490
 
1491
+ #. Default: "Fatto"
1492
+ #: components/manage/Widgets/SubsiteSocialLinksWidget/SubsiteSocialLinksWidget
1493
+ msgid "done_edit_social_links"
1494
+ msgstr ""
1495
+
1491
1496
  #. Default: "Navigazione elementi slider"
1492
1497
  #: components/Blocks/Listing/Carousel/CarouselTemplate
1493
1498
  msgid "dots"
@@ -1508,6 +1513,11 @@ msgstr "Open menu"
1508
1513
  msgid "dropdownmenu-close-menu-button"
1509
1514
  msgstr "Close menu"
1510
1515
 
1516
+ #. Default: "Modifica i social"
1517
+ #: components/manage/Widgets/SubsiteSocialLinksWidget/SubsiteSocialLinksWidget
1518
+ msgid "edit_social_links"
1519
+ msgstr ""
1520
+
1511
1521
  #. Default: "Email"
1512
1522
  #: components/View/PuntoDiContatto/PuntoDiContattoContatti
1513
1523
  msgid "email"
@@ -1495,6 +1495,11 @@ msgstr ""
1495
1495
  msgid "documento_servizio_riferimento"
1496
1496
  msgstr ""
1497
1497
 
1498
+ #. Default: "Fatto"
1499
+ #: components/manage/Widgets/SubsiteSocialLinksWidget/SubsiteSocialLinksWidget
1500
+ msgid "done_edit_social_links"
1501
+ msgstr ""
1502
+
1498
1503
  #. Default: "Navigazione elementi slider"
1499
1504
  #: components/Blocks/Listing/Carousel/CarouselTemplate
1500
1505
  msgid "dots"
@@ -1515,6 +1520,11 @@ msgstr ""
1515
1520
  msgid "dropdownmenu-close-menu-button"
1516
1521
  msgstr "Cerrar menú"
1517
1522
 
1523
+ #. Default: "Modifica i social"
1524
+ #: components/manage/Widgets/SubsiteSocialLinksWidget/SubsiteSocialLinksWidget
1525
+ msgid "edit_social_links"
1526
+ msgstr ""
1527
+
1518
1528
  #. Default: "Email"
1519
1529
  #: components/View/PuntoDiContatto/PuntoDiContattoContatti
1520
1530
  msgid "email"
@@ -1495,6 +1495,11 @@ msgstr ""
1495
1495
  msgid "documento_servizio_riferimento"
1496
1496
  msgstr ""
1497
1497
 
1498
+ #. Default: "Fatto"
1499
+ #: components/manage/Widgets/SubsiteSocialLinksWidget/SubsiteSocialLinksWidget
1500
+ msgid "done_edit_social_links"
1501
+ msgstr ""
1502
+
1498
1503
  #. Default: "Navigazione elementi slider"
1499
1504
  #: components/Blocks/Listing/Carousel/CarouselTemplate
1500
1505
  msgid "dots"
@@ -1515,6 +1520,11 @@ msgstr ""
1515
1520
  msgid "dropdownmenu-close-menu-button"
1516
1521
  msgstr "Fermer le menu"
1517
1522
 
1523
+ #. Default: "Modifica i social"
1524
+ #: components/manage/Widgets/SubsiteSocialLinksWidget/SubsiteSocialLinksWidget
1525
+ msgid "edit_social_links"
1526
+ msgstr ""
1527
+
1518
1528
  #. Default: "Email"
1519
1529
  #: components/View/PuntoDiContatto/PuntoDiContattoContatti
1520
1530
  msgid "email"
@@ -1488,6 +1488,11 @@ msgstr ""
1488
1488
  msgid "documento_servizio_riferimento"
1489
1489
  msgstr ""
1490
1490
 
1491
+ #. Default: "Fatto"
1492
+ #: components/manage/Widgets/SubsiteSocialLinksWidget/SubsiteSocialLinksWidget
1493
+ msgid "done_edit_social_links"
1494
+ msgstr ""
1495
+
1491
1496
  #. Default: "Navigazione elementi slider"
1492
1497
  #: components/Blocks/Listing/Carousel/CarouselTemplate
1493
1498
  msgid "dots"
@@ -1508,6 +1513,11 @@ msgstr ""
1508
1513
  msgid "dropdownmenu-close-menu-button"
1509
1514
  msgstr "Chiudi il menu"
1510
1515
 
1516
+ #. Default: "Modifica i social"
1517
+ #: components/manage/Widgets/SubsiteSocialLinksWidget/SubsiteSocialLinksWidget
1518
+ msgid "edit_social_links"
1519
+ msgstr ""
1520
+
1511
1521
  #. Default: "Email"
1512
1522
  #: components/View/PuntoDiContatto/PuntoDiContattoContatti
1513
1523
  msgid "email"
package/locales/volto.pot CHANGED
@@ -1,7 +1,7 @@
1
1
  msgid ""
2
2
  msgstr ""
3
3
  "Project-Id-Version: Plone\n"
4
- "POT-Creation-Date: 2025-03-04T14:56:52.091Z\n"
4
+ "POT-Creation-Date: 2025-03-12T11:53:17.365Z\n"
5
5
  "Last-Translator: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
6
6
  "Language-Team: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
7
7
  "Content-Type: text/plain; charset=utf-8\n"
@@ -1490,6 +1490,11 @@ msgstr ""
1490
1490
  msgid "documento_servizio_riferimento"
1491
1491
  msgstr ""
1492
1492
 
1493
+ #. Default: "Fatto"
1494
+ #: components/manage/Widgets/SubsiteSocialLinksWidget/SubsiteSocialLinksWidget
1495
+ msgid "done_edit_social_links"
1496
+ msgstr ""
1497
+
1493
1498
  #. Default: "Navigazione elementi slider"
1494
1499
  #: components/Blocks/Listing/Carousel/CarouselTemplate
1495
1500
  msgid "dots"
@@ -1510,6 +1515,11 @@ msgstr ""
1510
1515
  msgid "dropdownmenu-close-menu-button"
1511
1516
  msgstr ""
1512
1517
 
1518
+ #. Default: "Modifica i social"
1519
+ #: components/manage/Widgets/SubsiteSocialLinksWidget/SubsiteSocialLinksWidget
1520
+ msgid "edit_social_links"
1521
+ msgstr ""
1522
+
1513
1523
  #. Default: "Email"
1514
1524
  #: components/View/PuntoDiContatto/PuntoDiContattoContatti
1515
1525
  msgid "email"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "io-sanita-theme",
3
- "version": "2.6.0",
3
+ "version": "2.7.0",
4
4
  "description": "io-sanita-theme: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "license": "MIT",
@@ -89,7 +89,7 @@ $accordion-icon-color: #7fb2e5;
89
89
  button {
90
90
  display: flex;
91
91
  align-items: center;
92
- color: var(--bs-primary);
92
+ color: var(--bs-link-color);
93
93
  font-size: 1.2rem;
94
94
  font-weight: bold;
95
95
  text-align: left;
@@ -108,7 +108,7 @@ $accordion-icon-color: #7fb2e5;
108
108
  align-items: center;
109
109
 
110
110
  .title {
111
- color: var(--bs-primary);
111
+ color: var(--bs-link-color);
112
112
  }
113
113
 
114
114
  button {
@@ -15,7 +15,7 @@
15
15
  h5,
16
16
  h6,
17
17
  a {
18
- color: $alert-danger-text;
18
+ color: $alert-danger-text !important;
19
19
  }
20
20
  }
21
21
 
@@ -23,7 +23,7 @@
23
23
  &,
24
24
  .cms-ui &.ui.button,
25
25
  .cms-ui &.ui.button.active {
26
- background-color: $alert-warning;
26
+ background-color: $alert-warning !important;
27
27
  }
28
28
  &,
29
29
  h1,
@@ -33,7 +33,7 @@
33
33
  h5,
34
34
  h6,
35
35
  a {
36
- color: $alert-warning-text;
36
+ color: $alert-warning-text !important;
37
37
  }
38
38
  }
39
39
 
@@ -51,7 +51,7 @@
51
51
  h5,
52
52
  h6,
53
53
  a {
54
- color: $alert-info-text;
54
+ color: $alert-info-text !important;
55
55
  }
56
56
  }
57
57
 
@@ -64,12 +64,12 @@
64
64
  &.bg-primary-lightest:after {
65
65
  background-color: rgb(
66
66
  from var(--primary-lightest) r g b / 85%
67
- ); //rgba( var(--bs-primary), 0.85 ); // serve per fare la trasparenza sull'immagine di sfondo.
67
+ ); // serve per fare la trasparenza sull'immagine di sfondo.
68
68
  }
69
69
  &.bg-primary-dark:after {
70
70
  background-color: rgb(
71
71
  from var(--primary-dark) r g b / 85%
72
- ); // background-color: rgba($secondary, 0.85);; // serve per fare la trasparenza sull'immagine di sfondo.
72
+ ); // serve per fare la trasparenza sull'immagine di sfondo.
73
73
  }
74
74
  &.transparent:after {
75
75
  background-color: none;
@@ -10,7 +10,7 @@ import { flattenToAppURL } from '@plone/volto/helpers/Url/Url';
10
10
  import { BandiTemplate } from 'io-sanita-theme/components/Blocks';
11
11
  import { Pagination } from 'io-sanita-theme/components';
12
12
  import { resetQuerystringResults } from 'io-sanita-theme/actions';
13
- import { scrollIntoView } from 'io-sanita-theme/helpers';
13
+ import { scrollIntoView, useHomePath } from 'io-sanita-theme/helpers';
14
14
 
15
15
  const messages = defineMessages({
16
16
  find: {
@@ -30,6 +30,7 @@ const messages = defineMessages({
30
30
  const Body = ({ data, id, inEditMode, path, onChangeBlock, blocksConfig }) => {
31
31
  const intl = useIntl();
32
32
  const b_size = 6;
33
+ const homepath = useHomePath();
33
34
 
34
35
  moment.locale(intl.locale);
35
36
 
@@ -128,7 +129,8 @@ const Body = ({ data, id, inEditMode, path, onChangeBlock, blocksConfig }) => {
128
129
  return newState;
129
130
  };
130
131
 
131
- const pathSearch = data?.location?.length > 0 ? data.location[0]['@id'] : '/';
132
+ const pathSearch =
133
+ data?.location?.length > 0 ? data.location[0]['@id'] : homepath;
132
134
  const FiltersConfigFN = blocksConfig['searchBandi'].filtersConfig;
133
135
  const filtersConfig = FiltersConfigFN
134
136
  ? FiltersConfigFN(null, pathSearch)
@@ -4,7 +4,7 @@ import { useSelector } from 'react-redux';
4
4
  import { useIntl, defineMessages } from 'react-intl';
5
5
  import { flattenToAppURL } from '@plone/volto/helpers/Url/Url';
6
6
  import UniversalLink from '@plone/volto/components/manage/UniversalLink/UniversalLink';
7
- import { getSiteProperty } from 'io-sanita-theme/helpers';
7
+ import { getSiteProperty, useHomePath } from 'io-sanita-theme/helpers';
8
8
  import { Logo, BrandText } from 'io-sanita-theme/components';
9
9
 
10
10
  const messages = defineMessages({
@@ -20,7 +20,7 @@ const messages = defineMessages({
20
20
 
21
21
  const BrandWrapper = ({ mobile = false, setCollapseOpen }) => {
22
22
  const subsite = useSelector((state) => state.subsite?.data);
23
-
23
+ const homepath = useHomePath();
24
24
  const intl = useIntl();
25
25
 
26
26
  let wrapperAttrs = {};
@@ -34,7 +34,7 @@ const BrandWrapper = ({ mobile = false, setCollapseOpen }) => {
34
34
  return (
35
35
  <div className="it-brand-wrapper" {...wrapperAttrs}>
36
36
  <UniversalLink
37
- href={subsite?.['@id'] ? flattenToAppURL(subsite['@id']) : '/'}
37
+ href={subsite?.['@id'] ? flattenToAppURL(subsite['@id']) : homepath}
38
38
  title={intl.formatMessage(messages.homepage)}
39
39
  {...linkAttrs}
40
40
  >
@@ -20,6 +20,7 @@ import UniversalLink from '@plone/volto/components/manage/UniversalLink/Universa
20
20
  import { Row, Col, BreadcrumbItem } from 'design-react-kit';
21
21
  import GoogleBreadcrumbs from 'io-sanita-theme/components/Breadcrumbs/GoogleBreadcrumbs';
22
22
  import config from '@plone/volto/registry';
23
+ import { useHomePath } from 'io-sanita-theme/helpers';
23
24
 
24
25
  const messages = defineMessages({
25
26
  home: {
@@ -36,6 +37,7 @@ const Breadcrumbs = ({ pathname, match }) => {
36
37
  const intl = useIntl();
37
38
  const dispatch = useDispatch();
38
39
  const location = useLocation();
40
+ const homepath = useHomePath();
39
41
 
40
42
  let items =
41
43
  useSelector((state) => {
@@ -142,7 +144,7 @@ const Breadcrumbs = ({ pathname, match }) => {
142
144
  >
143
145
  <ol className="breadcrumb" data-element="breadcrumb">
144
146
  <BreadcrumbItem tag="li">
145
- <UniversalLink href="/">
147
+ <UniversalLink href={homepath}>
146
148
  {intl.formatMessage(messages.home)}
147
149
  </UniversalLink>
148
150
  <span className="separator">/</span>
@@ -20,6 +20,7 @@ import {
20
20
 
21
21
  import Helmet from '@plone/volto/helpers/Helmet/Helmet';
22
22
  import { flattenToAppURL } from '@plone/volto/helpers/Url/Url';
23
+ import { resetSubsite } from 'volto-subsites';
23
24
  import { getSearchFilters, getSearchResults } from 'io-sanita-theme/actions';
24
25
  import {
25
26
  SearchBar,
@@ -148,7 +148,7 @@ const SearchCheckbox = ({
148
148
  {/* NUMBER OF CHECKBOX SELECTED */}
149
149
  {showActiveOptions && (
150
150
  <span
151
- className={cx('badge bg-secondary ms-3', {
151
+ className={cx('badge bg-primary ms-3', {
152
152
  'visually-hidden': activeOptions === 0,
153
153
  })}
154
154
  aria-live="polite"
@@ -50,7 +50,7 @@ export FooterInfos from 'io-sanita-theme/components/layout/Footer/FooterInfos';
50
50
  export FooterNewsletterSubscribe from 'io-sanita-theme/components/layout/Footer/FooterInfos';
51
51
  export FooterSocials from 'io-sanita-theme/components/layout/Footer/FooterSocials';
52
52
  export FooterSmall from 'io-sanita-theme/components/layout/Footer/FooterSmall';
53
- export SubsiteFooter from 'io-sanita-theme/components/layout/Footer/SubsiteFooter';
53
+ export SubsiteFooter from 'io-sanita-theme/components/layout/Footer/SubsiteFooter/SubsiteFooter';
54
54
 
55
55
  //Menu
56
56
  export CollapseNavigation from 'io-sanita-theme/components/layout/Navigation/CollapseNavigation';
@@ -19,7 +19,7 @@ import {
19
19
  FooterNewsletterSubscribe,
20
20
  FooterSocials,
21
21
  } from 'io-sanita-theme/components';
22
- import { richTextHasContent } from 'io-sanita-theme/helpers';
22
+ import { richTextHasContent, useHomePath } from 'io-sanita-theme/helpers';
23
23
 
24
24
  import { fromHtml } from 'volto-slate-italia/config/Slate/utils';
25
25
 
@@ -35,6 +35,7 @@ const FooterInfos = () => {
35
35
  const N_COLUMNS = 3;
36
36
  const location = useLocation();
37
37
  const dispatch = useDispatch();
38
+ const homepath = useHomePath();
38
39
 
39
40
  const req = useSelector((state) => state.editableFooterColumns);
40
41
  const footerConfiguration = useSelector(
@@ -50,7 +51,7 @@ const FooterInfos = () => {
50
51
  //filter rootpaths
51
52
  let footerColumns = getItemsByPath(
52
53
  footerConfiguration,
53
- location?.pathname?.length ? location.pathname : '/',
54
+ location?.pathname?.length ? location.pathname : homepath,
54
55
  ).filter((c) => c.visible);
55
56
 
56
57
  footerColumns.forEach((column) => {
@@ -13,6 +13,7 @@ import {
13
13
  LogoFooter,
14
14
  BrandTextFooter,
15
15
  } from 'io-sanita-theme/components/';
16
+ import { useHomePath } from 'io-sanita-theme/helpers';
16
17
 
17
18
  import { FooterTop } from 'volto-editablefooter';
18
19
 
@@ -24,6 +25,7 @@ import { FooterTop } from 'volto-editablefooter';
24
25
  const FooterMain = () => {
25
26
  const footerTopContent = FooterTop();
26
27
  const footerNavigation = FooterNavigation();
28
+ const homepath = useHomePath();
27
29
  return (
28
30
  <div className="it-footer-main">
29
31
  <Container tag="div">
@@ -32,7 +34,7 @@ const FooterMain = () => {
32
34
  <Col sm={12} tag="div" widths={['xs', 'sm', 'md', 'lg', 'xl']}>
33
35
  <div className="it-brand-wrapper">
34
36
  {footerTopContent ?? (
35
- <UniversalLink href="/">
37
+ <UniversalLink href={homepath}>
36
38
  <LogoFooter />
37
39
  <BrandTextFooter />
38
40
  </UniversalLink>
@@ -15,7 +15,7 @@ import { displayBanner } from 'volto-gdpr-privacy';
15
15
 
16
16
  import UniversalLink from '@plone/volto/components/manage/UniversalLink/UniversalLink';
17
17
  import { flattenToAppURL } from '@plone/volto/helpers/Url/Url';
18
- import { getSiteProperty } from 'io-sanita-theme/helpers';
18
+ import { getSiteProperty, useHomePath } from 'io-sanita-theme/helpers';
19
19
 
20
20
  const messages = defineMessages({
21
21
  goToPage: {
@@ -37,7 +37,7 @@ const FooterSmall = () => {
37
37
  const intl = useIntl();
38
38
  const pathname = useLocation().pathname;
39
39
  const dispatch = useDispatch();
40
-
40
+ const homepath = useHomePath();
41
41
  const subFooter = useSelector((state) => state.subFooter?.result);
42
42
  const subFooterItems = getItemsByPath(subFooter, pathname)?.filter(
43
43
  (item) => item.visible,
@@ -56,7 +56,9 @@ const FooterSmall = () => {
56
56
  {subFooterItems?.length > 0 &&
57
57
  subFooterItems.map((item, index) => {
58
58
  let url =
59
- item.href || flattenToAppURL(item.linkUrl?.[0]?.['@id']) || '/';
59
+ item.href ||
60
+ flattenToAppURL(item.linkUrl?.[0]?.['@id']) ||
61
+ homepath;
60
62
  return (
61
63
  <li
62
64
  className={cx('list-inline-item', {
@@ -9,6 +9,7 @@ import { useLocation } from 'react-router-dom';
9
9
  import { isCmsUi } from '@plone/volto/helpers/Url/Url';
10
10
  import { flattenHTMLToAppURL } from '@plone/volto/helpers/Url/Url';
11
11
  import { richTextHasContent } from 'io-sanita-theme/helpers';
12
+ import './subsite-footer.scss';
12
13
 
13
14
  const SubsiteFooter = () => {
14
15
  const location = useLocation();
@@ -0,0 +1,23 @@
1
+ @import 'io-sanita-theme/theme/bootstrap-italia-base-config';
2
+
3
+ .subsite-footer {
4
+ //default bg color as main site
5
+ padding: 2rem 0;
6
+ background-color: $footer-top-background;
7
+ color: $white;
8
+ border-bottom: var(--is-footer-borders); // $footer-borders;
9
+
10
+ &,
11
+ p,
12
+ ul {
13
+ font-size: $footer-font-size;
14
+ }
15
+
16
+ a {
17
+ color: $white;
18
+
19
+ &:hover:not(.disabled) {
20
+ text-decoration: underline;
21
+ }
22
+ }
23
+ }
@@ -13,7 +13,7 @@ import {
13
13
  HeaderRightZone,
14
14
  } from 'design-react-kit';
15
15
  import { useIntl, defineMessages } from 'react-intl';
16
- import { getSiteProperty } from 'io-sanita-theme/helpers';
16
+ import { getSiteProperty, useHomePath } from 'io-sanita-theme/helpers';
17
17
  import { SiteProperty } from 'volto-site-settings';
18
18
 
19
19
  const messages = defineMessages({
@@ -25,9 +25,10 @@ const messages = defineMessages({
25
25
  const HeaderSlim = () => {
26
26
  const subsite = useSelector((state) => state.subsite?.data);
27
27
  const intl = useIntl();
28
+ const homepath = useHomePath();
28
29
 
29
30
  const parentSiteURL = subsite
30
- ? '/'
31
+ ? homepath
31
32
  : getSiteProperty('parentSiteURL', intl.locale);
32
33
 
33
34
  const staticParentSiteTitle = getSiteProperty('parentSiteTitle', intl.locale);
@@ -8,7 +8,7 @@ import { useSelector } from 'react-redux';
8
8
  import { Link } from 'react-router-dom';
9
9
  import { flattenToAppURL } from '@plone/volto/helpers/Url/Url';
10
10
  import { Nav, NavItem, NavLink } from 'design-react-kit';
11
-
11
+ import { useHomePath } from 'io-sanita-theme/helpers';
12
12
  import { defineMessages, useIntl } from 'react-intl';
13
13
 
14
14
  const messages = defineMessages({
@@ -24,6 +24,7 @@ const ParentSiteMenu = () => {
24
24
  (state) => state.dropdownMenuNavItems?.result,
25
25
  );
26
26
  const subsite = useSelector((state) => state.subsite?.data);
27
+ const homepath = useHomePath();
27
28
 
28
29
  let menu = null;
29
30
  if (subsite) {
@@ -33,7 +34,7 @@ const ParentSiteMenu = () => {
33
34
  let i = url_split.length - 1;
34
35
  while (i > 0) {
35
36
  let s = url_split.slice(0, i).join('/');
36
- s = s.length === 0 ? '/' : s;
37
+ s = s.length === 0 ? homepath : s;
37
38
  // eslint-disable-next-line no-loop-func
38
39
  dropdownMenu.forEach((m) => {
39
40
  if (m.rootPath === s) {
@@ -0,0 +1,71 @@
1
+ import React, { useState } from 'react';
2
+ import { defineMessages, useIntl } from 'react-intl';
3
+ import { Button, Modal, List } from 'semantic-ui-react';
4
+
5
+ import { FormFieldWrapper } from '@plone/volto/components';
6
+ import { Icon } from 'io-sanita-theme/components';
7
+ import { SocialLinksWidget } from 'volto-social-settings';
8
+
9
+ const messages = defineMessages({
10
+ edit_social_links: {
11
+ id: 'edit_social_links',
12
+ defaultMessage: 'Modifica i social',
13
+ },
14
+ done: {
15
+ id: 'done_edit_social_links',
16
+ defaultMessage: 'Fatto',
17
+ },
18
+ });
19
+ const SubsiteSocialLinksWidget = (props) => {
20
+ const intl = useIntl();
21
+ const [open, setOpen] = useState(false);
22
+
23
+ const value = props.value?.length > 0 ? JSON.parse(props.value) : [];
24
+ return (
25
+ <FormFieldWrapper {...props} className="subsite-social-links-widget">
26
+ {props.value?.length > 0 && (
27
+ <List horizontal className="social-list">
28
+ {value?.map((social, idx) =>
29
+ social.url ? (
30
+ <List.Item key={idx}>
31
+ <a
32
+ title={social.title}
33
+ href={social.url}
34
+ target="_blank"
35
+ rel="noopener noreferrer"
36
+ >
37
+ <Icon icon={social.icon} padding={false} size="sm" />
38
+ </a>
39
+ </List.Item>
40
+ ) : null,
41
+ )}
42
+ </List>
43
+ )}
44
+
45
+ <Button
46
+ size="tiny"
47
+ onClick={(e) => {
48
+ e.preventDefault();
49
+ setOpen(true);
50
+ }}
51
+ >
52
+ {intl.formatMessage(messages.edit_social_links)}
53
+ </Button>
54
+ <Modal onClose={() => setOpen(false)} open={open} closeIcon>
55
+ <Modal.Header>
56
+ {intl.formatMessage(messages.edit_social_links)}
57
+ </Modal.Header>
58
+ <Modal.Content scrolling>
59
+ <SocialLinksWidget {...props} description={null} />
60
+ </Modal.Content>
61
+ <Modal.Actions>
62
+ <Button icon onClick={() => setOpen(false)} primary>
63
+ {intl.formatMessage(messages.done)}
64
+ </Button>
65
+ </Modal.Actions>
66
+ </Modal>
67
+ </FormFieldWrapper>
68
+ );
69
+ };
70
+
71
+ export default SubsiteSocialLinksWidget;
@@ -1,8 +1,9 @@
1
1
  import loadable from '@loadable/component';
2
-
2
+ import { loadables as subsitesLoadables } from './subsites';
3
3
 
4
4
  export const loadables = {
5
5
  reactSlick: loadable.lib(() => import('react-slick')),
6
6
  //rrule: loadable.lib(() => import('rrule')),
7
7
  //htmlDiffLib: loadable.lib(() => import('htmldiff-js')),
8
+ ...subsitesLoadables,
8
9
  };
@@ -0,0 +1,28 @@
1
+ import loadable from '@loadable/component';
2
+
3
+ export const loadables = {
4
+ 'subsite-light-blue': loadable.lib(() =>
5
+ import('io-sanita-theme/config/subsites/light-blue'),
6
+ ),
7
+ 'subsite-light-pink': loadable.lib(() =>
8
+ import('io-sanita-theme/config/subsites/light-pink'),
9
+ ),
10
+ 'subsite-light-teal': loadable.lib(() =>
11
+ import('io-sanita-theme/config/subsites/light-teal'),
12
+ ),
13
+ 'subsite-light-yellow': loadable.lib(() =>
14
+ import('io-sanita-theme/config/subsites/light-yellow'),
15
+ ),
16
+ 'subsite-magenta': loadable.lib(() =>
17
+ import('io-sanita-theme/config/subsites/magenta'),
18
+ ),
19
+ 'subsite-teal': loadable.lib(() =>
20
+ import('io-sanita-theme/config/subsites/teal'),
21
+ ),
22
+ 'subsite-white': loadable.lib(() =>
23
+ import('io-sanita-theme/config/subsites/white'),
24
+ ),
25
+ 'subsite-yellow': loadable.lib(() =>
26
+ import('io-sanita-theme/config/subsites/yellow'),
27
+ ),
28
+ };
@@ -0,0 +1 @@
1
+ import 'io-sanita-theme/theme/io-sanita/subsites/light-blue.scss';
@@ -0,0 +1 @@
1
+ import 'io-sanita-theme/theme/io-sanita/subsites/light-pink.scss';
@@ -0,0 +1 @@
1
+ import 'io-sanita-theme/theme/io-sanita/subsites/light-teal.scss';
@@ -0,0 +1 @@
1
+ import 'io-sanita-theme/theme/io-sanita/subsites/light-yellow.scss';