diff --git a/plants/templates/plants/dashboard.html b/plants/templates/plants/dashboard.html index 4ed1d93..6b9f12d 100644 --- a/plants/templates/plants/dashboard.html +++ b/plants/templates/plants/dashboard.html @@ -1,71 +1,95 @@ +{# plants/templates/plants/dashboard.html #} {% extends "plants/base.html" %} {% load plant_extras %} -{% block title %}Dashboard โ€” BloomBase{% endblock %} +{% block title %}BloomBase{% endblock %} {% block content %} -
{{ today|date:"F Y" }}
-
-
- -
-
-
{{ total_plants }}
-
Plants
-
-
-
-
-
-
-
-
{{ blooming_now_count }}
-
Blooming now
-
-
-
+ +
+ +
-{% if blooming_now %} -
-
๐ŸŒธ Blooming this month
- -
-{% endif %} +
-{% if latest_plants %} - -{% endif %} + +

Hello, Plant Lover! ๐ŸŒฟ

+

+ What are we growing today? +

+

+ Identify a plant and add it to Bloombase. +

+ + + + +
+ +
+
+
+
+ +
+
+ + + +
+
+
+
+ + + + ๐Ÿชด +
+
My Garden
+
+ {{ total_plants }} Plant{{ total_plants|pluralize }} ยท {{ location_count }} Area{{ location_count|pluralize }} +
+
+ โ€บ +
+ + + {% if latest_plants %} +

๐ŸŒฟ Recently added

+ + {% endif %} - {% endblock %} diff --git a/plants/views/dashboard.py b/plants/views/dashboard.py index 81a6917..b198928 100644 --- a/plants/views/dashboard.py +++ b/plants/views/dashboard.py @@ -1,6 +1,7 @@ +# plants/views/dashboard.py from datetime import date from django.shortcuts import render -from plants.models import Plant +from plants.models import Plant, Location def dashboard(request): @@ -8,6 +9,7 @@ def dashboard(request): all_plants = list(Plant.objects.select_related('species').all()) blooming_now = [p for p in all_plants if today.month in (p.bloom_months or [])] latest_plants = Plant.objects.select_related('species', 'location').prefetch_related('photos').order_by('-pk')[:6] + location_count = Location.objects.count() return render(request, 'plants/dashboard.html', { 'total_plants': len(all_plants), @@ -15,4 +17,6 @@ def dashboard(request): 'blooming_now_count': len(blooming_now), 'today': today, 'latest_plants': latest_plants, + 'location_count': location_count, + 'active_tab': 'home', })