diff --git a/src/open_inwoner/components/templates/components/Card/CardContainer.html b/src/open_inwoner/components/templates/components/Card/CardContainer.html index 97b77f043c..0e2a8fbf13 100644 --- a/src/open_inwoner/components/templates/components/Card/CardContainer.html +++ b/src/open_inwoner/components/templates/components/Card/CardContainer.html @@ -4,31 +4,35 @@ {% for category in categories %} {% url 'products:category_detail' slug=category.slug as category_url %} {% if category.icon %} - {% card src=category.icon.file.url alt=category.icon.name title=category.name href=category_url compact=True image_object_fit=image_object_fit %} + {% include "components/Card/Card.html" with alt=category.icon.name title=category.name href=category_url compact=True image_object_fit=image_object_fit %} {% else %} - {% card src=category.image.file.url alt=category.image.name title=category.name href=category_url compact=True image_object_fit=image_object_fit %} + {% include "components/Card/Card.html" with src=category.image.file.url alt=category.image.name title=category.name href=category_url compact=True image_object_fit=image_object_fit %} {% endif %} {% endfor %} {% endif %} {% if subcategories %} {% for subcategory in subcategories %} - {% category_card category=subcategory parent_category=parent_category compact=True image_object_fit=image_object_fit %} + {% include "components/Card/CategoryCard.html" with category=subcategory parent_category=parent_category compact=True image_object_fit=image_object_fit %} {% endfor %} {% endif %} {% if products %} {% for product in products %} {% get_product_url product as product_url %} - {% product_card title=product.name description=product.summary url=product_url image=product.icon compact=True image_object_fit=image_object_fit %} + {% include "components/Card/ProductCard.html" with title=product.name description=product.summary url=product_url image=product.icon compact=True image_object_fit=image_object_fit %} {% endfor %} {% endif %} {% if plans %} {% for plan in plans %} - {% description_card title=plan.title description=plan.goal|truncatechars:51 url=plan.get_absolute_url elypsis=True object=plan compact=True image_object_fit=image_object_fit %} + {% include "components/Card/DescriptionCard.html" with title=plan.title description=plan.goal|truncatechars:51 url=plan.get_absolute_url elypsis=True object=plan compact=True image_object_fit=image_object_fit %} {% endfor %} {% endif %} - {{ contents }} + {% if locations %} + {% for location in locations %} + {% include "components/Card/LocationCard.html" with location_name=location.name compact=True phonenumber=location.phonenumber email=location.email %} + {% endfor %} + {% endif %} diff --git a/src/open_inwoner/components/templates/components/Card/LocationCard.html b/src/open_inwoner/components/templates/components/Card/LocationCard.html new file mode 100644 index 0000000000..1754c3223a --- /dev/null +++ b/src/open_inwoner/components/templates/components/Card/LocationCard.html @@ -0,0 +1,16 @@ +{% load link_tags string_tags %} +
{{ location.address_line_1 }}
+{{ location.address_line_2 }}
+ {% if phonenumber %} + {% link href='tel:'|addstr:phonenumber secondary=True text=phonenumber %} + {% endif %} + {% if email %} + {% link href='mailto:'|addstr:email secondary=True text=email %} + {% endif %} +{{configurable_text.home_page.home_theme_intro|linebreaksbr}}
- {% card_container categories=categories columns=4 image_object_fit="cover" %} + {% include "components/Card/CardContainer.html" with categories=categories columns=4 image_object_fit="cover" %} {% endif %} diff --git a/src/open_inwoner/templates/pages/category/detail.html b/src/open_inwoner/templates/pages/category/detail.html index 6d325fd7c7..a8e9317338 100644 --- a/src/open_inwoner/templates/pages/category/detail.html +++ b/src/open_inwoner/templates/pages/category/detail.html @@ -20,12 +20,12 @@{{configurable_text.theme_page.theme_intro|linebreaksbr}}
- {% card_container categories=object_list %} + {% include "components/Card/CardContainer.html" with categories=object_list %} {% endblock content %} diff --git a/src/open_inwoner/templates/pages/home.html b/src/open_inwoner/templates/pages/home.html index 9ae30e6fc5..0a14a13a41 100644 --- a/src/open_inwoner/templates/pages/home.html +++ b/src/open_inwoner/templates/pages/home.html @@ -25,9 +25,9 @@{{configurable_text.home_page.home_theme_intro|linebreaksbr}}
{% if request.user.is_authenticated %} - {% card_container categories=categories columns=4 image_object_fit="cover" %} + {% include "components/Card/CardContainer.html" with categories=categories columns=4 image_object_fit="cover" %} {% else %} - {% card_container categories=categories image_object_fit="cover" %} + {% include "components/Card/CardContainer.html" with categories=categories image_object_fit="cover" %} {% endif %} {% if questionnaire_roots.exists %} diff --git a/src/open_inwoner/templates/pages/plans/list.html b/src/open_inwoner/templates/pages/plans/list.html index 12b9b261a3..2d84594b1d 100644 --- a/src/open_inwoner/templates/pages/plans/list.html +++ b/src/open_inwoner/templates/pages/plans/list.html @@ -65,7 +65,7 @@{{ location.address_line_1 }}
-{{ location.address_line_2 }}
- {% if phonenumber %} - {% link href='tel:'|addstr:phonenumber secondary=True text=phonenumber %} - {% endif %} - {% if email %} - {% link href='mailto:'|addstr:email secondary=True text=email %} - {% endif %} -