-{% extends '2022/base_real.html' %}
+{% extends '2022/base.html' %}
+{% load catalogue_tags %}
{% load choose_cites from social_tags %}
-{% block global-content %}
- <div class="l-container">
- <div class="l-breadcrumb">
- <a href="/"><span>Strona główna</span></a>
- <a href="/katalog/"><span>Katalog</span></a>
- <a href="/katalog/autor/"><span>Autor</span></a>
+
+{% block breadcrumbs %}
+ <a href="/katalog/"><span>Katalog</span></a>
+ {% if tags %}
+ <a href="{{ tags.0.get_absolute_catalogue_url }}"><span>{{ tags.0.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>
+ {% endif %}
+ <h1>
+ {% if tags %}
+ {{ tags.0.name }}
+ {% else %}
+ {{ title }}
+ {% endif %}
+ </h1>
</div>
</div>
- <main class="l-main">
+ <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 forloop.counter > 1 %}
+ <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 class="l-section">
- <div class="l-author__header">
- {% if tags.0.photo %}
- <figure>
- <img src="{{ tags.0.photo.url }}" alt="{{ tags.0.name }}">
- </figure>
- {% endif %}
- <h1>{{ tags.0.name }}</h1>
+ </span>
+ </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 class="l-author with-filter">
- <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="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>
- <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>
+ {% 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 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=tags.0 %}
{% include 'catalogue/2022/author_box.html' %}
{% endwith %}
{% choose_cites 3 author=tags.0 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_box.html" %}
+ </div>
+ {% endfor %}
+ </div>
</div>
</div>
- </div>
{% endif %}
</div>
</section>
- </main>
+ {% endif %}
{% endblock %}