2022-12-31 17:16:47 -05:00
{% load static %}
{% load i18n %}
{% load l10n %}
{% load humanize %}
{% load mastodon %}
2023-07-12 01:11:15 -04:00
{% load duration %}
2022-12-31 17:16:47 -05:00
{% load thumb %}
2025-02-06 19:17:53 +00:00
{% get_current_language as LANGUAGE_CODE %}
2022-12-31 17:16:47 -05:00
<!DOCTYPE html>
2025-02-06 19:17:53 +00:00
< html lang = "{{ LANGUAGE_CODE }}" class = "classic-page nav-page-search" >
2023-05-20 11:01:18 -04:00
< head >
2022-12-31 17:16:47 -05:00
< meta charset = "UTF-8" >
< meta name = "viewport" content = "width=device-width, initial-scale=1.0" >
2024-05-20 23:17:47 -04:00
< title > {{ site_name }} - {{ request.GET.q }} - {% trans 'Search Results' %}< / title >
2024-01-07 17:24:34 -05:00
{% include "common_libs.html" %}
2023-05-20 11:01:18 -04:00
< / head >
< body >
{% include '_header.html' %}
< main >
< div class = "grid__main" >
2023-05-22 23:12:09 -04:00
< div >
< div >
2023-05-20 11:01:18 -04:00
{% if request.GET.q %}
2024-12-30 01:51:19 -05:00
{% include "search_header.html" %}
2023-05-20 11:01:18 -04:00
{% endif %}
{% if request.GET.tag %}
2024-05-19 16:32:59 -04:00
< h5 > {% trans 'tag' %}: “{{ request.GET.tag }}”< / h5 >
2023-05-20 11:01:18 -04:00
{% endif %}
2023-05-22 23:12:09 -04:00
< div class = "item-card-list" >
2023-05-20 11:01:18 -04:00
{% for item in items %}
2025-01-01 11:47:13 -05:00
{% include '_list_item.html' %}
2023-05-20 11:01:18 -04:00
{% empty %}
2023-07-10 15:29:29 -04:00
< p >
2024-05-20 23:17:47 -04:00
{% trans "No items matching your search query." %}
{% if request.user.is_authenticated %}
{% trans "System will search other websites and instances, click title of the item to save them locally. " %}
{% endif %}
2023-07-10 15:29:29 -04:00
< / p >
< p >
2024-05-20 23:17:47 -04:00
{% blocktrans %}If you have URL from one of these sites, please put the full URL (e.g. < code > https://www.imdb.com/title/tt2513074/< / code > ) to the search box and press Enter.{% endblocktrans %}
2023-07-10 15:29:29 -04:00
{% for site in sites %}
2024-05-22 23:38:17 -04:00
{% trans site %}
2023-07-10 15:29:29 -04:00
{% if not forloop.last %}/{% endif %}
{% endfor %}
< / p >
2023-05-20 11:01:18 -04:00
{% endfor %}
2023-06-08 19:21:02 -04:00
< / div >
{% if dup_items %}
< p class = "empty" >
2024-11-16 14:33:51 -05:00
{% blocktrans with dups=dup_items|length %} {{ dups }} items are from the same work or have the same identifier, they are hidden from the search results, < a _ = "on click toggle .unfold on #dup" > click here to show them.< / a > {% endblocktrans %}
2023-06-08 19:21:02 -04:00
< / p >
2023-06-08 19:57:10 -04:00
< div class = "item-card-list folded" id = "dup" >
2023-06-08 19:21:02 -04:00
{% for item in dup_items %}
2025-01-01 11:47:13 -05:00
{% include '_list_item.html' %}
2023-06-08 19:21:02 -04:00
{% endfor %}
< / div >
{% endif %}
< div class = "item-card-list" >
2023-08-13 23:11:12 -04:00
{% if request.GET.q and request.user.is_authenticated %}
2024-05-19 16:32:59 -04:00
< p hx-get = "{% url 'catalog:external_search' %}?q={{ request.GET.q }}&c={{ request.GET.c }}&page={% if pagination.current_page %}{{ pagination.current_page }}{% else %}1{% endif %}"
2023-05-22 23:12:09 -04:00
hx-trigger="load"
hx-swap="outerHTML">
2023-05-20 11:01:18 -04:00
< span > < i class = "fa-solid fa-compact-disc fa-spin loading" > < / i > < / span >
2024-05-19 16:32:59 -04:00
{% trans 'Searching from other sites' %}
2023-05-22 23:12:09 -04:00
< / p >
2023-07-10 15:29:29 -04:00
{% else %}
2024-05-19 16:32:59 -04:00
{% trans "Logged in user may see search results from other sites." %}
2023-05-20 11:01:18 -04:00
{% endif %}
2023-05-22 23:12:09 -04:00
< / div >
2023-05-20 11:01:18 -04:00
< / div >
< div class = "pagination" >
{% if pagination.has_prev %}
2023-07-12 01:11:15 -04:00
< a href = "?page=1&{% if request.GET.q %}q={{ request.GET.q }}{% elif request.GET.tag %}tag={{ request.GET.tag }}{% endif %}{% if request.GET.c %}&c={{ request.GET.c }}{% endif %}"
2023-05-20 11:01:18 -04:00
class="pagination__nav-link pagination__nav-link">« < / a >
2023-07-12 01:11:15 -04:00
< a href = "?page={{ pagination.previous_page }}&{% if request.GET.q %}q={{ request.GET.q }}{% elif request.GET.tag %}tag={{ request.GET.tag }}{% endif %}{% if request.GET.c %}&c={{ request.GET.c }}{% endif %}"
2023-05-20 11:01:18 -04:00
class="pagination__nav-link pagination__nav-link--right-margin pagination__nav-link">‹ < / a >
{% endif %}
{% for page in pagination.page_range %}
{% if page == pagination.current_page %}
2023-07-12 01:11:15 -04:00
< a href = "?page={{ page }}&{% if request.GET.q %}q={{ request.GET.q }}{% elif request.GET.tag %}tag={{ request.GET.tag }}{% endif %}{% if request.GET.c %}&c={{ request.GET.c }}{% endif %}"
2023-05-20 11:01:18 -04:00
class="pagination__page-link pagination__page-link--current">{{ page }}< / a >
{% else %}
2023-07-12 01:11:15 -04:00
< a href = "?page={{ page }}&{% if request.GET.q %}q={{ request.GET.q }}{% elif request.GET.tag %}tag={{ request.GET.tag }}{% endif %}{% if request.GET.c %}&c={{ request.GET.c }}{% endif %}"
2023-05-20 11:01:18 -04:00
class="pagination__page-link">{{ page }}< / a >
{% endif %}
{% endfor %}
{% if pagination.has_next %}
2023-07-12 01:11:15 -04:00
< a href = "?page={{ pagination.next_page }}&{% if request.GET.q %}q={{ request.GET.q }}{% elif request.GET.tag %}tag={{ request.GET.tag }}{% endif %}{% if request.GET.c %}&c={{ request.GET.c }}{% endif %}"
2023-05-20 11:01:18 -04:00
class="pagination__nav-link pagination__nav-link--left-margin">› < / a >
2023-07-12 01:11:15 -04:00
< a href = "?page={{ pagination.last_page }}&{% if request.GET.q %}q={{ request.GET.q }}{% elif request.GET.tag %}tag={{ request.GET.tag }}{% endif %}{% if request.GET.c %}&c={{ request.GET.c }}{% endif %}"
2023-05-20 11:01:18 -04:00
class="pagination__nav-link">» < / a >
{% endif %}
< / div >
2022-12-31 17:16:47 -05:00
< / div >
2023-05-20 11:01:18 -04:00
< / div >
2023-06-09 02:45:27 -04:00
< aside class = "grid__aside bottom" >
{% include "_sidebar_search.html" %}
< / aside >
2023-05-20 11:01:18 -04:00
< / main >
2023-06-09 03:01:17 -04:00
{% include '_footer.html' %}
2023-05-20 11:01:18 -04:00
< / body >
2022-12-31 17:16:47 -05:00
< / html >