From 22bd62896c5a2b7d4fd70031b4dd690fda45bfb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomi=20Valentov=C3=A1?= <git@imaniti.org> Date: Wed, 17 Jul 2024 16:51:56 +0200 Subject: [PATCH] fix profile images --- shared/templates/styleguide2/contact_page.html | 16 +++++++++------- .../candidates/candidate_secondary_box.html | 7 ++++--- .../includes/molecules/popouts/popout_point.html | 7 ++++--- 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/shared/templates/styleguide2/contact_page.html b/shared/templates/styleguide2/contact_page.html index 578388f4..d87b68b1 100644 --- a/shared/templates/styleguide2/contact_page.html +++ b/shared/templates/styleguide2/contact_page.html @@ -54,15 +54,17 @@ <div class="grid grid-cols-1 xl:grid-cols-2 gap-4 mb-16"> {% for contact_person in page.contact_people %} - {% with contact_person.specific.get_profile_image as profile_image %} - - {% if profile_image %} - {% image profile_image fill-256x256 as contact_box_image %} - {% endif %} - {% firstof contact_person.value.position conact_person.value.person.position as contact_position %} - {% include 'styleguide2/includes/molecules/contact/contact_person_large_box.html' with image=contact_box_image name=contact_person.value.person.title function=contact_position telephone=contact_person.value.person.phone mail=contact_person.value.person.email url=contact_person.value.person.url %} + {% with contact_person.value.person.specific.get_profile_image as profile_image %} + {% if profile_image %} + {% image profile_image fill-256x256 as contact_box_image %} + + {% include 'styleguide2/includes/molecules/contact/contact_person_large_box.html' with image=contact_box_image name=contact_person.value.person.title function=contact_position telephone=contact_person.value.person.phone mail=contact_person.value.person.email url=contact_person.value.person.url %} + {% else %} + {% include 'styleguide2/includes/molecules/contact/contact_person_large_box.html' with name=contact_person.value.person.title function=contact_position telephone=contact_person.value.person.phone mail=contact_person.value.person.email url=contact_person.value.person.url %} + {% endif %} + {% endwith %} {% endfor %} </div> {% endif %} diff --git a/shared/templates/styleguide2/includes/molecules/candidates/candidate_secondary_box.html b/shared/templates/styleguide2/includes/molecules/candidates/candidate_secondary_box.html index b0cf7297..c57d3ee6 100644 --- a/shared/templates/styleguide2/includes/molecules/candidates/candidate_secondary_box.html +++ b/shared/templates/styleguide2/includes/molecules/candidates/candidate_secondary_box.html @@ -17,9 +17,10 @@ " > {% with self.page.specific.get_profile_image as profile_image %} - {% if profile_image %} - {% image profile_image fill-150x150 class="object-cover w-12 shrink-0 grow-1" %} - {% endif %} + {% if profile_image %} + {% image profile_image fill-150x150 class="object-cover w-12 shrink-0 grow-1" %} + {% endif %} + {% endwith %} </div> <div diff --git a/shared/templates/styleguide2/includes/molecules/popouts/popout_point.html b/shared/templates/styleguide2/includes/molecules/popouts/popout_point.html index a9648929..7194a3f3 100644 --- a/shared/templates/styleguide2/includes/molecules/popouts/popout_point.html +++ b/shared/templates/styleguide2/includes/molecules/popouts/popout_point.html @@ -21,9 +21,10 @@ {% with self.page.specific.get_profile_image as profile_image %} - {% if profile_image %} - {% image profile_image fill-150x150 class="w-10 h-10 opacity-75 m-0 p-0 rounded-full" %} - {% endif %} + {% if profile_image %} + {% image profile_image fill-150x150 class="w-10 h-10 opacity-75 m-0 p-0 rounded-full" %} + {% endif %} + {% endwith %} <strong> <a href="{{ guarantor_page.url }}"> -- GitLab