socialbase-1.1.0/templates/profile/profile--profile--hero.html.twig

templates/profile/profile--profile--hero.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/hero')}}

{% if profile_hero_styled_image_url %}
  <div style="background-image: url('{{ profile_hero_styled_image_url }}')" class="cover cover-img cover-img-gradient">
{% else %}
  <div class="cover">
{% endif %}
    <div class="hero__bgimage-overlay"></div>
{% if profile_edit_url %}
  <div class="hero-action-button">
    <a href="{{ profile_edit_url }}" title="{% trans %}Edit profile information{% endtrans %}" class="btn btn-raised btn-default btn-floating">
      <svg class="icon-medium" aria-hidden="true">
        <title>{% trans %}Edit profile information{% endtrans %}</title>
        <use xlink:href="#icon-edit"></use>
      </svg>
    </a>
  </div>
{% endif %}

  <div class="cover-wrap">

    <header>
      {{ content.field_profile_image }}
      <h1 class="page-title">
        {{ profile_name }} {{ profile_name_extra }}
      </h1>
    </header>


  {% if (content.field_profile_function|render or content.field_profile_organization|render) or profile_contact_label == 'private_message' %}
    <footer class="hero-footer">
  {% endif %}

    <div class="hero-footer__text">
      {% if content.field_profile_function|render %}
        <strong>{{ content.field_profile_function }}</strong>
      {% endif %}
      {% if (content.field_profile_function|render and content.field_profile_organization|render) %}
      &nbsp;-&nbsp;
      {% endif %}
        {{ content.field_profile_organization }}
    </div>

    {% if profile_contact_label == 'private_message' %}
      <div class="hero-footer__cta">
        <a href="{{ profile_contact_url }}" class="btn btn-accent btn-lg btn-raised">
          {% trans %} Private message {% endtrans %}
        </a>
      </div>
    {% endif %}

  {% if (content.field_profile_function|render or content.field_profile_organization|render) or profile_contact_label == 'private_message' %}
    </footer>
  {% endif %}

    {# render other fields that developers might add #}
    {{ content|without('field_profile_first_name', 'field_profile_last_name', 'field_profile_image', 'field_profile_function', 'field_profile_organization') }}
  </div>

</div>

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

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