Cleanup
[wolnelektury.git] / src / search / templates / search / results.html
index 189d095..dbcf1c0 100644 (file)
@@ -1,4 +1,4 @@
-{% extends "2022/base.html" %}
+{% extends "base.html" %}
 
 
 {% block main %}
     {% endif %}
 
     {% if results.author %}
-    <div class="l-container">
-      <h2 class="header">Autorzy</h2>
-      <ul class="c-search-result c-search-result-author">
-        {% for tag in results.author %}
-          <li>
-            <a href="{{ tag.get_absolute_url }}">
-              {% if tag.photo %}
-                <figure>
-                  <img src="{{ tag.photo.url }}">
-                </figure>
-              {% endif %}
-              {{ tag.name }}
-            </a>
-          </li>
-        {% endfor %}
-      </ul>
-    </div>
+      <div class="l-container">
+        <h2 class="header">Autorzy</h2>
+        <ul class="c-search-result c-search-result-author">
+          {% for tag in results.author %}
+            <li>
+              <a href="{{ tag.get_absolute_url }}">
+                {% if tag.photo %}
+                  <figure>
+                    <img src="{{ tag.photo.url }}">
+                  </figure>
+                {% endif %}
+                {{ tag.name }}
+              </a>
+            </li>
+          {% endfor %}
+        </ul>
+      </div>
     {% endif %}
 
     {% if results.theme %}
       </div>
     {% endif %}
 
+    {% if results.genre %}
+      <div class="l-container">
+        <h2 class="header">Gatunki</h2>
+        <ul class="c-search-result">
+          {% for tag in results.genre %}
+            <li>
+              <a href="{{ tag.get_absolute_url }}">
+                {% if tag.photo %}
+                  <figure>
+                    <img src="{{ tag.photo.url }}">
+                  </figure>
+                {% endif %}
+                {{ tag.name }}
+              </a>
+            </li>
+          {% endfor %}
+        </ul>
+      </div>
+    {% endif %}
+
     {% if results.book %}
       <div class="l-container">
         <h2 class="header">Książki</h2>
       <div class="l-section l-section--col">
         <div class="l-books__grid">
           {% for book in results.book %}
-            {% include 'catalogue/2022/book_box.html' %}
+            {% include 'catalogue/book_box.html' %}
           {% endfor %}
         </div>
       </div>
       <div class="l-section l-section--col">
         <div class="l-books__grid">
           {% for book in results.art %}
-            {% include 'catalogue/2022/book_box.html' %}
+            {% include 'catalogue/book_box.html' %}
           {% endfor %}
         </div>
       </div>
         <h2 class="header">Kolekcje</h2>
         <div class="c-search-result-collection">
           {% for collection in results.collection %}
-            {% include 'catalogue/2022/collection_box.html' %}
-            {% include 'catalogue/2022/collection_box.html' %}
+            {% include 'catalogue/collection_box.html' %}
           {% endfor %}
         </div>
       </div>