From cbd58fd2dc3301b02cbe673835a1701e42fba06c Mon Sep 17 00:00:00 2001 From: Stephan Kerkman Date: Mon, 1 Jun 2026 17:26:14 +0200 Subject: [PATCH] =?UTF-8?q?feat:=20restyle=20plant=5Flist=20with=20Tailwin?= =?UTF-8?q?d=20=E2=80=94=20search,=20filter=20chips,=20plant=20cards?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plants/partials/plant_list_results.html | 41 ++++++----- plants/templates/plants/plant_list.html | 72 ++++++++++++------- plants/views/plants.py | 1 + 3 files changed, 71 insertions(+), 43 deletions(-) diff --git a/plants/templates/plants/partials/plant_list_results.html b/plants/templates/plants/partials/plant_list_results.html index 898e049..7ef6375 100644 --- a/plants/templates/plants/partials/plant_list_results.html +++ b/plants/templates/plants/partials/plant_list_results.html @@ -1,23 +1,26 @@ +{# plants/templates/plants/partials/plant_list_results.html #} {% for plant in plants %} - -
-
- {% if plant.species and plant.species.api_image_url %} - - {% elif plant.thumbnail_url %} - - {% else %} -
🌿
- {% endif %} -
-
{{ plant.name }}
- - {{ plant.location }} - -
-
-
+
+ {% if plant.species and plant.species.api_image_url %} + + {% elif plant.thumbnail_url %} + + {% else %} +
🌿
+ {% endif %} +
+
{{ plant.name }}
+ {% if plant.location %} + + {{ plant.location.name }} + + {% endif %} +
+
{% empty %} -

No plants found.

+

No plants found.

{% endfor %} diff --git a/plants/templates/plants/plant_list.html b/plants/templates/plants/plant_list.html index 7bd399e..599a058 100644 --- a/plants/templates/plants/plant_list.html +++ b/plants/templates/plants/plant_list.html @@ -1,34 +1,58 @@ +{# plants/templates/plants/plant_list.html #} {% extends "plants/base.html" %} {% block title %}Plants — BloomBase{% endblock %} {% block content %} -
- + Add a plant -
-
+ +
+ + +
+

All Plants

+ + +
+ + +
+ + + -
+
-
-
- All - {% for loc in locations %} - {{ loc.name }} - {% endfor %} -
- ⚙️ -
+ +
+ + All + + {% for loc in locations %} + + {{ loc.name }} + + {% endfor %} +
-
+ +
{% include "plants/partials/plant_list_results.html" %} +
+
{% endblock %} diff --git a/plants/views/plants.py b/plants/views/plants.py index 8569e3f..1931250 100644 --- a/plants/views/plants.py +++ b/plants/views/plants.py @@ -27,6 +27,7 @@ def plant_list(request): 'plants': qs, 'q': q, 'location_filter': location_filter, 'locations': locations, + 'active_tab': 'garden', })