{% extends "blog/base.html" %}

{% block title %}
  <title>loopvid blog tags list</title>
{% endblock %}

{% block page %}
  <div class="page">
    <div class="tag_list">
      {% for tag_pair in tag_pairs %}
        {% if tag_pair[1] > 0 %}
          {# link to tag page #}
          <a class="tag_link" href="/blog/tag/{{ tag_pair[0] | e }}">{{ tag_pair[0] | e }}</a>
          {# number of videos with this tag #}
          <span class="small">
            ({{ tag_pair[1] }} {% if tag_pair[1] > 1 %}videos{% else %}video{% endif %})
          </span>
          <br />
        {% endif %}
      {% endfor %}
    {% if not tag_pairs %}
      <p class="no_videos_message">Sorry, but we couldn't find what you were looking for. :(</p>
    {% endif %}
    </div>
  </div>
{% endblock %}
