{#
/**
 * @file
 * Theme override to display a taxonomy term.
 *
 * Available variables:
 * - url: URL of the current term.
 * - name: (optional) 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 classes = [
    'taxonomy-term',
    'vocabulary-' ~ term.bundle|clean_class,
    'term--view-mode-teaser'
  ]
%}
<div{{ attributes.setAttribute('id', 'taxonomy-term-' ~ term.id).addClass(classes) }}>
  <a  href="{{ url }}">
    <div class="content with-image">
    {% if content.field_mood_image|render|trim is empty %}
      <div class="with-image--placeholder"></div>
    {% else %}
      {{ content.field_mood_image }}
    {% endif %}
    {{ title_prefix }}
      <div class="taxonomy-term--tagwrapper">
        <span class="taxonomy-term--tag">{{ name }}</span>
      </div>
    {{ title_suffix }}
    </div>
  </a>
</div>
