{% load i18n %}
{% load rss_sanitizer %}
{% if feed and not feed.bozo %}
  <div class="list-group list-group-flush">
    {% for entry in feed.entries %}
      <div class="list-group-item px-1 py-2">
        <a href="{{ entry.link }}" class="text-body">{{ entry.title }}</a>
        <div class="text-secondary">
          {{ entry.summary|sanitize_rss }}
        </div>
      </div>
    {% empty %}
      <div class="list-group-item text-muted">{% trans "No content found" %}</div>
    {% endfor %}
  </div>
{% elif isolated_deployment %}
  <span class="text-danger">
    <i class="mdi mdi-alert"></i> {% trans "This RSS feed requires an external connection. Check the ISOLATED_DEPLOYMENT setting." %}
  </span>
{% else %}
  {# There was an error retrieving/parsing the feed #}
  <span class="text-danger">
    <i class="mdi mdi-alert"></i> {% trans "There was a problem fetching the RSS feed" %}:
  </span>
  {% if feed %}
    {{ feed.bozo_exception|escape }} ({% trans "HTTP" %} {{ feed.status }})
  {% else %}
    {{ error }}
  {% endif %}
{% endif %}