diff options
author | Matthew Lemon <y@yulqen.org> | 2024-07-11 17:20:29 +0100 |
---|---|---|
committer | Matthew Lemon <y@yulqen.org> | 2024-07-11 17:20:29 +0100 |
commit | 8547f307748554990ee3cc413776c7dadc830764 (patch) | |
tree | be9d05ae6d9c8f4d792923f68d6719b1b64be166 /pyblackbird_cc/templates | |
parent | 375aec43a2badc5eef86d528745908cb2f572bb7 (diff) |
Adds ability to add colour class to main category
- Creates a new line in the database
- Uses this in the template instead of the default bootstrap class
Diffstat (limited to 'pyblackbird_cc/templates')
-rw-r--r-- | pyblackbird_cc/templates/resources/resource_list.html | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pyblackbird_cc/templates/resources/resource_list.html b/pyblackbird_cc/templates/resources/resource_list.html index d33d6bc..13d2a61 100644 --- a/pyblackbird_cc/templates/resources/resource_list.html +++ b/pyblackbird_cc/templates/resources/resource_list.html @@ -53,7 +53,7 @@ <h5 class="card-title"><a href="{% url 'resources:resource_detail' resource_id=resource.id %}">{{ resource.name }}</a></h5> <div class="d-flex flex-row justify-content-start align-content-center"> <div> - <span class="badge bg-danger me-2">{{ resource.main_resource_category_name }}</span> + <span class="badge {{ resource.main_resource_category.colour_css_class }} me-2">{{ resource.main_resource_category_name }}</span> </div> <div> <span class="badge bg-secondary me-2">{{ resource.age_range }}</span> @@ -101,7 +101,7 @@ <h5 class="card-title"><a href="{% url 'resources:resource_detail' resource_id=resource.id %}">{{ resource.name }}</a></h5> <div class="d-flex flex-row justify-content-start align-content-center"> <div> - <span class="badge bg-danger me-2">{{ resource.main_resource_category_name }}</span> + <span class="badge {{ resource.main_resource_category_colour_css_class }} me-2">{{ resource.main_resource_category_name }}</span> </div> <div> <span class="badge bg-secondary me-2">{{ resource.age_range }}</span> |