{#
/**
 * @file
 * Theme override for page titles.
 *
 * Available variables:
 * - title_attributes: HTML attributes for the page title element.
 * - title_prefix: Additional output populated by modules, intended to be
 *   displayed in front of the main title tag that appears in the template.
 * - title: The page title, for use in the actual content.
 * - title_suffix: Additional output populated by modules, intended to be
 *   displayed after the main title tag that appears in the template.

 * - author_name
 * - created_date
 * - created_date_formatted
 * - topic_type
 * - hero_node
 */
#}
{{ attach_library('socialbase/hero')}}

{% if hero_styled_image_url %}
  <div style="background-image: url('{{ hero_styled_image_url }}')" class="cover cover-img cover-img-gradient">
{% else %}
  <div class="cover">
{% endif %}

  {% if node %}
    {% if node_edit_url %}
      <div class="hero-action-button">
        <a href="{{ node_edit_url }}" title="{% trans %}Edit content{% endtrans %}" class="waves-effect waves-light btn btn-raised btn-default btn-floating">
          <svg class="icon-gray icon-medium">
            <use xlink:href="#icon-edit"></use>
          </svg>
        </a>
      </div>
    {% endif %}
  <div class="cover-wrap">
  {% endif %}

  <header class="page-title">
    <p>{{ title_prefix }}</p>
    {% if title %}
      <h1{{ title_attributes }}>{{ title }}</h1>
    {% endif %}
    <p>{{ title_suffix }}</p>
  </header>

  {% if event_enrollment %}
    <div class="hero-footer">
      <div class="row row-md-center">
        <div class="col-xs-12 col-md-3 col-md-offset-9">
            <div class="btn-group">
              {{ event_enrollment }}
            </div>
        </div>
      </div>
    </div>
  {% endif %}

  {% if node %}
    </div>
  {% endif %}

</div>
