{% load spirit_tags i18n %}

<div class="comments_list">
  {% for c in comments %}
    <div class="comments_list__comment no-footer">
      <div class="comment__img">
        <img
          alt=""
          class="comment__img__avatar"
          src="{% get_gravatar_url user=c.user size=50 %}" />
      </div>
      <div class="comment__info">
        <div class="comment__info__username">
          <a
            class="comment__info__username__link"
            href="{{ c.user.st.get_absolute_url }}"
          ><span>{{ c.user.st.nickname }}</span>
            {% if c.user.pk == c.topic.user_id %}
              <i class="fa fa-microphone is-owner"></i>
            {% endif %}
          </a>
          <div class="comment__info__username__realname">
            {{ c.user.get_full_name }}
          </div>
        </div>
        {% spaceless %}
          <ul class="comment__info__date">
            <li class="comment__info__date__topic"><a href="{{ c.get_absolute_url }}"
            ><i class="fa fa-comments"></i> {{ c.topic.title }}</a></li>
            <li title="{{ c.date }}">{{ c.date|shortnaturaltime }}</li>
          </ul>
        {% endspaceless %}
      </div>
      <div class="comment__text">
        {% post_render_comment comment=c %}
      </div>
    </div>
    {% empty %}
    <p>{% trans "There are no comments here, yet" %}</p>
  {% endfor %}
</div>

<script>
  document.addEventListener('DOMContentLoaded', function() {
    hljs.initHighlightingOnLoad();
  });
</script>
