dsfr4drupal-1.x-dev/components/quote/quote.twig

components/quote/quote.twig
{% set attributes = attributes|default(create_attribute()) %}
{% set blockquote_attributes = blockquote_attributes|default(create_attribute()) %}
{% set variant = variant|default('md') %}

{% if image %}
  {% set attributes = attributes.addClass('fr-quote--column') %}
{% endif %}

{% if color_schema %}
  {% set attributes = attributes.addClass('fr-quote--' ~ color_schema) %}
{% endif %}

<figure{{ attributes.addClass('fr-quote') }}>
  <blockquote{{ blockquote_attributes }}>
    <p class="fr-text--{{ variant }}">{{ quote }}</p>
  </blockquote>
  {% if author or source or image %}
    <figcaption>
      {% if author %}
        <p class="fr-quote__author">{{ author }}</p>
      {% endif %}
      {% if source %}
        <ul class="fr-quote__source">
          {% for src in source %}
            <li>{{ src }}</li>
          {% endfor %}
        </ul>
      {% else %}
        <div class="fr-quote__source">
          {% for src in source %}
            {{ src }}
          {% endfor %}
        </div>
      {% endif %}
      {% if image %}
        <div class="fr-quote__image">
          {# Do not forget to add class "fr-responsive-img" to the image. #}
          {{ image }}
        </div>
      {% endif %}
    </figcaption>
  {% endif %}
</figure>

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

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