io-sanita-theme 2.14.0 → 2.16.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.16.0](https://github.com/RedTurtle/io-sanita-theme/compare/2.15.0...2.16.0) (2025-05-22)
4
+
5
+ ### Features
6
+
7
+ * Add publiccode.yml ([e03ef83](https://github.com/RedTurtle/io-sanita-theme/commit/e03ef835891a0506e599df64ce7b4da9f192614f))
8
+
9
+ ### Bug Fixes
10
+
11
+ * codereview and fixed schemaOrg ([e66803e](https://github.com/RedTurtle/io-sanita-theme/commit/e66803e282feb2b8805d6d3661466a367314be1b))
12
+
13
+ ## [2.15.0](https://github.com/RedTurtle/io-sanita-theme/compare/2.14.0...2.15.0) (2025-05-20)
14
+
15
+ ### Features
16
+
17
+ * added SchemaOrg ct servizio ([#88](https://github.com/RedTurtle/io-sanita-theme/issues/88)) ([7cd86d5](https://github.com/RedTurtle/io-sanita-theme/commit/7cd86d5338d0325a93931f590f11234a2cd11fb2))
18
+ * added schemaOrg Struttura ([#89](https://github.com/RedTurtle/io-sanita-theme/issues/89)) ([5b7c091](https://github.com/RedTurtle/io-sanita-theme/commit/5b7c0917da5d9dbed9e3785936645e040707e4cf))
19
+ * Schema.org Event and Homepage ([#87](https://github.com/RedTurtle/io-sanita-theme/issues/87)) ([073148a](https://github.com/RedTurtle/io-sanita-theme/commit/073148a9987b6d2cb045c3a0c274e911ca9a7258))
20
+
21
+ ### Documentation
22
+
23
+ * updated RELEASE.md ([ef8c5d5](https://github.com/RedTurtle/io-sanita-theme/commit/ef8c5d57214932d53f3fd26dcce58703a03d5f4f))
24
+
3
25
  ## [2.14.0](https://github.com/RedTurtle/io-sanita-theme/compare/2.13.0...2.14.0) (2025-05-19)
4
26
 
5
27
  ### Features
package/RELEASE.md CHANGED
@@ -41,6 +41,22 @@
41
41
  - ...
42
42
  -->
43
43
 
44
+ ## Versione 2.15.0 (20/05/2025)
45
+
46
+ ### Novità
47
+
48
+ - Implementato lo Schema.org per i tipi di contenuti Struttura, Servizio ed Evento
49
+
50
+ ### Migliorie
51
+
52
+ - Migliorato lo Schema.org della Homepage
53
+
54
+ ## Versione 2.14.0 (19/05/2025)
55
+
56
+ ### Novità
57
+
58
+ - Implementato lo Schema.org per i tipi di contenuti Notizia, Persona e ComeFarePer
59
+
44
60
  ## Versione 2.11.1 (31/03/2025)
45
61
 
46
62
  ### Fix
Binary file
Binary file
package/docs/logo.png ADDED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "io-sanita-theme",
3
- "version": "2.14.0",
3
+ "version": "2.16.0",
4
4
  "description": "io-sanita-theme: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "license": "MIT",
package/publiccode.yml ADDED
@@ -0,0 +1,109 @@
1
+ publiccodeYmlVersion: "0.4"
2
+ name: io-Sanità - il sito web per ASL e strutture sanitarie
3
+ applicationSuite: io-Sanità
4
+ url: https://github.com/RedTurtle/io-sanita-theme
5
+ landingURL: https://www.io-sanita.it/
6
+ logo: https://github.com/RedTurtle/io-sanita-theme/blob/main/docs/logo.png
7
+ platforms:
8
+ - web
9
+ categories:
10
+ - website-builder
11
+ - content-management
12
+ usedBy:
13
+ - AUSL Ferrara
14
+ developmentStatus: stable
15
+ softwareType: standalone/web
16
+ description:
17
+ it:
18
+ shortDescription: Sito web conforme al modello ASL
19
+ longDescription: >
20
+ **[io-Sanità](https://www.io-sanita.it)** è una piattaforma web open
21
+ source progettata per rispondere alle esigenze comunicative e informative
22
+ delle Aziende Sanitarie Locali, in piena conformità con le **Linee guida
23
+ AgID** e i modelli promossi da **Designers Italia**. Il sistema adotta un
24
+ approccio "citizen-first", combinando una solida architettura informativa
25
+ con un’interfaccia utente accessibile, intuitiva e responsive, adatta sia
26
+ alla consultazione da desktop che da dispositivi mobili.
27
+
28
+
29
+ Il layout grafico, la struttura dei contenuti e i flussi di navigazione
30
+ seguono fedelmente i modelli ufficiali per i siti ASL, garantendo coerenza
31
+ con l’ecosistema digitale della Pubblica Amministrazione. L’interfaccia è
32
+ pensata per migliorare l’esperienza dell’utente finale, riducendo i tempi
33
+ di ricerca delle informazioni e semplificando l’accesso ai servizi
34
+ digitali.
35
+
36
+
37
+ Uno degli aspetti distintivi di io-Sanità è la **collaborazione attiva con
38
+ i redattori** delle aziende sanitarie durante il processo di sviluppo e
39
+ personalizzazione: la piattaforma è infatti progettata per essere
40
+ facilmente gestita dai team di comunicazione e URP, anche senza competenze
41
+ tecniche avanzate.
42
+
43
+
44
+ In termini di **trovabilità dei contenuti**, io-Sanità integra moduli e
45
+ pattern di navigazione suggeriti da Designers Italia, potenziati
46
+ dall’esperienza ventennale di **[RedTurtle](https://www.redturtle.it)**
47
+ nella gestione e pubblicazione di contenuti complessi. Il risultato è un
48
+ portale ad alta usabilità, che ottimizza la reperibilità delle
49
+ informazioni e garantisce un'esperienza coerente e fluida per cittadini,
50
+ operatori sanitari e stakeholder.
51
+
52
+
53
+ Basato su **[Plone](https://plone.org)**, uno dei CMS open source più
54
+ affidabili e sicuri, io-Sanità è una soluzione pronta all’uso, scalabile,
55
+ personalizzabile e costantemente aggiornata, pensata per accompagnare la
56
+ transizione digitale della sanità pubblica italiana.
57
+
58
+
59
+ io-Sanità è frutto della ventennale esperienza di RedTurtle come fornitore
60
+ qualificato della PA, in particolare grazie alla collaborazione con AUSL
61
+ Ferrara ed il Dipartimento per la Trasformazione Digitale, con lo scopo
62
+ finale di uniformare sul territorio nazionale i siti web delle aziende
63
+ sanitarie locali grazie al Modello ASL.
64
+ documentation: https://docs.google.com/document/d/1Vih0GDLa4bN16ac4g0wt7RVJIqwlJZgNPp_JdkKVURA/edit?tab=t.0
65
+ features:
66
+ - Sviluppato seguendo le linee guida del Modello ASL promosso da Designers
67
+ Italia.
68
+ - Gestione avanzata tramite content-type specifici conformi alle nuove
69
+ linee guida.
70
+ - Workflow di approvazione contenuti configurabili in base alle esigenze
71
+ specifiche.
72
+ - Gestione diretta ed esclusiva tramite un semplice browser senza plugin
73
+ aggiuntivi
74
+ - Creazione potenzialmente illimitata di pagine informative e relative
75
+ categorie.
76
+ - Editing in modalità "in context".
77
+ - Ricerca full-text nei contenuti, compresi i file in formato pdf.
78
+ - Predisposizione per gestione contenuti multilingua.
79
+ - Sistema di workflow per assegnare la redazione delle lingue aggiuntive
80
+ ad un gruppo di traduttori.
81
+ - Possibilità di integrazione con prodotti aggiuntivi, o di comunicazione
82
+ verso altri applicativi via API.
83
+ - Registrazione utenti per contenuti personalizzati o accesso ad area
84
+ riservata.
85
+ - Pubblicazione o ritiro contenuti temporizzabili con riferimento a date e
86
+ ore predefinite.
87
+ - Controllo in tempo reale di collegamenti e dell'integrità referenziale.
88
+ - Lock automatico dei contenuti per evitare sovrapposizione di modifiche
89
+ da parte di più redattori.
90
+ - Possibili connessioni con applicazioni e sistemi aziendali standard come
91
+ CRM e integrabile con web service, database SQL e NoSQL.
92
+ screenshots:
93
+ - https://github.com/RedTurtle/io-sanita-theme/blob/main/docs/01-io-sanita.png
94
+ - https://github.com/RedTurtle/io-sanita-theme/blob/main/docs/io-sanita-02.png
95
+ - https://github.com/RedTurtle/io-sanita-theme/blob/main/docs/io-sanita-03.png
96
+ legal:
97
+ license: LGPL-3.0-only
98
+ maintenance:
99
+ type: internal
100
+ contacts:
101
+ - name: Stefano Marchetti
102
+ email: info@redturtle.it
103
+ phone: "+3905321915958"
104
+ affiliation: RedTurtle Technology srl
105
+ localisation:
106
+ localisationReady: true
107
+ availableLanguages:
108
+ - it
109
+ - en
@@ -7,10 +7,6 @@
7
7
  }
8
8
 
9
9
  .map-wrapper {
10
- #geocoded-result {
11
- z-index: 0;
12
- }
13
-
14
10
  &.size_small {
15
11
  #geocoded-result {
16
12
  height: 400px;
@@ -7,6 +7,7 @@
7
7
  h5 {
8
8
  &.card-title {
9
9
  @include rem-size(font-size, 18);
10
+ word-break: break-word;
10
11
  }
11
12
  }
12
13
  .icon {
@@ -1,30 +1,54 @@
1
1
  import { useIntl } from 'react-intl';
2
2
  import { toPublicURL } from '@plone/volto/helpers';
3
+ import { useSelector } from 'react-redux';
3
4
  import { SiteProperty } from 'volto-site-settings';
4
5
  import { SchemaOrg, getSiteProperty } from 'io-sanita-theme/helpers';
5
6
 
6
7
  const HomeSchemaOrg = ({ content }) => {
7
8
  const intl = useIntl();
9
+ const socialSettings = useSelector((state) => state.socialSettings?.results);
10
+
11
+ const name = SiteProperty({
12
+ property: 'site_title',
13
+ defaultValue: getSiteProperty('siteTitle', intl.locale),
14
+ getValue: true,
15
+ });
16
+ const description = SiteProperty({
17
+ property: 'site_subtitle',
18
+ defaultValue: getSiteProperty('siteSubtitle', intl.locale),
19
+ getValue: true,
20
+ });
21
+
8
22
  let schemaOrg = null;
9
23
  if (content?.['@type'] == 'Plone Site' || content?.['@type'] == 'LRF') {
10
- const name = SiteProperty({
11
- property: 'site_title',
12
- defaultValue: getSiteProperty('siteTitle', intl.locale),
13
- getValue: true,
14
- });
15
- const description = SiteProperty({
16
- property: 'site_subtitle',
17
- defaultValue: getSiteProperty('siteSubtitle', intl.locale),
18
- getValue: true,
19
- });
24
+ let socialLinks = null;
25
+ if (socialSettings && socialSettings?.length > 0) {
26
+ socialLinks = socialSettings.map((item) => item.url);
27
+ }
20
28
 
21
29
  schemaOrg = {
22
- '@type': 'MedicalOrganization',
23
- name: name,
24
- description: description,
25
- url: toPublicURL(content['@id']),
30
+ '@graph': [
31
+ {
32
+ '@type': 'WebSite',
33
+ url: toPublicURL('/'),
34
+ name: name,
35
+ description: description || null,
36
+ potentialAction: {
37
+ '@type': 'SearchAction',
38
+ target: toPublicURL(content['@id']) + '/search',
39
+ },
40
+ },
41
+ {
42
+ '@type': 'MedicalOrganization',
43
+ name: name,
44
+ description: description || null,
45
+ url: toPublicURL('/'),
46
+ sameAs: socialLinks,
47
+ },
48
+ ],
26
49
  };
27
50
  }
51
+
28
52
  return schemaOrg ? <SchemaOrg schema={schemaOrg} /> : <></>;
29
53
  };
30
54
 
@@ -1,16 +1,12 @@
1
1
  import { toPublicURL } from '@plone/volto/helpers';
2
+ import { useLoadSteps } from 'io-sanita-theme/components/View/ComeFarePer/Steps/helpers';
2
3
  import {
3
4
  SchemaOrg,
4
5
  SchemaOrgUtils,
5
6
  richTextHasContent,
6
7
  } from 'io-sanita-theme/helpers';
7
8
 
8
- import { useLoadSteps } from 'io-sanita-theme/components/View/ComeFarePer/Steps/helpers';
9
- import { positions } from 'slate';
10
-
11
9
  const ComeFarePerSchemaOrg = ({ content }) => {
12
- const siteTitle = SchemaOrgUtils.getSiteTitle();
13
-
14
10
  let description = [];
15
11
  let _yield = [];
16
12
  let steps = content?.items?.filter((item) => item['@type'] === 'Step') ?? [];
@@ -5,7 +5,6 @@
5
5
 
6
6
  import React, { useState, useEffect } from 'react';
7
7
  import { useIntl, defineMessages } from 'react-intl';
8
- import { useDispatch, useSelector } from 'react-redux';
9
8
 
10
9
  import PropTypes from 'prop-types';
11
10
  import {
@@ -63,7 +62,6 @@ const messages = defineMessages({
63
62
  */
64
63
  const Steps = ({ content, steps = [] }) => {
65
64
  const intl = useIntl();
66
- const dispatch = useDispatch();
67
65
  const [activeItem, setActiveItem] = useState('');
68
66
  const [allOpen, setAllOpen] = useState(false);
69
67
 
@@ -24,7 +24,7 @@ export const useLoadSteps = (steps = []) => {
24
24
 
25
25
  return () => {
26
26
  steps.forEach((item) => {
27
- dispatch(resetContent(subrequest_id));
27
+ dispatch(resetContent(item['@id']));
28
28
  });
29
29
  };
30
30
  }, []);
@@ -0,0 +1,137 @@
1
+ import { toPublicURL } from '@plone/volto/helpers';
2
+ import {
3
+ SchemaOrg,
4
+ SchemaOrgUtils,
5
+ richTextHasContent,
6
+ } from 'io-sanita-theme/helpers';
7
+
8
+ const EventoSchemaOrg = ({ content }) => {
9
+ let schemaOrg = {
10
+ '@type': 'Event',
11
+ name: content?.title,
12
+ startDate: content?.start,
13
+ endDate: content?.end,
14
+ url: toPublicURL(content['@id']),
15
+ };
16
+
17
+ let description = [];
18
+ if (content.description) {
19
+ description.push(content.description);
20
+ }
21
+ if (richTextHasContent(content.descrizione_estesa)) {
22
+ description.push(
23
+ SchemaOrgUtils.fieldDataToPlainText(content.descrizione_estesa),
24
+ );
25
+ }
26
+ if (description.length > 0) {
27
+ schemaOrg.description = description.join('. ');
28
+ }
29
+
30
+ // se l'evento è online
31
+ if (richTextHasContent(content.webinar)) {
32
+ schemaOrg.eventAttendanceMode = SchemaOrgUtils.fieldDataToPlainText(
33
+ content.webinar,
34
+ );
35
+ }
36
+ // se l'evento è fisico priorità all'indirizzo scritto direttamente nel CT, in alternativa la prima struttura associata
37
+ if (content.street && content.zip_code && content.city) {
38
+ schemaOrg.location = {
39
+ '@type': 'Place',
40
+ name: content?.nome_sede || 'Sede',
41
+ address: {
42
+ '@type': 'PostalAddress',
43
+ streetAddress: content.street,
44
+ addressLocality: content.city,
45
+ postalCode: content.zip_code,
46
+ addressCountry: 'IT',
47
+ },
48
+ };
49
+ } else if (content.struttura_correlata?.length > 0) {
50
+ schemaOrg.location = {
51
+ '@type': 'Place',
52
+ name: content.struttura_correlata[0].title,
53
+ address: {
54
+ '@type': 'PostalAddress',
55
+ // questi sono campi obbligatori per la struttura
56
+ streetAddress: content.struttura_correlata[0].street,
57
+ addressLocality: content.struttura_correlata[0].city,
58
+ postalCode: content.struttura_correlata[0].zip_code,
59
+ addressCountry: 'IT',
60
+ },
61
+ };
62
+ }
63
+
64
+ // organizzatore interno
65
+ if (content.organizzato_da_interno?.length > 0) {
66
+ schemaOrg.organizer = {
67
+ '@type': 'Organization',
68
+ name: content.organizzato_da_interno[0].title,
69
+ url: toPublicURL(content.organizzato_da_interno[0]['@id']),
70
+ };
71
+ }
72
+
73
+ // contributo esterno
74
+ if (richTextHasContent(content.organizzato_da_esterno)) {
75
+ schemaOrg.contributor = {
76
+ '@type': 'Organization',
77
+ name: SchemaOrgUtils.fieldDataToPlainText(content.organizzato_da_esterno),
78
+ };
79
+ }
80
+
81
+ //chi partecipa
82
+ let attendeeList = [];
83
+ if (richTextHasContent(content.parteciperanno)) {
84
+ attendeeList.push(
85
+ SchemaOrgUtils.fieldDataToPlainText(content.parteciperanno),
86
+ );
87
+ }
88
+ if (content.persona_correlata?.length > 0) {
89
+ attendeeList.push(content.persona_correlata.map((item) => item.title));
90
+ }
91
+ if (attendeeList.length > 0) {
92
+ schemaOrg.attendee = {
93
+ '@type': 'Person',
94
+ name: attendeeList.join(', '),
95
+ };
96
+ }
97
+
98
+ // a chi si rivolge
99
+ let audienceList = [];
100
+ if (richTextHasContent(content.a_chi_si_rivolge)) {
101
+ audienceList.push(
102
+ SchemaOrgUtils.fieldDataToPlainText(content.a_chi_si_rivolge),
103
+ );
104
+ }
105
+ if (content?.a_chi_si_rivolge_tassonomia?.length > 0) {
106
+ audienceList.push(
107
+ content.a_chi_si_rivolge_tassonomia.map((item) => item.title),
108
+ );
109
+ }
110
+ if (audienceList.length > 0) {
111
+ schemaOrg.audience = {
112
+ '@type': 'Audience',
113
+ audienceType: audienceList.join(', '),
114
+ };
115
+ }
116
+
117
+ // costi o biglietti
118
+ if (richTextHasContent(content.costo)) {
119
+ schemaOrg.offers = {
120
+ '@type': 'Offer',
121
+ price: SchemaOrgUtils.fieldDataToPlainText(content.costo),
122
+ priceCurrency: 'EUR',
123
+ };
124
+ }
125
+
126
+ // sponsor
127
+ if (richTextHasContent(content.patrocinato_da)) {
128
+ schemaOrg.sponsor = {
129
+ '@type': 'Organization',
130
+ name: SchemaOrgUtils.fieldDataToPlainText(content.patrocinato_da),
131
+ };
132
+ }
133
+
134
+ return <SchemaOrg content={content} schema={schemaOrg} />;
135
+ };
136
+
137
+ export default EventoSchemaOrg;
@@ -20,6 +20,7 @@ import {
20
20
  } from 'io-sanita-theme/components/View/commons';
21
21
 
22
22
  import {
23
+ EventoSchemaOrg,
23
24
  EventoCosE,
24
25
  EventoPartecipanti,
25
26
  EventoAChiSiRivolge,
@@ -38,6 +39,7 @@ import {
38
39
  } from 'io-sanita-theme/components/View/Evento';
39
40
 
40
41
  export const EventoViewSectionsOrder = [
42
+ { /* METADATI SCHEMA.ORG */ component: EventoSchemaOrg },
41
43
  { /* COS'è */ component: EventoCosE },
42
44
  { /* CHI PARTECIPA */ component: EventoPartecipanti },
43
45
  { /* EVENTI PADRI */ component: EventoFaParteDi },
@@ -111,3 +111,9 @@ export const EventoEventiCorrelati = loadable(
111
111
  /* webpackChunkName: "ISEventView" */ 'io-sanita-theme/components/View/Evento/EventoEventiCorrelati'
112
112
  ),
113
113
  );
114
+ export const EventoSchemaOrg = loadable(
115
+ () =>
116
+ import(
117
+ /* webpackChunkName: "ISEventView" */ 'io-sanita-theme/components/View/Evento/EventoSchemaOrg'
118
+ ),
119
+ );
@@ -1,16 +1,11 @@
1
- import { useIntl } from 'react-intl';
2
1
  import { toPublicURL } from '@plone/volto/helpers';
3
- import { SiteProperty } from 'volto-site-settings';
4
2
  import {
5
- getSiteProperty,
6
3
  SchemaOrgUtils,
7
4
  richTextHasContent,
8
5
  SchemaOrg,
9
6
  } from 'io-sanita-theme/helpers';
10
7
 
11
8
  const NewsItemSchemaOrg = ({ content }) => {
12
- const intl = useIntl();
13
-
14
9
  let siteTitle = SchemaOrgUtils.getSiteTitle();
15
10
 
16
11
  let schemaOrg = {
@@ -1,13 +1,5 @@
1
1
  import { toPublicURL } from '@plone/volto/helpers';
2
- import {
3
- SchemaOrg,
4
- SchemaOrgUtils,
5
- richTextHasContent,
6
- } from 'io-sanita-theme/helpers';
7
-
8
- import { useLoadSteps } from 'io-sanita-theme/components/View/ComeFarePer/Steps/helpers';
9
- import { positions } from 'slate';
10
- import schema from '../../manage/Widgets/HeaderContactsWidget/schema';
2
+ import { SchemaOrg, SchemaOrgUtils } from 'io-sanita-theme/helpers';
11
3
 
12
4
  const PersonaSchemaOrg = ({ content }) => {
13
5
  const siteTitle = SchemaOrgUtils.getSiteTitle();
@@ -0,0 +1,126 @@
1
+ import { toPublicURL, isInternalURL } from '@plone/volto/helpers';
2
+ import { useIntl } from 'react-intl';
3
+ import { SiteProperty } from 'volto-site-settings';
4
+ import {
5
+ SchemaOrg,
6
+ SchemaOrgUtils,
7
+ richTextHasContent,
8
+ getSiteProperty,
9
+ } from 'io-sanita-theme/helpers';
10
+
11
+ const ServizioSchemaOrg = ({ content }) => {
12
+ const intl = useIntl();
13
+
14
+ let siteTitle = SiteProperty({
15
+ property: 'site_title',
16
+ getValue: true,
17
+ defaultTitle: getSiteProperty('siteTitle', intl.locale),
18
+ });
19
+
20
+ const schemaOrg = {
21
+ '@type': 'Service',
22
+ name: content.title,
23
+ brand: {
24
+ '@type': 'Organization',
25
+ name: siteTitle,
26
+ },
27
+ areaServed: {
28
+ '@type': 'AdministrativeArea',
29
+ name: richTextHasContent(content.copertura_geografica)
30
+ ? SchemaOrgUtils.fieldDataToPlainText(content.copertura_geografica)
31
+ : siteTitle,
32
+ },
33
+ availableChannel: {
34
+ '@type': 'ServiceChannel',
35
+ name: 'Dove rivolgersi',
36
+ availableLanguage: {
37
+ '@type': 'Language',
38
+ name: 'Italian',
39
+ alternateName: 'it',
40
+ },
41
+ },
42
+ };
43
+
44
+ let description = [];
45
+ if (content.description) {
46
+ description.push(content.description);
47
+ }
48
+ if (richTextHasContent(content.descrizione_estesa)) {
49
+ description.push(
50
+ SchemaOrgUtils.fieldDataToPlainText(content.descrizione_estesa),
51
+ );
52
+ }
53
+ if (description.length > 0) {
54
+ schemaOrg.description = description.join('. ');
55
+ }
56
+
57
+ if (content.tipologia_servizio?.title) {
58
+ schemaOrg.serviceType = content.tipologia_servizio.title;
59
+ }
60
+
61
+ // a chi si rivolge
62
+ if (richTextHasContent(content.a_chi_si_rivolge)) {
63
+ schemaOrg.audience = {
64
+ '@type': 'Audience',
65
+ audienceType: SchemaOrgUtils.fieldDataToPlainText(
66
+ content.a_chi_si_rivolge,
67
+ ),
68
+ };
69
+ }
70
+
71
+ if (content.prenota_online_link) {
72
+ schemaOrg.availableChannel.serviceUrl = isInternalURL(
73
+ content.prenota_online_link,
74
+ )
75
+ ? toPublicURL(content.prenota_online_link)
76
+ : content.prenota_online_link;
77
+ }
78
+
79
+ if (content.struttura_correlata?.length > 0) {
80
+ schemaOrg.availableChannel.serviceLocation =
81
+ content.struttura_correlata.map((struttura) => {
82
+ return {
83
+ '@type': 'Place',
84
+ name: struttura.title,
85
+ url: toPublicURL(struttura['@id']),
86
+ address: {
87
+ '@type': 'PostalAddress',
88
+ streetAddress: struttura?.street || null,
89
+ postalCode: struttura?.zip_code || null,
90
+ addressLocality: struttura?.city || null,
91
+ },
92
+ };
93
+ });
94
+ }
95
+
96
+ // di UO se ne possono selezionare soltanto una
97
+ if (content.uo_correlata?.length > 0) {
98
+ schemaOrg.provider = {
99
+ '@type': 'Place',
100
+ name: content.uo_correlata[0].title,
101
+ url: toPublicURL(content.uo_correlata[0]['@id']),
102
+ address: {
103
+ '@type': 'PostalAddress',
104
+ streetAddress: content.uo_correlata[0]?.street || null,
105
+ postalCode: content.uo_correlata[0]?.zip_code || null,
106
+ addressLocality: content.uo_correlata[0]?.city || null,
107
+ },
108
+ };
109
+ }
110
+
111
+ // costi o biglietti
112
+ if (richTextHasContent(content.costi)) {
113
+ schemaOrg.hasOfferCatalog = {
114
+ '@type': 'OfferCatalog',
115
+ itemListElement: [
116
+ {
117
+ name: SchemaOrgUtils.fieldDataToPlainText(content.costi),
118
+ },
119
+ ],
120
+ };
121
+ }
122
+
123
+ return <SchemaOrg content={content} schema={schemaOrg} />;
124
+ };
125
+
126
+ export default ServizioSchemaOrg;
@@ -23,6 +23,7 @@ import {
23
23
  ServizioNotizie,
24
24
  ServizioUlterioriInformazioni,
25
25
  ServizioDocumenti,
26
+ ServizioSchemaOrg,
26
27
  } from 'io-sanita-theme/components/View/Servizio';
27
28
 
28
29
  import { ContentTypeViewSections } from 'io-sanita-theme/helpers';
@@ -39,6 +40,7 @@ import {
39
40
  } from 'io-sanita-theme/components/View/commons';
40
41
 
41
42
  export const ServizioSectionsOrder = [
43
+ { /* SCHEMA ORG */ component: ServizioSchemaOrg },
42
44
  { /* COSA SERVE */ component: ServizioCosaServe },
43
45
  { /* ACCEDI AL SERVIZIO */ component: ServizioAccediAlServizio },
44
46
  { /* TEMPI DI ATTESA */ component: ServizioTempiDiAttesa },
@@ -1,87 +1,110 @@
1
1
  import loadable from '@loadable/component';
2
2
 
3
- export const ServizioView = loadable(() =>
4
- import(
5
- /* webpackChunkName: "ISServizioView" */ 'io-sanita-theme/components/View/Servizio/ServizioView'
6
- ),
7
- );
8
- export const ServizioCosE = loadable(() =>
9
- import(
10
- /* webpackChunkName: "ISServizioView" */ 'io-sanita-theme/components/View/Servizio/ServizioCosE'
11
- ),
12
- );
13
- export const ServizioCosaServe = loadable(() =>
14
- import(
15
- /* webpackChunkName: "ISServizioView" */ 'io-sanita-theme/components/View/Servizio/ServizioCosaServe'
16
- ),
17
- );
18
- export const ServizioAccediAlServizio = loadable(() =>
19
- import(
20
- /* webpackChunkName: "ISServizioView" */ 'io-sanita-theme/components/View/Servizio/ServizioAccediAlServizio'
21
- ),
22
- );
23
- export const ServizioTempiDiAttesa = loadable(() =>
24
- import(
25
- /* webpackChunkName: "ISServizioView" */ 'io-sanita-theme/components/View/Servizio/ServizioTempiDiAttesa'
26
- ),
27
- );
28
- export const ServizioCosti = loadable(() =>
29
- import(
30
- /* webpackChunkName: "ISServizioView" */ 'io-sanita-theme/components/View/Servizio/ServizioCosti'
31
- ),
32
- );
33
- export const ServizioDove = loadable(() =>
34
- import(
35
- /* webpackChunkName: "ISServizioView" */ 'io-sanita-theme/components/View/Servizio/ServizioDove'
36
- ),
37
- );
38
- export const ServizioOrari = loadable(() =>
39
- import(
40
- /* webpackChunkName: "ISServizioView" */ 'io-sanita-theme/components/View/Servizio/ServizioOrari'
41
- ),
42
- );
43
- export const ServizioContatti = loadable(() =>
44
- import(
45
- /* webpackChunkName: "ISServizioView" */ 'io-sanita-theme/components/View/Servizio/ServizioContatti'
46
- ),
47
- );
48
- export const ServizioAChiSiRivolge = loadable(() =>
49
- import(
50
- /* webpackChunkName: "ISServizioView" */ 'io-sanita-theme/components/View/Servizio/ServizioAChiSiRivolge'
51
- ),
52
- );
53
- export const ServizioProcedureCollegate = loadable(() =>
54
- import(
55
- /* webpackChunkName: "ISServizioView" */ 'io-sanita-theme/components/View/Servizio/ServizioProcedureCollegate'
56
- ),
57
- );
58
- export const ServizioUOResponsabile = loadable(() =>
59
- import(
60
- /* webpackChunkName: "ISServizioView" */ 'io-sanita-theme/components/View/Servizio/ServizioUOResponsabile'
61
- ),
62
- );
63
- export const ServizioResponsabile = loadable(() =>
64
- import(
65
- /* webpackChunkName: "ISServizioView" */ 'io-sanita-theme/components/View/Servizio/ServizioResponsabile'
66
- ),
67
- );
68
- export const ServizioUlterioriInformazioni = loadable(() =>
69
- import(
70
- /* webpackChunkName: "ISServizioView" */ 'io-sanita-theme/components/View/Servizio/ServizioUlterioriInformazioni'
71
- ),
72
- );
73
- export const ServizioDocumenti = loadable(() =>
74
- import(
75
- /* webpackChunkName: "ISServizioView" */ 'io-sanita-theme/components/View/Servizio/ServizioDocumenti'
76
- ),
77
- );
78
- export const ServizioServiziCorrelati = loadable(() =>
79
- import(
80
- /* webpackChunkName: "ISServizioView" */ 'io-sanita-theme/components/View/Servizio/ServizioServiziCorrelati'
81
- ),
82
- );
83
- export const ServizioNotizie = loadable(() =>
84
- import(
85
- /* webpackChunkName: "ISServizioView" */ 'io-sanita-theme/components/View/Servizio/ServizioNotizie'
86
- ),
3
+ export const ServizioView = loadable(
4
+ () =>
5
+ import(
6
+ /* webpackChunkName: "ISServizioView" */ 'io-sanita-theme/components/View/Servizio/ServizioView'
7
+ ),
8
+ );
9
+ export const ServizioCosE = loadable(
10
+ () =>
11
+ import(
12
+ /* webpackChunkName: "ISServizioView" */ 'io-sanita-theme/components/View/Servizio/ServizioCosE'
13
+ ),
14
+ );
15
+ export const ServizioCosaServe = loadable(
16
+ () =>
17
+ import(
18
+ /* webpackChunkName: "ISServizioView" */ 'io-sanita-theme/components/View/Servizio/ServizioCosaServe'
19
+ ),
20
+ );
21
+ export const ServizioAccediAlServizio = loadable(
22
+ () =>
23
+ import(
24
+ /* webpackChunkName: "ISServizioView" */ 'io-sanita-theme/components/View/Servizio/ServizioAccediAlServizio'
25
+ ),
26
+ );
27
+ export const ServizioTempiDiAttesa = loadable(
28
+ () =>
29
+ import(
30
+ /* webpackChunkName: "ISServizioView" */ 'io-sanita-theme/components/View/Servizio/ServizioTempiDiAttesa'
31
+ ),
32
+ );
33
+ export const ServizioCosti = loadable(
34
+ () =>
35
+ import(
36
+ /* webpackChunkName: "ISServizioView" */ 'io-sanita-theme/components/View/Servizio/ServizioCosti'
37
+ ),
38
+ );
39
+ export const ServizioDove = loadable(
40
+ () =>
41
+ import(
42
+ /* webpackChunkName: "ISServizioView" */ 'io-sanita-theme/components/View/Servizio/ServizioDove'
43
+ ),
44
+ );
45
+ export const ServizioOrari = loadable(
46
+ () =>
47
+ import(
48
+ /* webpackChunkName: "ISServizioView" */ 'io-sanita-theme/components/View/Servizio/ServizioOrari'
49
+ ),
50
+ );
51
+ export const ServizioContatti = loadable(
52
+ () =>
53
+ import(
54
+ /* webpackChunkName: "ISServizioView" */ 'io-sanita-theme/components/View/Servizio/ServizioContatti'
55
+ ),
56
+ );
57
+ export const ServizioAChiSiRivolge = loadable(
58
+ () =>
59
+ import(
60
+ /* webpackChunkName: "ISServizioView" */ 'io-sanita-theme/components/View/Servizio/ServizioAChiSiRivolge'
61
+ ),
62
+ );
63
+ export const ServizioProcedureCollegate = loadable(
64
+ () =>
65
+ import(
66
+ /* webpackChunkName: "ISServizioView" */ 'io-sanita-theme/components/View/Servizio/ServizioProcedureCollegate'
67
+ ),
68
+ );
69
+ export const ServizioUOResponsabile = loadable(
70
+ () =>
71
+ import(
72
+ /* webpackChunkName: "ISServizioView" */ 'io-sanita-theme/components/View/Servizio/ServizioUOResponsabile'
73
+ ),
74
+ );
75
+ export const ServizioResponsabile = loadable(
76
+ () =>
77
+ import(
78
+ /* webpackChunkName: "ISServizioView" */ 'io-sanita-theme/components/View/Servizio/ServizioResponsabile'
79
+ ),
80
+ );
81
+ export const ServizioUlterioriInformazioni = loadable(
82
+ () =>
83
+ import(
84
+ /* webpackChunkName: "ISServizioView" */ 'io-sanita-theme/components/View/Servizio/ServizioUlterioriInformazioni'
85
+ ),
86
+ );
87
+ export const ServizioDocumenti = loadable(
88
+ () =>
89
+ import(
90
+ /* webpackChunkName: "ISServizioView" */ 'io-sanita-theme/components/View/Servizio/ServizioDocumenti'
91
+ ),
92
+ );
93
+ export const ServizioServiziCorrelati = loadable(
94
+ () =>
95
+ import(
96
+ /* webpackChunkName: "ISServizioView" */ 'io-sanita-theme/components/View/Servizio/ServizioServiziCorrelati'
97
+ ),
98
+ );
99
+ export const ServizioNotizie = loadable(
100
+ () =>
101
+ import(
102
+ /* webpackChunkName: "ISServizioView" */ 'io-sanita-theme/components/View/Servizio/ServizioNotizie'
103
+ ),
104
+ );
105
+ export const ServizioSchemaOrg = loadable(
106
+ () =>
107
+ import(
108
+ /* webpackChunkName: "ISServizioView" */ 'io-sanita-theme/components/View/Servizio/ServizioSchemaOrg'
109
+ ),
87
110
  );
@@ -0,0 +1,70 @@
1
+ import { toPublicURL } from '@plone/volto/helpers';
2
+ import {
3
+ SchemaOrgUtils,
4
+ richTextHasContent,
5
+ SchemaOrg,
6
+ } from 'io-sanita-theme/helpers';
7
+
8
+ const StrutturaSchemaOrg = ({ content }) => {
9
+ let siteTitle = SchemaOrgUtils.getSiteTitle();
10
+
11
+ let schemaOrg = {
12
+ '@type': 'MedicalOrganization',
13
+ url: toPublicURL(content['@id']),
14
+ name: siteTitle,
15
+
16
+ address: {
17
+ '@type': 'PostalAddress',
18
+ streetAddress: content.street,
19
+ postalCode: content.zip_code,
20
+ addressLocality: content.city,
21
+ },
22
+ };
23
+ if (content.tipologia_struttura?.title) {
24
+ schemaOrg.additionalType = content.tipologia_struttura?.title;
25
+ }
26
+ let description = [];
27
+
28
+ if (content.description) {
29
+ description.push(content.description);
30
+ }
31
+
32
+ if (richTextHasContent(content.descrizione_estesa)) {
33
+ description.push(
34
+ SchemaOrgUtils.fieldDataToPlainText(content.descrizione_estesa),
35
+ );
36
+ }
37
+
38
+ if (content.pdc_correlato?.length > 0) {
39
+ schemaOrg.contactPoint = content.pdc_correlato.map((pdc) => {
40
+ const contact = {
41
+ '@type': 'ContactPoint',
42
+ contactType: pdc.type_title,
43
+ name: pdc.title,
44
+ };
45
+
46
+ pdc.contatti?.forEach((c) => {
47
+ if (c.tipo === 'email') {
48
+ if (!contact.email) contact.email = c.valore;
49
+ else if (typeof contact.email === 'string') {
50
+ contact.email = [contact.email, c.valore];
51
+ } else {
52
+ contact.email.push(c.valore);
53
+ }
54
+ } else if (c.tipo === 'telefono') {
55
+ contact.telephone = c.valore;
56
+ } else if (c.tipo === 'url') {
57
+ contact.url = c.valore.startsWith('http')
58
+ ? c.valore
59
+ : `https://${c.valore}`;
60
+ }
61
+ });
62
+
63
+ return contact;
64
+ });
65
+ }
66
+
67
+ return <SchemaOrg content={content} schema={schemaOrg} />;
68
+ };
69
+
70
+ export default StrutturaSchemaOrg;
@@ -16,6 +16,7 @@ import {
16
16
  StrutturaServizi,
17
17
  StrutturaResponsabile,
18
18
  StrutturaPersonale,
19
+ StrutturaSchemaOrg,
19
20
  StrutturaNotizie,
20
21
  StrutturaGalleria,
21
22
  StrutturaUfficiCorrelati,
@@ -38,6 +39,7 @@ import {
38
39
  } from 'io-sanita-theme/components/View/commons';
39
40
 
40
41
  export const StrutturaSectionsOrder = [
42
+ { /* METATAG SchemaOrg */ component: StrutturaSchemaOrg },
41
43
  { /* COS'è */ component: StrutturaCosE },
42
44
  { /* A CHI SI RIVOLGE */ component: StrutturaAChiSiRivolge },
43
45
  { /* DOVE */ component: StrutturaDove },
@@ -80,3 +80,8 @@ export const StrutturaAllegati = loadable(() =>
80
80
  /* webpackChunkName: "ISStrutturaView" */ 'io-sanita-theme/components/View/Struttura/StrutturaAllegati'
81
81
  ),
82
82
  );
83
+ export const StrutturaSchemaOrg = loadable(() =>
84
+ import(
85
+ /* webpackChunkName: "ISStrutturaView" */ 'io-sanita-theme/components/View/Struttura/StrutturaSchemaOrg'
86
+ ),
87
+ );
@@ -1,12 +1,9 @@
1
1
  .leaflet-container {
2
+ z-index: 0; //per evitare che vada sopra alla testata styicky del sito
3
+
2
4
  .marker-cluster {
3
5
  background-color: $accent;
4
6
  color: $accent-contrast-text;
5
7
  box-shadow: 0 0 1px 4px rgba($accent, 60%);
6
8
  }
7
9
  }
8
- .leaflet-pane,
9
- .leaflet-bottom,
10
- .leaflet-top {
11
- z-index: 0; //per evitare che vada sopra alla testata styicky del sito
12
- }