aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBobby <[email protected]>2024-09-06 00:14:53 -0400
committerBobby <[email protected]>2024-09-06 00:14:53 -0400
commit8aa601d5d7a8fa37ec3b905e0b94790f7e6ac191 (patch)
treecfab7fd654456832f40f1ce1df028212dedf4752
parentc88caf1fd4b56e01330a6e250bc63f4b305ef531 (diff)
downloadyugen-8aa601d5d7a8fa37ec3b905e0b94790f7e6ac191.tar.xz
yugen-8aa601d5d7a8fa37ec3b905e0b94790f7e6ac191.zip
search page fixes
-rw-r--r--templates/home/search.html14
-rw-r--r--templates/partials/datacard_render.html2
-rw-r--r--templates/partials/datacardcompact_render.html2
-rw-r--r--templates/partials/datacardwide_render.html2
4 files changed, 10 insertions, 10 deletions
diff --git a/templates/home/search.html b/templates/home/search.html
index 2f8bbdf..c735b3c 100644
--- a/templates/home/search.html
+++ b/templates/home/search.html
@@ -195,11 +195,11 @@
</section>
<section id="results" class="flex flex-wrap justify-center my-4 max-w-full">
{% if user.preferences.card_layout == 'classic' %}
- {% include "partials/datacard_render.html" with data=results %}
+ {% include "partials/datacard_render.html" with data=results all=True %}
{% elif user.preferences.card_layout == 'wide' %}
- {% include "partials/datacardwide_render.html" with data=results %}
+ {% include "partials/datacardwide_render.html" with data=results all=True %}
{% elif user.preferences.card_layout == 'compact' %}
- {% include "partials/datacardcompact_render.html" with data=results %}
+ {% include "partials/datacardcompact_render.html" with data=results all=True %}
{% endif %}
</section>
<section class="flex justify-center items-center my-8">
@@ -515,10 +515,10 @@
function performSearch() {
const searchValue = searchInput.value;
const selectedGenres = genreMultiselect.getSelectedValues();
- const selectedYear = yearDropdown.getValue();
- const selectedSeason = seasonsDropdown.getValue();
- const selectedType = typeDropdown.getValue();
- const selectedStatus = statusDropdown.getValue();
+ const selectedYear = yearDropdown.getValue() !== 'All Years' ? yearDropdown.getValue() : null;
+ const selectedSeason = seasonsDropdown.getValue() !== 'All Seasons' ? seasonsDropdown.getValue() : null;
+ const selectedType = typeDropdown.getValue() !== 'All Formats' ? typeDropdown.getValue() : null;
+ const selectedStatus = statusDropdown.getValue() !== 'All Statuses' ? statusDropdown.getValue() : null;
const selectedSort = sortMultiselect.getSelectedValues();
// Implement your search logic here
diff --git a/templates/partials/datacard_render.html b/templates/partials/datacard_render.html
index 81a5d34..309a523 100644
--- a/templates/partials/datacard_render.html
+++ b/templates/partials/datacard_render.html
@@ -1,5 +1,5 @@
{% for anime in data %}
-{% if not anime.status == "Not yet aired"%}
+{% if not anime.status == "Not yet aired" or all %}
<a href="{% url "watch:watch" anime.id %}" class="w-1/2 md:w-1/3 lg:w-1/4 xl:w-1/5 2xl:w-1/6 text-gray-500 p-1 sm:p-2 mb-4 hover:text-white flex flex-col anime-item opacity-0">
<div class="relative pt-[140%]">
<img src="{{ anime.image }}" alt="{{ anime.title.english }}" class="absolute top-0 left-0 w-full h-full rounded-lg object-cover"/>
diff --git a/templates/partials/datacardcompact_render.html b/templates/partials/datacardcompact_render.html
index 3a2e297..6303623 100644
--- a/templates/partials/datacardcompact_render.html
+++ b/templates/partials/datacardcompact_render.html
@@ -1,5 +1,5 @@
{% for anime in data %}
-{% if not anime.status == "Not yet aired"%}
+{% if not anime.status == "Not yet aired" or all %}
<div class="w-full max-w-full px-2 mb-2 anime-item">
<a href="{% url 'watch:watch' anime.id %}">
<div class="flex flex-row bg-neutral-950 rounded hover:bg-{{ user.preferences.accent_colour }}-600 hover:bg-opacity-30 p-2 gap-4 items-center">
diff --git a/templates/partials/datacardwide_render.html b/templates/partials/datacardwide_render.html
index 7b022cf..15e0ff9 100644
--- a/templates/partials/datacardwide_render.html
+++ b/templates/partials/datacardwide_render.html
@@ -1,6 +1,6 @@
{% load custom_filters %}
{% for anime in data %}
-{% if not anime.status == "Not yet aired"%}
+{% if not anime.status == "Not yet aired" or all %}
<div class="w-full lg:w-1/2 px-2 mb-2 anime-item">
<div class="flex flex-row w-full bg-neutral-950 rounded hover:bg-{{ user.preferences.accent_colour }}-600 hover:bg-opacity-30 p-2 gap-4">
<div class="flex flex-col gap-2 min-w-32">