{#
/**
 * @file
 * Theme override to display a taxonomy term.
 *
 * Available variables:
 * - url: URL of the current term.
 * - name: Name of the current term.
 * - content: Items for the content of the term (fields and description).
 *   Use 'content' to print them all, or print a subset such as
 *   'content.description'. Use the following code to exclude the
 *   printing of a given child element:
 *   @code
 *   {{ content|without('description') }}
 *   @endcode
 * - attributes: HTML attributes for the wrapper.
 * - page: Flag for the full page state.
 * - term: The taxonomy term entity, including:
 *   - id: The ID of the taxonomy term.
 *   - bundle: Machine name of the current vocabulary.
 * - view_mode: View mode, e.g. 'full', 'teaser', etc.
 *
 * @see template_preprocess_taxonomy_term()
 */
#}

{% set bem_tax_block = bem_tax_block|default('vocabulary') %}
{% set bem_tax_modifiers = bem_tax_modifiers|default([])|merge([
  term.bundle|clean_class
]) %}
{% set bem_tax_extra = bem_tax_extra|default([])|merge([
  'taxonomy-term',
]) %}

<div{{ attributes.addClass(bem(bem_tax_block, bem_tax_element, bem_tax_modifiers, bem_tax_extra)).setAttribute('id', 'taxonomy-term-' ~ term.id) }}>
  {{ title_prefix }}
  {% if not page %}
    {{ include("@rocketship-theme-starter-atoms/02-text/00-headings/_heading.twig", {
      "heading_level": 2,
      "heading_url": url,
      "heading": name,
    }, with_context = false) }}
  {% endif %}
  {{ title_suffix }}
  <div class="content">
    {{ content }}
  </div>
</div>
