TabbycatDebate/tabbycat

View on GitHub
tabbycat/templates/components/item-info.html

Summary

Maintainability
Test Coverage
<div class="list-group-item {% if not nopad %}mb-3{% endif %}
            text-{% if type %}{{ type }}{% else %}info{% endif %}
            {% if not nopad %}border-{% if type %}{{ type }}{% else %}info{% endif %}{% endif %}">

  <div class="row align-items-center">

    <div class="col-auto pr-1">
      {% if icon %}
        <i data-feather="{{ icon }}"></i>
      {% elif emoji %}
        <span class="emoji">{{ emoji }}</span>
      {% else %}
        <i data-feather="info"></i>
      {% endif %}
    </div>

    <div class="col pl-0 pr-0">

      {% if extra %}
        <h5>{{ text|safe }}</h5>
        {{ extra }}
      {% else %}
        {{ text|safe }}
      {% endif %}

      {% if p1 %}
        <p class="card-text mb-0">
          {{ p1|safe }}
        </p>
      {% endif %}
      {% if p2 %}
        <p class="card-text {% if p1 %}mt-2{% endif %} mb-0">
          {{ p2|safe }}
        </p>
      {% endif %}
      {% if p3 %}
        <p class="card-text {% if p1 or p2 %}mt-2{% endif %} mb-0">
          {{ p3|safe }}
        </p>
      {% endif %}

      {% if subtext %}
        <span class="text-muted">{{ subtext }}</span>
      {% endif %}

    </div>

  </div>

</div>