From f3bccff688a7f5a9eb619dbed3f726ef2c07c402 Mon Sep 17 00:00:00 2001 From: Leon Sandøy Date: Tue, 1 Feb 2022 20:54:39 +0100 Subject: Refactor as_css_class to 'to_kebabcase'. We're making a few changes here - Changing the name to 'to_kebabcase' - Covering all edge cases - Adding a unit test for this utility --- pydis_site/templates/resources/resource_box.html | 10 +++++----- pydis_site/templates/resources/resources.html | 22 +++++++++++----------- 2 files changed, 16 insertions(+), 16 deletions(-) (limited to 'pydis_site/templates') diff --git a/pydis_site/templates/resources/resource_box.html b/pydis_site/templates/resources/resource_box.html index 2ec233cb..e26203e9 100644 --- a/pydis_site/templates/resources/resource_box.html +++ b/pydis_site/templates/resources/resource_box.html @@ -1,5 +1,5 @@ {% load as_icon %} -{% load as_css_class %} +{% load to_kebabcase %} {% load get_category_icon %}
@@ -38,7 +38,7 @@ {{ tag|title }} @@ -48,7 +48,7 @@ {{ tag|title }} @@ -58,7 +58,7 @@ {{ tag|title }} @@ -68,7 +68,7 @@ {{ tag|title }} diff --git a/pydis_site/templates/resources/resources.html b/pydis_site/templates/resources/resources.html index c221c8a3..70fad097 100644 --- a/pydis_site/templates/resources/resources.html +++ b/pydis_site/templates/resources/resources.html @@ -1,6 +1,6 @@ {% extends 'base/base.html' %} {% load as_icon %} -{% load as_css_class %} +{% load to_kebabcase %} {% load get_category_icon %} {% load static %} @@ -44,8 +44,8 @@ {% if filter_name == "Difficulty" %} {{ filter_item|title }} @@ -55,8 +55,8 @@ {% if filter_name == "Type" %} {{ filter_item|title }} @@ -66,8 +66,8 @@ {% if filter_name == "Payment tiers" %} {{ filter_item|title }} @@ -77,8 +77,8 @@ {% if filter_name == "Topics" %} {{ filter_item|title }} @@ -127,8 +127,8 @@ {{ filter_item }} -- cgit v1.2.3