{% load static %}
{% load i18n %}
{% load admin_url %}
{% load mastodon %}
{% load oauth_token %}
{% load truncate %}
{% load highlight %}
{% load thumb %}
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>{{ site_name }} - {{ item.title }}{% trans '的评论' %}</title>
  {% include "common_libs.html" with jquery=0 %}
</head>

<body>
  <div id="page-wrapper">
    <div id="content-wrapper">
      {% include "partial/_navbar.html" %}
      <section id="content">
        <div class="grid">
          <div class="grid__main" id="main">
            <div class="main-section-wrapper">
              <div class="entity-reviews">
                <h5 class="entity-reviews__title entity-reviews__title--stand-alone">
                  <a href="{{ item.url }}">{{ item.title }}</a>{% trans ' 的评论' %}
                </h5>
                <ul class="entity-reviews__review-list">

                  {% for review in reviews %}
                  <li class="entity-reviews__review entity-reviews__review--wider">
                    <a href="{% url 'journal:user_profile' review.owner.mastodon_username %}" class="entity-reviews__owner-link">{{ review.owner.username }}</a>
                    {% if review.visibility > 0 %}
                    <span class="icon-lock"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M17,8.48h-.73V6.27a6.27,6.27,0,1,0-12.53,0V8.48H3a.67.67,0,0,0-.67.67V19.33A.67.67,0,0,0,3,20H17a.67.67,0,0,0,.67-.67V9.15A.67.67,0,0,0,17,8.48ZM6.42,6.27h0a3.57,3.57,0,0,1,7.14,0h0V8.48H6.42Z"/></svg></span>
                    {% endif %}
                    <span class="entity-reviews__review-time">{{ review.edited_time }}</span>
                    <span class="entity-reviews__review-title"><a href="{% url 'journal:review_retrieve' review.uuid %}">{{ review.title }}</a></span>
                  </li>
                  {% empty %}
                  <div>{% trans '无结果' %}</div>
                  {% endfor %}

                </ul>
              </div>
              <div class="pagination">

                {% if reviews.pagination.has_prev %}
                <a href="?page=1" class="pagination__nav-link pagination__nav-link">&laquo;</a>
                <a href="?page={{ reviews.previous_page_number }}"
                class="pagination__nav-link pagination__nav-link--right-margin pagination__nav-link">&lsaquo;</a>
                {% endif %}

                {% for page in reviews.pagination.page_range %}

                {% if page == reviews.pagination.current_page %}
                <a href="?page={{ page }}" class="pagination__page-link pagination__page-link--current">{{ page }}</a>
                {% else %}
                <a href="?page={{ page }}" class="pagination__page-link">{{ page }}</a>
                {% endif %}

                {% endfor %}

                {% if reviews.pagination.has_next %}
                <a href="?page={{ reviews.next_page_number }}"
                class="pagination__nav-link pagination__nav-link--left-margin">&rsaquo;</a>
                <a href="?page={{ reviews.pagination.last_page }}" class="pagination__nav-link">&raquo;</a>
                {% endif %}

              </div>
            </div>
          </div>

          <div class="grid__aside" id="aside">
            {% include "sidebar_item.html" %}
          </div>
        </section>
      </div>
      {% include "partial/_footer.html" %}
    </div>



    <script>

    </script>
  </body>


  </html>
