Skip to content

Commit

Permalink
feat: add new data-elements
Browse files Browse the repository at this point in the history
* add new data-element for crawler

* new data elements

* new data elements

* change data element name

* update data elements name

* update data element name

* new data elements on feedback

* new data element

* solve conflict
  • Loading branch information
lorycade authored Mar 2, 2023
1 parent 38645c8 commit 6ace4cf
Show file tree
Hide file tree
Showing 12 changed files with 60 additions and 52 deletions.
2 changes: 1 addition & 1 deletion src/components/cmp-button/cmp-button.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
{{label}}
</a>
{{else}}
<button type="button" {{#if modalId}}data-bs-toggle="modal" data-bs-target="#{{modalId}}" {{/if}}
<button type="button" {{#if data-element}}data-element="{{data-element}}"{{/if}} {{#if modalId}}data-bs-toggle="modal" data-bs-target="#{{modalId}}" {{/if}}
{{#if aria-label}}aria-label="{{aria-label}}{{#if btn-label-text}} documento{{/if}}"{{/if}}
class="btn
{{#if primary}}btn-primary{{/if}}
Expand Down
2 changes: 1 addition & 1 deletion src/components/cmp-footer/cmp-footer.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@
<a href="#" data-element="privacy-policy-link">Informativa privacy</a>
</li>
<li>
<a href="#">Note legali</a>
<a href="#" data-element="legal-notes">Note legali</a>
</li>
<li>
<a href="#" data-element="accessibility-link">Dichiarazione di accessibilità</a>
Expand Down
2 changes: 1 addition & 1 deletion src/components/cmp-icon-link/cmp-icon-link.hbs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="cmp-icon-link">
<a class="list-item icon-left d-inline-block {{link-class}}" href="#" aria-label="Scarica {{link}} {{dimensione-file}}" title="Scarica {{link}} {{dimensione-file}}">
<a class="list-item icon-left d-inline-block {{link-class}}" href="#" aria-label="Scarica {{link}} {{dimensione-file}}" title="Scarica {{link}} {{dimensione-file}}" {{#if data-element}}data-element="{{data-element}}"{{/if}}>
<span class="list-item-title-icon-wrapper">
<svg class="icon icon-primary icon-sm me-1" aria-hidden="true">
<use href="../assets/bootstrap-italia/dist/svg/sprites.svg#it-clip"></use>
Expand Down
2 changes: 1 addition & 1 deletion src/components/cmp-list-card-img/cmp-list-card-img-hr.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<span class="data">{{card.category-date}}</span>
{{/if}}
</div>
<a href="#" class="text-decoration-none"><h3 class="h5 card-title">{{card.title}}</h3></a>
<a href="#" class="text-decoration-none" data-element="news-category-link"><h3 class="h5 card-title">{{card.title}}</h3></a>
<p class="card-text d-none d-md-block">{{card.description}}</p>
</div>
</div>
Expand Down
8 changes: 6 additions & 2 deletions src/components/cmp-list-card-img/cmp-list-card-img.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<h3 class="cmp-list-card-img__body-title "><a href="#" class="text-decoration-none">{{card.title}}</a></h3>
<p class="cmp-list-card-img__body-description">{{card.description}}</p>

<a class="read-more t-primary text-uppercase cmp-list-card-img__body-link " href="#" aria-label="Leggi di più sulla pagina di {{card.title}}">
<a class="read-more t-primary text-uppercase cmp-list-card-img__body-link" href="#" aria-label="Leggi di più sulla pagina di {{card.title}}">
<span class="text">{{card.link}}</span>
<span class="visually-hidden">su Lorem ipsum dolor sit amet, consectetur adipiscing elit…</span>
<svg class="icon icon-primary icon-xs ml-10">
Expand All @@ -46,7 +46,11 @@

{{#if buttonNext}}
<div class="d-flex justify-content-end">
{{> cmp-button/cmp-button primary="true" class="px-5 py-3 full-mb" aria-label=aria-label }}
{{#if btn-data-element}}
{{>cmp-button/cmp-button data-element=btn-data-element primary="true" class="px-5 py-3 full-mb" aria-label=aria-label }}
{{else}}
{{>cmp-button/cmp-button primary="true" class="px-5 py-3 full-mb" aria-label=aria-label }}
{{/if}}
</div>
{{/if}}

Expand Down
44 changes: 22 additions & 22 deletions src/components/cmp-rating/cmp-rating.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
<div class="cmp-rating__card-first">
<div class="card-header border-0">
{{#if public-template}}
<h2 class="title-medium-2-semi-bold mb-0">Quanto sono chiare le informazioni su questa pagina?</h2>
<h2 class="title-medium-2-semi-bold mb-0" data-element="feedback-title">Quanto sono chiare le informazioni su questa pagina?</h2>
{{else}}
<h2 class="title-medium-2-semi-bold mb-0">Quanto è stato facile usare questo servizio?</h2>
<h2 class="title-medium-2-semi-bold mb-0" data-element="feedback-title">Quanto è stato facile usare questo servizio?</h2>
{{/if}}
</div>
<div class="card-body">
<fieldset class="rating">
<legend class="visually-hidden">Valuta da 1 a 5 stelle la pagina</legend>
<input type="radio" id="star5a" name="ratingA" value="5">
<label class="full rating-star active" for="star5a">
<label class="full rating-star active" for="star5a" data-element="feedback-rate-5">
<svg class="icon icon-sm" role="img" aria-labelledby="first-star" viewBox="0 0 24 24" id="it-star-full"
xmlns="http://www.w3.org/2000/svg">
<path d="M12 1.7L9.5 9.2H1.6L8 13.9l-2.4 7.6 6.4-4.7 6.4 4.7-2.4-7.6 6.4-4.7h-7.9L12 1.7z" />
Expand All @@ -21,7 +21,7 @@
<span class="visually-hidden" id="first-star">Valuta 5 stelle su 5</span>
</label>
<input type="radio" id="star4a" name="ratingA" value="4">
<label class="full rating-star active" for="star4a">
<label class="full rating-star active" for="star4a" data-element="feedback-rate-4">
<svg class="icon icon-sm" role="img" aria-labelledby="second-star" viewBox="0 0 24 24" id="it-star-full"
xmlns="http://www.w3.org/2000/svg">
<path d="M12 1.7L9.5 9.2H1.6L8 13.9l-2.4 7.6 6.4-4.7 6.4 4.7-2.4-7.6 6.4-4.7h-7.9L12 1.7z" />
Expand All @@ -30,7 +30,7 @@
<span class="visually-hidden" id="second-star">Valuta 4 stelle su 5</span>
</label>
<input type="radio" id="star3a" name="ratingA" value="3">
<label class="full rating-star active" for="star3a">
<label class="full rating-star active" for="star3a" data-element="feedback-rate-3">
<svg class="icon icon-sm" role="img" aria-labelledby="third-star" viewBox="0 0 24 24" id="it-star-full"
xmlns="http://www.w3.org/2000/svg">
<path d="M12 1.7L9.5 9.2H1.6L8 13.9l-2.4 7.6 6.4-4.7 6.4 4.7-2.4-7.6 6.4-4.7h-7.9L12 1.7z" />
Expand All @@ -39,7 +39,7 @@
<span class="visually-hidden" id="third-star">Valuta 3 stelle su 5</span>
</label>
<input type="radio" id="star2a" name="ratingA" value="2">
<label class="full rating-star active" for="star2a">
<label class="full rating-star active" for="star2a" data-element="feedback-rate-2">
<svg class="icon icon-sm" role="img" aria-labelledby="fourth-star" viewBox="0 0 24 24" id="it-star-full"
xmlns="http://www.w3.org/2000/svg">
<path d="M12 1.7L9.5 9.2H1.6L8 13.9l-2.4 7.6 6.4-4.7 6.4 4.7-2.4-7.6 6.4-4.7h-7.9L12 1.7z" />
Expand All @@ -48,7 +48,7 @@
<span class="visually-hidden" id="fourth-star">Valuta 2 stelle su 5</span>
</label>
<input type="radio" id="star1a" name="ratingA" value="1">
<label class="full rating-star active" for="star1a">
<label class="full rating-star active" for="star1a" data-element="feedback-rate-1">
<svg class="icon icon-sm" role="img" aria-labelledby="fifth-star" viewBox="0 0 24 24" id="it-star-full"
xmlns="http://www.w3.org/2000/svg">
<path d="M12 1.7L9.5 9.2H1.6L8 13.9l-2.4 7.6 6.4-4.7 6.4 4.7-2.4-7.6 6.4-4.7h-7.9L12 1.7z" />
Expand All @@ -68,10 +68,10 @@
<div class="form-rating d-none">
<div class="d-none" data-step="1">
<div class="cmp-steps-rating">
<fieldset class="fieldset-rating-one d-none">
<fieldset class="fieldset-rating-one d-none" data-element="feedback-rating-positive">
<div class="iscrizioni-header w-100">
<h3 class="step-title d-flex align-items-center justify-content-between drop-shadow">
<legend class="d-block d-lg-inline">
<legend class="d-block d-lg-inline" data-element="feedback-rating-question">
Quali sono stati gli aspetti che hai preferito?
</legend>
<span class="step">1/2</span>
Expand All @@ -84,34 +84,34 @@
<div class="form-check m-0">
<div class="radio-body border-bottom border-light cmp-radio-list__item">
<input name="rating1" type="radio" id="radio-1">
<label for="radio-1" class="active">Le indicazioni erano chiare</label>
<label for="radio-1" class="active" data-element="feedback-rating-answer">Le indicazioni erano chiare</label>
</div>
<div class="radio-body border-bottom border-light cmp-radio-list__item">
<input name="rating1" type="radio" id="radio-2">
<label for="radio-2" class="active">Le indicazioni erano complete</label>
<label for="radio-2" class="active" data-element="feedback-rating-answer">Le indicazioni erano complete</label>
</div>
<div class="radio-body border-bottom border-light cmp-radio-list__item">
<input name="rating1" type="radio" id="radio-3">
<label for="radio-3" class="active">Capivo sempre che stavo procedendo correttamente</label>
<label for="radio-3" class="active" data-element="feedback-rating-answer">Capivo sempre che stavo procedendo correttamente</label>
</div>
<div class="radio-body border-bottom border-light cmp-radio-list__item">
<input name="rating1" type="radio" id="radio-4">
<label for="radio-4" class="active">Non ho avuto problemi tecnici</label>
<label for="radio-4" class="active" data-element="feedback-rating-answer">Non ho avuto problemi tecnici</label>
</div>
<div class="radio-body border-bottom border-light cmp-radio-list__item">
<input name="rating1" type="radio" id="radio-5">
<label for="radio-4" class="active">Altro</label>
<label for="radio-4" class="active" data-element="feedback-rating-answer">Altro</label>
</div>
</div>
</div>
</div>
</div>
</div>
</fieldset>
<fieldset class="fieldset-rating-two d-none">
<fieldset class="fieldset-rating-two d-none" data-element="feedback-rating-negative">
<div class="iscrizioni-header w-100">
<h3 class="step-title d-flex align-items-center justify-content-between drop-shadow">
<legend class="d-block d-lg-inline">
<legend class="d-block d-lg-inline" data-element="feedback-rating-question">
Dove hai incontrato le maggiori difficoltà?
</legend>
<span class="step">1/2</span>
Expand All @@ -124,23 +124,23 @@
<div class="form-check m-0">
<div class="radio-body border-bottom border-light cmp-radio-list__item">
<input name="rating2" type="radio" id="radio-5">
<label for="radio-5" class="active">A volte le indicazioni non erano chiare</label>
<label for="radio-5" class="active" data-element="feedback-rating-answer">A volte le indicazioni non erano chiare</label>
</div>
<div class="radio-body border-bottom border-light cmp-radio-list__item">
<input name="rating2" type="radio" id="radio-6">
<label for="radio-6" class="active">A volte le indicazioni non erano complete</label>
<label for="radio-6" class="active" data-element="feedback-rating-answer">A volte le indicazioni non erano complete</label>
</div>
<div class="radio-body border-bottom border-light cmp-radio-list__item">
<input name="rating2" type="radio" id="radio-7">
<label for="radio-7" class="active">A volte non capivo se stavo procedendo correttamente</label>
<label for="radio-7" class="active" data-element="feedback-rating-answer">A volte non capivo se stavo procedendo correttamente</label>
</div>
<div class="radio-body border-bottom border-light cmp-radio-list__item">
<input name="rating2" type="radio" id="radio-8">
<label for="radio-8" class="active">Ho avuto problemi tecnici</label>
<label for="radio-8" class="active" data-element="feedback-rating-answer">Ho avuto problemi tecnici</label>
</div>
<div class="radio-body border-bottom border-light cmp-radio-list__item">
<input name="rating2" type="radio" id="radio-9">
<label for="radio-8" class="active">Altro</label>
<label for="radio-8" class="active" data-element="feedback-rating-answer">Altro</label>
</div>
</div>
</div>
Expand All @@ -165,7 +165,7 @@
<div class="form-group">
<label for="formGroupExampleInputWithHelp" class="">Dettaglio</label>
<input type="text" class="form-control" id="formGroupExampleInputWithHelp"
aria-describedby="formGroupExampleInputWithHelpDescription" maxlength="200">
aria-describedby="formGroupExampleInputWithHelpDescription" maxlength="200" data-element="feedback-input-text">
<small id="formGroupExampleInputWithHelpDescription" class="form-text">
Inserire massimo 200 caratteri</small>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/components/cmp-timeline/cmp-timeline.hbs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<div class="cmp-timeline">
<h2 class="title-xxlarge mb-3" {{#if id-title}}id="{{id-title}}"{{/if}}>{{title}}</h2>
{{#if description}}
<div class="richtext-wrapper {{#if lora}}lora{{/if}}">
<div class="richtext-wrapper {{#if lora}}lora{{/if}}" data-element="service-calendar-text">
<p>{{description}}</p>
</div>
{{/if}}
<div class="calendar-vertical mb-3">
<div class="calendar-vertical mb-3" data-element="service-calendar-list">
{{#each timeline as |date|}}
<div class="calendar-date">
<h3 class="calendar-date-day">
Expand Down
20 changes: 10 additions & 10 deletions src/pages/sito/amministrazione.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
card-text="Il sindaco, o primo cittadino, è a capo del governo del Comune e dell’amministrazione
comunale."
classTitle="title-xlarge"
data-element="amministration-element"
data-element="management-category-link"
}}
</div>
<div class="col-md-6 col-lg-4">
Expand All @@ -41,7 +41,7 @@
card-text="Sportello unico per le attività produttive e l'edilizia (Suape), commercio e somministrazione,
commercio su area pubblica, concessioni suolo, turismo, incentivi alle imprese, mercati"
classTitle="title-xlarge"
data-element="amministration-element"
data-element="management-category-link"
}}
</div>
<div class="col-md-6 col-lg-4">
Expand All @@ -50,7 +50,7 @@
card-title="Pianificazione strategica e territoriale"
card-text="Predisposizione, aggiornamento e attuazione degli strumenti urbanistici generali, di settore e attuativi. Supporto per tutte le attività progettuali interne ed esterne all'amministrazione"
classTitle="title-xlarge"
data-element="amministration-element"
data-element="management-category-link"
}}
</div>
</div>
Expand All @@ -67,7 +67,7 @@
card-text="La struttura organizzativa è suddivisa in aree di competenze che gestiscono i servizi erogati
alla comunità."
classTitle="title-xlarge"
data-element="amministration-element"
data-element="management-category-link"
}}
</div>

Expand All @@ -77,7 +77,7 @@
card-title="Documenti e dati"
card-text="Bandi di concorso, avvisi, graduatorie, statistiche e documenti pubblici."
classTitle="title-xlarge"
data-element="amministration-element"
data-element="management-category-link"
}}
</div>

Expand All @@ -88,7 +88,7 @@
card-text="I consorzi, gli enti e le società partecipate di cui il Comune fa parte per rappresentare al
meglio gli interessi della comunità."
classTitle="title-xlarge"
data-element="amministration-element"
data-element="management-category-link"
}}
</div>

Expand All @@ -99,7 +99,7 @@
card-text="Le informazioni sulla Giunta e il Consiglio comunale, incluse le convocazioni, le registrazioni
delle sedute e i verbali."
classTitle="title-xlarge"
data-element="amministration-element"
data-element="management-category-link"
}}
</div>

Expand All @@ -109,7 +109,7 @@
card-title="Personale amministrativo"
card-text="Personale da contattare per informazioni e supporto ai servizi erogati dagli uffici."
classTitle="title-xlarge"
data-element="amministration-element"
data-element="management-category-link"
}}
</div>

Expand All @@ -119,7 +119,7 @@
card-title="Politici"
card-text="Tutti i rappresentanti dei cittadini che compongono gli organi di indirizzo politico del Comune."
classTitle="title-xlarge"
data-element="amministration-element"
data-element="management-category-link"
}}
</div>

Expand All @@ -130,7 +130,7 @@
card-text="Le informazioni e i contatti degli Uffici di Città, gli uffici aperti al pubblico e gli uffici
assistenziali."
classTitle="title-xlarge"
data-element="amministration-element"
data-element="management-category-link"
}}
</div>

Expand Down
4 changes: 2 additions & 2 deletions src/pages/sito/eventi.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@
<div class="bg-grey-dsk py-5">
<div class="container">
<h2 class="title-xxlarge mb-4">Eventi in evidenza</h2>
{{>cmp-list-card-img/cmp-list-card-img cards=cards.card-events label="Tutti gli eventi" buttonNext=true}}
{{>cmp-list-card-img/cmp-list-card-img cards=cards.card-events label="Tutti gli eventi" buttonNext=true btn-data-element="live-button-locations"}}
</div>
</div>

<div class="container p-3 p-md-5">
<h2 class="title-xxlarge mb-40 ">Luoghi in evidenza</h2>
{{>cmp-list-card-img/cmp-list-card-img cards=cards.card-places label="Tutti i luoghi" buttonNext=true}}
{{>cmp-list-card-img/cmp-list-card-img cards=cards.card-places label="Tutti i luoghi" buttonNext=true btn-data-element="live-button-events"}}
</div>

<div class="bg-primary">
Expand Down
3 changes: 3 additions & 0 deletions src/pages/sito/novita.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
borderlight=true
classTitle="title-xlarge"
card-title="Notizie"
data-element="news-category-link"
card-text="Gli ultimi aggiornamenti sugli avvenimenti e la vita culturale nel Comune."
}}
</div>
Expand All @@ -63,6 +64,7 @@
borderlight=true
classTitle="title-xlarge"
card-title="Comunicati"
data-element="news-category-link"
card-text="Le comunicazioni ufficiali del Sindaco, degli organi politici e degli uffici comunali."
}}
</div>
Expand All @@ -72,6 +74,7 @@
borderlight=true
classTitle="title-xlarge"
card-title="Avvisi"
data-element="news-category-link"
card-text="Bandi di gara, avvisi di concorso e tutte le opportunità per cittadini e imprese."
}}
</div>
Expand Down
1 change: 1 addition & 0 deletions src/pages/sito/servizi.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@
outline-primary="true"
class="pt-15 pb-15 pl-90 pr-90 mb-30 mt-3 mb-lg-50 full-mb text-button"
label="Carica altri risultati"
data-element="load-other-cards"
}}
</div>

Expand Down
Loading

1 comment on commit 6ace4cf

@vercel
Copy link

@vercel vercel bot commented on 6ace4cf Mar 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.