socialbase-1.1.0/templates/profile/profile--profile--teaser--anonymous.html.twig

templates/profile/profile--profile--teaser--anonymous.html.twig
{#
/**
 * @file
 *
 * Default theme implementation for profiles.
 *
 * Available variables:
 * - content: Items for the content of the profile.
 *   Use 'content' to print them all, or print a subset such as
 *   'content.title'. Use the following code to exclude the
 *   printing of a given child element:
 *   @code
 *   {{ content|without('title') }}
 *   @endcode
 * - attributes: HTML attributes for the wrapper.
 * - profile: The profile object.
 * - url: The profile URL.
 *
 * @ingroup themeable
 */
#}
{{ attach_library('socialbase/teaser')}}
<div class="card teaser">
  <div class="teaser__image">
    {% if content.field_profile_image %}
      {{ content.field_profile_image }}
    {% endif %}
  </div>
  <div class="teaser__body">
    <div class="teaser__content">
      <h4 class="teaser__title">
        {{ profile_name }} {{ profile_name_extra }}
      </h4>
      {% if content.field_profile_function|render or content.field_profile_organization|render %}
        <div class="teaser__content-line">
          <svg class="teaser__content-type-icon">
            <title>{% trans %}User function/organization{% endtrans %}</title>
            <use xlink:href="#icon-business_center"></use>
          </svg>
          <span class="teaser__content-text">
            {% if content.field_profile_organization|render %}
              {{ '@function at @organization'|t({'@function': content.field_profile_function|render, '@organization': content.field_profile_organization|render}) }}
            {% else %}
              {{ content.field_profile_function }}
            {% endif %}
          </span>
        </div>
      {% endif %}

      {% if content.field_profile_profile_tag['#items'] or badges %}
        <div style="margin-left: 30px; margin-top: 5px;">
          {% for badge in badges %}
            {% set badge_classes = badge.classes|merge(['badge']) %}
            <div{{ attributes.addClass(badge_classes) }}>{{ badge.label }}</div>
          {% endfor %}
          {% for item in content.field_profile_profile_tag['#items'] %}
            <div class="badge badge-default">{{ item.entity.label }}</div>
          {% endfor %}
        </div>
      {% endif %}

    </div>
  </div>
</div>

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

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