<div class="card">
  <div class="card-content">
    {% if media_view and media.src is not empty %}
      <div class="card-media">
        <div class="image">
          {% block media %}
            {% if url %}
              <a href="{{ url }}">
                <img src="{{ media.src }}" alt="{{ media.alt }}">
              </a>
            {% else %}
              <img src="{{ media.src }}" alt="{{ media.alt }}">
            {% endif %}
          {% endblock %}
        </div>
      </div>
    {% endif %}

    <div class="card-text">
      {% if url is not empty %}
        <{{ heading_level }}><a href="{{ url }}">{{ heading_text }}</a></{{ heading_level }}>
      {% else %}
        <{{ heading_level }}>{{ heading_text }}</{{ heading_level }}>
      {% endif %}

      {% if text is not empty %}
        <p>{{ text }}</p>
      {% endif %}
    </div>
  </div>
</div>
