1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- {#
- /**
- * @file
- * Default theme implementation for a paragraphs summary.
- *
- * Available variables:
- * - expanded: Whether the summary is expanded or not.
- * - content: Array of content summary items.
- * - behaviors: Array of behavior summary items.
- *
- * @see template_preprocess()
- *
- * @ingroup themeable
- */
- #}
- {% set classes = [
- 'paragraphs-description',
- expanded ? 'paragraphs-expanded-description' : 'paragraphs-collapsed-description'
- ] %}
- {% set label_classes = [
- 'field_title'
-
- ] %}
- {% spaceless %}
- {% if content is not empty or behaviors is not empty %}
- {# <div{{ attributes.addClass(classes) }}> #}
- {% if content is not empty %}
- {# <div class="paragraphs-content-wrapper"> #}
- {%- for content_item in content -%}
- <span {{ attributes.addClass(label_classes) }}>{{ content_item }}</span>
- {%- if not loop.last -%}, {% endif %}
- {%- endfor -%}
- {# </div> #}
- {% endif %}
- {% if behaviors is not empty %}
- <div class="paragraphs-plugin-wrapper">
- {%- for behavior_item in behaviors -%}
- <span class="summary-plugin">
- {%- if behavior_item.label is not null -%}
- <span class="summary-plugin-label">{{ behavior_item.label }}</span>
- {%- endif -%}
- {{ behavior_item.value -}}
- </span>
- {%- endfor -%}
- </div>
- {% endif %}
- {# </div> #}
- {% endif %}
- {% endspaceless %}
|