{% extends '2022/base.html' %}
+{% load catalogue_tags %}
{% load choose_cites from social_tags %}
{% block breadcrumbs %}
<a href="/katalog/"><span>Katalog</span></a>
- <a href="/katalog/autor/"><span>Autor</span></a>
+ {% if tags %}
+ <a href="{{ main_tag.get_absolute_catalogue_url }}"><span>{{ main_tag.get_category_display|title }}</span></a>
+ {% endif %}
{% endblock %}
{% block main %}
- <div class="l-section">
- <div class="l-author__header">
- {% if tags.0.photo %}
- <figure>
- <img src="{{ tags.0.photo.url }}" alt="{{ tags.0.name }}">
- </figure>
+ <div class="l-section">
+ <div class="l-author__header">
+ {% if main_tag.photo %}
+ <figure>
+ <img src="{{ main_tag.photo.url }}" alt="{{ main_tag.name }}">
+ </figure>
+ {% endif %}
+ <h1>
+ {% if main_tag %}
+ {{ main_tag.name }}
+ {% else %}
+ {{ title }}
{% endif %}
- <h1>{{ tags.0.name }}</h1>
- </div>
+ </h1>
</div>
+ </div>
- <div class="l-section">
- <div class="l-books__header">
- <div class="l-books__input">
- <i class="icon icon-filter"></i>
- <input type="text" placeholder="filtry, tytuł" class="quick-filter" data-for="book-list">
+ <div class="l-section">
+ <div class="l-books__header">
+ <div class="l-books__input">
+ <i class="icon icon-filter"></i>
+ <input type="text" placeholder="filtry, tytuł" class="quick-filter" data-for="book-list" data-filters="with-filter">
+ <div class="filter-container">
+ {% for tag in tags %}
+ {% if tag is not main_tag %}
+ <span class="filter filter-category-{{ tag.category }}">
+ <a href="{% catalogue_url list_type tag %}">{{ tag }}</a>
+ <a href="{% catalogue_url list_type tags -tag %}">✖</a>
+ </span>
+ {% endif %}
+ {% endfor %}
+ </div>
+
+ </div>
+ <div class="l-books__sorting">
+ <span>Sortuj:</span>
+ <div>
+ <button data-order="data-pop">najpopularniejsze</button>
+ <button class="is-active">alfabetycznie</button>
+ <!--button>chronologicznie</button-->
</div>
- <div class="l-books__sorting">
- <span>Sortuj:</span>
- <div>
- <button data-order="data-pop">najpopularniejsze</button>
- <button class="is-active">alfabetycznie</button>
- <!--button>chronologicznie</button-->
- </div>
- </div>
</div>
</div>
+ </div>
+ <div class="with-filter">
- <div class="l-section l-section--col">
- <div class="l-books__grid" id="book-list">
- {% for book in object_list %}
- {% include "catalogue/2022/book_box.html" %}
- {% endfor %}
- </div>
+ <div class="row">
+ <h2>{% nice_title_from_tags tags categories %}</h2>
+ {% if suggest %}
+ <div class="filter-container">
+ {% for tag in suggest %}
+ <span class="filter filter-category-{{ tag.category }}">
+ <a href="{% catalogue_url list_type tags tag %}">{{ tag }}</a>
+ </span>
+ {% endfor %}
+ </div>
+ {% endif %}
+ </div>
+ </div>
+
+ <div class="l-section l-section--col">
+ <div class="l-books__grid" id="book-list">
+ {% for book in object_list %}
+ {% include "catalogue/2022/book_box.html" %}
+ {% endfor %}
</div>
+ </div>
+ {% if tags %}
<section class="l-section">
<div class="l-author">
- {% with author=tags.0 %}
+ {% with tag=main_tag %}
{% include 'catalogue/2022/author_box.html' %}
{% endwith %}
- {% choose_cites 3 author=tags.0 as cites %}
+ {% choose_cites 3 author=main_tag as cites %}
{% if cites %}
- <div class="row">
- <div class="l-author__quotes">
- <div class="l-author__quotes__slider">
+ <div class="row">
+ <div class="l-author__quotes">
+ <div class="l-author__quotes__slider">
- {% for fragment in cites %}
- <div class="l-author__quotes__slider__item">
- {% include "catalogue/2022/fragment_box.html" %}
- </div>
- {% endfor %}
+ {% for fragment in cites %}
+ <div class="l-author__quotes__slider__item">
+ {% include "catalogue/2022/fragment_slider_box.html" %}
+ </div>
+ {% endfor %}
+ </div>
</div>
</div>
- </div>
{% endif %}
</div>
</section>
+ {% endif %}
{% endblock %}