base.html 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. {% extends "misago/base.html" %}
  2. {% load i18n %}
  3. {% block meta-extra %}
  4. <link rel="canonical" href="{{ REQUEST_PATH }}" />
  5. {% if paginator.previous > 1 %}
  6. <link rel="prev" href="{{ REQUEST_PATH }}?page={{ paginator.previous }}" />
  7. {% elif paginator.first %}
  8. <link rel="prev" href="{{ REQUEST_PATH }}" />
  9. {% endif %}
  10. {% if paginator.next %}
  11. <link rel="next" href="{{ REQUEST_PATH }}?page={{ paginator.next }}" />
  12. {% endif %}
  13. {% endblock meta-extra %}
  14. {% block content %}
  15. <div class="page page-threads page-threads-{{ list_type|default:'all' }} {% spaceless %}
  16. {% block extra-css %}{% endblock extra-css %}
  17. {% endspaceless %}">
  18. <div class="page-header-bg">
  19. {% block page-header %}
  20. {% endblock page-header %}
  21. </div>
  22. <div class="container">
  23. {% block list-container %}
  24. {% if subcategories %}
  25. <noscript>
  26. <section class="toolbar" itemscope itemtype="http://schema.org/SiteNavigationElement">
  27. <ul class="list-inline subcategories-list">
  28. {% for subcategory in subcategories %}
  29. <li>
  30. <a href="{{ subcategory.get_absolute_url }}{% if list_type != 'all' %}{{ list_type }}/{% endif %}" class="subcategory {% if subcategory.css_class %}subcategory-{{ subcategory.css_class }}{% endif %}">
  31. {{ subcategory.name }}
  32. </a>
  33. </li>
  34. {% endfor %}
  35. </ul>
  36. </section>
  37. </noscript>
  38. {% endif %}
  39. <section>
  40. <div class="threads-list ui-ready">
  41. {% block threads-list %}
  42. <ul class="list-group" itemscope itemtype="http://schema.org/ItemList">
  43. <meta itemprop="numberOfItems" content="{{ paginator.count }}">
  44. <meta itemprop="itemListOrder" content="http://schema.org/ItemListOrderDescending">
  45. {% for thread in threads %}
  46. {% block thread %}
  47. {% include "misago/threadslist/thread.html" %}
  48. {% endblock thread %}
  49. {% empty %}
  50. <li class="list-group-item empty-message">
  51. {% block list-empty-message %}
  52. {% if list_type == 'all' %}
  53. <p class="lead">
  54. {% if category.level %}
  55. {% trans "There are no threads in this category." %}
  56. {% else %}
  57. {% trans "There are no threads on this forum... yet!" %}
  58. {% endif %}
  59. </p>
  60. <p>
  61. {% trans "Why not start one yourself?" %}
  62. </p>
  63. {% else %}
  64. <p class="lead">
  65. {% trans "No threads matching specified criteria were found." %}
  66. </p>
  67. {% endif %}
  68. {% endblock list-empty-message %}
  69. </li>
  70. {% endfor %}
  71. </ul>
  72. {% endblock threads-list %}
  73. </div>
  74. <noscript>
  75. {% if paginator.pages > 1 %}
  76. <nav role="navigation" itemscope itemtype="http://schema.org/SiteNavigationElement">
  77. <ul class="pager">
  78. {% if paginator.previous > 1 %}
  79. <li class="previous">
  80. <a href="{{ REQUEST_PATH }}?page={{ paginator.previous }}" rel="prev" title="{% trans 'Previous page' %}">
  81. <span aria-hidden="true" class="material-icon">
  82. arrow_back
  83. </span>
  84. </a>
  85. </li>
  86. {% elif paginator.first %}
  87. <li class="previous">
  88. <a href="{{ REQUEST_PATH }}" rel="prev" title="{% trans 'Previous page' %}">
  89. <span aria-hidden="true" class="material-icon">
  90. arrow_back
  91. </span>
  92. </a>
  93. </li>
  94. {% endif %}
  95. {% if paginator.next %}
  96. <li class="next">
  97. <a href="{{ REQUEST_PATH }}?page={{ paginator.next }}" rel="next" title="{% trans 'Next page' %}">
  98. <span aria-hidden="true" class="material-icon">
  99. arrow_forward
  100. </span>
  101. </a>
  102. </li>
  103. {% endif %}
  104. </ul>
  105. </nav>
  106. {% endif %}
  107. </noscript>
  108. </section>
  109. {% endblock list-container %}
  110. </div>
  111. </div>
  112. {% endblock content %}