-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
release(2.2.0): tema risultati di ricerca ouitoulia/diagraphe#22
- Loading branch information
Showing
18 changed files
with
343 additions
and
16 deletions.
There are no files selected for viewing
119 changes: 119 additions & 0 deletions
119
components/card/card-highlighting-search-results.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
{# | ||
/** | ||
* @file | ||
* Default theme implementation to display a node. | ||
* | ||
* Available variables: | ||
* - node: The node entity with limited access to object properties and methods. | ||
* Only method names starting with "get", "has", or "is" and a few common | ||
* methods such as "id", "label", and "bundle" are available. For example: | ||
* - node.getCreatedTime() will return the node creation timestamp. | ||
* - node.hasField('field_example') returns TRUE if the node bundle includes | ||
* field_example. (This does not indicate the presence of a value in this | ||
* field.) | ||
* - node.isPublished() will return whether the node is published or not. | ||
* Calling other methods, such as node.delete(), will result in an exception. | ||
* See \Drupal\node\Entity\Node for a full list of public properties and | ||
* methods for the node object. | ||
* - label: (optional) The title of the node. | ||
* - content: All node items. Use {{ content }} to print them all, | ||
* or print a subset such as {{ content.field_example }}. Use | ||
* {{ content|without('field_example') }} to temporarily suppress the printing | ||
* of a given child element. | ||
* - author_picture: The node author user entity, rendered using the "compact" | ||
* view mode. | ||
* - metadata: Metadata for this node. | ||
* - date: (optional) Themed creation date field. | ||
* - author_name: (optional) Themed author name field. | ||
* - url: Direct URL of the current node. | ||
* - display_submitted: Whether submission information should be displayed. | ||
* - attributes: HTML attributes for the containing element. | ||
* The attributes.class element may contain one or more of the following | ||
* classes: | ||
* - node: The current template type (also known as a "theming hook"). | ||
* - node--type-[type]: The current node type. For example, if the node is an | ||
* "Article" it would result in "node--type-article". Note that the machine | ||
* name will often be in a short form of the human readable label. | ||
* - node--view-mode-[view_mode]: The View Mode of the node; for example, a | ||
* teaser would result in: "node--view-mode-teaser", and | ||
* full: "node--view-mode-full". | ||
* The following are controlled through the node publishing options. | ||
* - node--promoted: Appears on nodes promoted to the front page. | ||
* - node--sticky: Appears on nodes ordered above other non-sticky nodes in | ||
* teaser listings. | ||
* - node--unpublished: Appears on unpublished nodes visible only to site | ||
* admins. | ||
* - title_attributes: Same as attributes, except applied to the main title | ||
* tag that appears in the template. | ||
* - content_attributes: Same as attributes, except applied to the main | ||
* content tag that appears in the template. | ||
* - author_attributes: Same as attributes, except applied to the author of | ||
* the node tag that appears in the template. | ||
* - title_prefix: Additional output populated by modules, intended to be | ||
* displayed in front of the main title tag that appears in the template. | ||
* - title_suffix: Additional output populated by modules, intended to be | ||
* displayed after the main title tag that appears in the template. | ||
* - view_mode: View mode; for example, "teaser" or "full". | ||
* - teaser: Flag for the teaser state. Will be true if view_mode is 'teaser'. | ||
* - page: Flag for the full page state. Will be true if view_mode is 'full'. | ||
* - readmore: Flag for more state. Will be true if the teaser content of the | ||
* node cannot hold the main body content. | ||
* - logged_in: Flag for authenticated user status. Will be true when the | ||
* current user is a logged-in member. | ||
* - is_admin: Flag for admin user status. Will be true when the current user | ||
* is an administrator. | ||
* | ||
* @see template_preprocess_node() | ||
* | ||
* @ingroup themeable | ||
*/ | ||
#} | ||
{% apply spaceless %} | ||
{# Set defaults #} | ||
{% set _card_variant = card_variant|default('petrol') %} | ||
|
||
{% set classes = [ | ||
'node', | ||
'article-wrapper', | ||
'node--type-' ~ node.bundle|clean_class, | ||
node.isPromoted() ? 'node--promoted', | ||
node.isSticky() ? 'node--sticky', | ||
not node.isPublished() ? 'node--unpublished', | ||
view_mode ? 'node--view-mode-' ~ view_mode|clean_class, | ||
] %} | ||
<article{{ attributes.addClass(classes) }}> | ||
<header> | ||
{% if title_prefix %} | ||
<small class="text-{{ _card_variant }}"> | ||
{{ title_prefix }} | ||
</small> | ||
{% endif %} | ||
<h3{{ title_attributes.addClass(['h4', 'mb-2']) }}> | ||
<a href="{{ url }}" title="{{ 'Read more about:'|t }} {{ label[0]['#context'].value }}" rel="bookmark"> | ||
{{ label }} | ||
{% if title_suffix %}<small class="d-block fw-normal lh-1 mt-1">{{ title_suffix }}</small>{% endif %} | ||
</a> | ||
</h3> | ||
</header> | ||
<section{{ content_attributes.addClass(['node__content', 'pt-2']) }}> | ||
{% if content.field_copertina[0] is iterable %} | ||
<div class="float-start me-3 mb-1"> | ||
{{ content.field_copertina }} | ||
</div> | ||
{% endif %} | ||
<div> | ||
{{ content|without('field_copertina', 'field_argomenti') }} | ||
</div> | ||
<div class="pt-3"> | ||
{{ content.field_argomenti }} | ||
</div> | ||
</section> | ||
<footer class="mt-3" aria-label="Collegamenti per approfondire {{ label[0]['#context'].value }}"> | ||
<a class="read-more text-{{ _card_variant }}" href="{{ url }}" title="{{ 'Read more about'|t }} {{ label[0]['#context'].value }}" rel="bookmark"> | ||
<span class="text">{{ 'Read more'|t }}</span> | ||
<span class="visually-hidden">{{ 'about'|t }} {{ label[0]['#context'].value }}</span> | ||
{% include '@bi-bcl/icon/icon.html.twig' with {name: 'it-arrow-right'} %} | ||
</a> | ||
</footer> | ||
</article> | ||
{% endapply %} |
6 changes: 6 additions & 0 deletions
6
...eld/field--view-mode-search-result--type-entity-reference--name-field-argomenti.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{% include '@bi-field/field-reference--format-label--component-badge.html.twig' with { | ||
background: 'petrol', | ||
rounded_pill: true, | ||
outline: true, | ||
attributes: attributes.addClass('badges'), | ||
} %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...rch-result--bundle-circolare--type-entity-reference--name-field-anno-scolastico.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{% include '@skenografia/field/_field--raw.html.twig' %} |
1 change: 1 addition & 0 deletions
1
...mode-search-result--bundle-circolare--type-integer--name-field-numero-circolare.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{% include '@skenografia/field/_field--raw.html.twig' %} |
6 changes: 6 additions & 0 deletions
6
templates/node/circolare/node--type-circolare--view-mode-search-result.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{% include '@skenografia_components/card/card-highlighting-search-results.html.twig' with { | ||
card_variant: 'greendark', | ||
title_prefix: 'Circolare ' ~ content.field_numero_circolare|render|striptags|trim ~ '-' ~ content.field_anno_scolastico|render|striptags|trim, | ||
title_suffix: content.field_abstract|render|striptags|trim, | ||
content: content|without('field_numero_circolare', 'field_anno_scolastico', 'field_abstract') | ||
} %} |
6 changes: 6 additions & 0 deletions
6
templates/node/documento/node--type-documento--view-mode-search-result.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{% include '@skenografia_components/card/card-highlighting-search-results.html.twig' with { | ||
card_variant: 'redbrown', | ||
title_prefix: 'Documento Prot. ' ~ content.field_protocollo|render|striptags|trim ~ ' del ' ~ content.field_data_inizio|render|striptags|trim ~ ' - ' ~ content.field_tipologia_documento|render|striptags|trim, | ||
title_suffix: content.field_abstract|render|striptags|trim, | ||
content: content|without('field_protocollo', 'field_data_inizio', 'field_tipologia_documento','field_abstract') | ||
} %} |
11 changes: 11 additions & 0 deletions
11
templates/node/evento/node--type-evento--view-mode-search-result.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{% apply spaceless %} | ||
{% set _dal_al %} | ||
{% include '@skenografia/node/_partial.field--type-date--name-dal-al.html.twig' %} | ||
{% endset %} | ||
{% include '@skenografia_components/card/card-highlighting-search-results.html.twig' with { | ||
card_variant: 'greendark', | ||
title_prefix: 'Evento ' ~ _dal_al|striptags|trim, | ||
title_suffix: content.field_abstract|render|striptags|trim, | ||
content: content|without('field_data_inizio', 'field_data_fine','field_abstract') | ||
} %} | ||
{% endapply %} |
6 changes: 6 additions & 0 deletions
6
templates/node/finanziamento/node--type-finanziamento--view-mode-search-result.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{% include '@skenografia_components/card/card-highlighting-search-results.html.twig' with { | ||
card_variant: 'greendark', | ||
title_prefix: 'Finanziamento ' ~ content.field_tipologia_finanziamento|render|striptags|trim, | ||
title_suffix: content.field_abstract|render|striptags|trim, | ||
content: content|without('field_tipologia_finanziamento', 'field_abstract') | ||
} %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
{# | ||
/** | ||
* @file | ||
* Default theme implementation to card display a node. | ||
* To activate this template you need to add a display named 'card'. | ||
* | ||
* Available variables: | ||
* - node: The node entity with limited access to object properties and methods. | ||
* Only method names starting with "get", "has", or "is" and a few common | ||
* methods such as "id", "label", and "bundle" are available. For example: | ||
* - node.getCreatedTime() will return the node creation timestamp. | ||
* - node.hasField('field_example') returns TRUE if the node bundle includes | ||
* field_example. (This does not indicate the presence of a value in this | ||
* field.) | ||
* - node.isPublished() will return whether the node is published or not. | ||
* Calling other methods, such as node.delete(), will result in an exception. | ||
* See \Drupal\node\Entity\Node for a full list of public properties and | ||
* methods for the node object. | ||
* - label: (optional) The title of the node. | ||
* - content: All node items. Use {{ content }} to print them all, | ||
* or print a subset such as {{ content.field_example }}. Use | ||
* {{ content|without('field_example') }} to temporarily suppress the printing | ||
* of a given child element. | ||
* - author_picture: The node author user entity, rendered using the "compact" | ||
* view mode. | ||
* - metadata: Metadata for this node. | ||
* - date: (optional) Themed creation date field. | ||
* - author_name: (optional) Themed author name field. | ||
* - url: Direct URL of the current node. | ||
* - display_submitted: Whether submission information should be displayed. | ||
* - attributes: HTML attributes for the containing element. | ||
* The attributes.class element may contain one or more of the following | ||
* classes: | ||
* - node: The current template type (also known as a "theming hook"). | ||
* - node--type-[type]: The current node type. For example, if the node is an | ||
* "Article" it would result in "node--type-article". Note that the machine | ||
* name will often be in a short form of the human readable label. | ||
* - node--view-mode-[view_mode]: The View Mode of the node; for example, a | ||
* teaser would result in: "node--view-mode-teaser", and | ||
* full: "node--view-mode-full". | ||
* The following are controlled through the node publishing options. | ||
* - node--promoted: Appears on nodes promoted to the front page. | ||
* - node--sticky: Appears on nodes ordered above other non-sticky nodes in | ||
* teaser listings. | ||
* - node--unpublished: Appears on unpublished nodes visible only to site | ||
* admins. | ||
* - title_attributes: Same as attributes, except applied to the main title | ||
* tag that appears in the template. | ||
* - content_attributes: Same as attributes, except applied to the main | ||
* content tag that appears in the template. | ||
* - author_attributes: Same as attributes, except applied to the author of | ||
* the node tag that appears in the template. | ||
* - title_prefix: Additional output populated by modules, intended to be | ||
* displayed in front of the main title tag that appears in the template. | ||
* - title_suffix: Additional output populated by modules, intended to be | ||
* displayed after the main title tag that appears in the template. | ||
* - view_mode: View mode; for example, "teaser" or "full". | ||
* - teaser: Flag for the teaser state. Will be true if view_mode is 'teaser'. | ||
* - page: Flag for the full page state. Will be true if view_mode is 'full'. | ||
* - readmore: Flag for more state. Will be true if the teaser content of the | ||
* node cannot hold the main body content. | ||
* - logged_in: Flag for authenticated user status. Will be true when the | ||
* current user is a logged-in member. | ||
* - is_admin: Flag for admin user status. Will be true when the current user | ||
* is an administrator. | ||
* | ||
* @see template_preprocess_node() | ||
* | ||
* @ingroup themeable | ||
*/ | ||
#} | ||
{% apply spaceless %} | ||
{% set node_variants_map = { | ||
'persona': 'redbrown', | ||
'luogo': 'redbrown', | ||
'documento': 'redbrown', | ||
'struttura-organizzativa': 'redbrown', | ||
'servizio': 'purplelight', | ||
'percorso-di-studio': 'purplelight', | ||
'article': 'greendark', | ||
'circolare': 'greendark', | ||
'evento': 'greendark', | ||
'finanziamento': 'greendark', | ||
'scheda-didattica': 'bluelectric', | ||
'progetto': 'bluelectric', | ||
'classe': 'bluelectric' | ||
} %} | ||
{% include '@skenografia_components/card/card-highlighting-search-results.html.twig' with { | ||
card_variant: node_variants_map[node.bundle|clean_id] ?? 'petrol', | ||
title_prefix: drupal_config('node.type.' ~ node.bundle, 'name'), | ||
title_suffix: content.field_abstract|render|striptags|trim, | ||
content: content|without('field_abstract') | ||
} %} | ||
{% endapply %} |
11 changes: 11 additions & 0 deletions
11
templates/node/progetto/node--type-progetto--view-mode-search-result.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{% apply spaceless %} | ||
{% set _dal_al %} | ||
{% include '@skenografia/node/_partial.field--type-date--name-dal-al.html.twig' %} | ||
{% endset %} | ||
{% include '@skenografia_components/card/card-highlighting-search-results.html.twig' with { | ||
card_variant: 'bluelectric', | ||
title_prefix: 'Progetto - ' ~ _dal_al|striptags|trim, | ||
title_suffix: content.field_abstract|render|striptags|trim, | ||
content: content|without('field_data_inizio', 'field_data_fine','field_abstract') | ||
} %} | ||
{% endapply %} |
6 changes: 6 additions & 0 deletions
6
templates/node/servizio/node--type-servizio--view-mode-search-result.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{% include '@skenografia_components/card/card-highlighting-search-results.html.twig' with { | ||
card_variant: 'purplelight', | ||
title_prefix: 'Servizio per ' ~ content.field_tipologia_servizio|render|striptags|trim, | ||
title_suffix: content.field_abstract|render|striptags|trim, | ||
content: content|without('field_tipologia_servizio', 'field_abstract') | ||
} %} |
6 changes: 6 additions & 0 deletions
6
...ttura_organizzativa/node--type-struttura_organizzativa--view-mode-search-result.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{% include '@skenografia_components/card/card-highlighting-search-results.html.twig' with { | ||
card_variant: 'redbrown', | ||
title_prefix: 'Struttura organizzativa - ' ~ content.field_tipologia_struttura|render|striptags|trim, | ||
title_suffix: content.field_abstract|render|striptags|trim, | ||
content: content|without('field_tipologia_struttura', 'field_abstract') | ||
} %} |
51 changes: 51 additions & 0 deletions
51
...views/search/block--title--views-exposed-filter-block--risultati-ricerca-page-1.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
{# | ||
/** | ||
* @file | ||
* Default theme implementation to display a block. | ||
* | ||
* Available variables: | ||
* - plugin_id: The ID of the block implementation. | ||
* - label: The configured label of the block if visible. | ||
* - configuration: A list of the block's configuration values. | ||
* - label: The configured label for the block. | ||
* - label_display: The display settings for the label. | ||
* - provider: The module or other provider that provided this block plugin. | ||
* - Block plugin specific settings will also be stored here. | ||
* - content: The content of this block. | ||
* - attributes: array of HTML attributes populated by modules, intended to | ||
* be added to the main container tag of this template. | ||
* - id: A valid HTML ID and guaranteed unique. | ||
* - title_attributes: Same as attributes, except applied to the main title | ||
* tag that appears in the template. | ||
* - title_prefix: Additional output populated by modules, intended to be | ||
* displayed in front of the main title tag that appears in the template. | ||
* - title_suffix: Additional output populated by modules, intended to be | ||
* displayed after the main title tag that appears in the template. | ||
* | ||
* @see template_preprocess_block() | ||
* | ||
* @ingroup themeable | ||
*/ | ||
#} | ||
{% apply spaceless %} | ||
{% set id_block = 'it-' ~ attributes.id %} | ||
{% set classes = [ | ||
'block', | ||
'block-' ~ configuration.provider|clean_class, | ||
'block-' ~ plugin_id|clean_class, | ||
'mt-5', | ||
'd-none', | ||
'd-lg-block' | ||
] %} | ||
|
||
<div{{ attributes.addClass(classes).setAttribute('id', id_block) }}> | ||
{{ title_prefix }} | ||
{% if label %} | ||
<h2{{ title_attributes }}>{{ label }}</h2> | ||
{% endif %} | ||
{{ title_suffix }} | ||
{% block content %} | ||
{{ content }} | ||
{% endblock %} | ||
</div> | ||
{% endapply %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
templates/views/search/input--submit--id--edit-submit-risultati-ricerca--3.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{% include '@skenografia/views/search/input--submit--id--edit-submit-risultati-ricerca.html.twig' %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.