{% extends "spirit/_base.html" %}

{% load spirit_tags i18n %}

{% block title %}{% trans "Comment history" %}{% endblock %}

{% block content %}

    {# todo: add nav bar #}

    <h1 class="headline">{% trans "Comment history" %}</h1>

    <div class="comments">

        {% yt_paginator_autopaginate comments as page %}

        {% for c in page %}
            <div class="comment">

                <div class="comment-media">
                    <div class="comment-img">
                        <img class="comment-avatar" src="{% get_gravatar_url user=c.comment_fk.user size=50 %}" />
                    </div>

                    <div class="comment-body">
                        <div class="comment-info">

                            <div class="comment-username">
                                <a href="{{ c.comment_fk.user.get_absolute_url }}">{{ c.comment_fk.user.username }}</a>
                            </div>

                            <ul class="comment-date">
                                <li title="{{ c.date }}">{{ c.date|shortnaturaltime }}</li>
                            </ul>

                        </div>

                        <div class="comment-text">
                            {{ c.comment_html|safe }}
                        </div>
                    </div>
                </div>

			</div>
        {% endfor %}

    </div>

    {% render_yt_paginator page %}


    <script>

	$( document ).ready(function() {

        hljs.initHighlightingOnLoad();

	});

	</script>

{% endblock %}