socialbase-1.1.0/templates/paragraphs-summary.html.twig

templates/paragraphs-summary.html.twig
{#
/**
 * @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'
] %}
{% apply 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 -%}
                        {% if content_item is not null %}
                            <span class="summary-content">{{ content_item }}</span>
                            {%- if not loop.last -%}, {% endif %}
                        {% 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 %}
{% endapply %}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc