Skip to content
Snippets Groups Projects
Commit eced4a34 authored by Tomi Valentová's avatar Tomi Valentová
Browse files

fix profile images in templates

parent 53891b6b
No related branches found
No related tags found
2 merge requests!1063Test,!1062alignment, scroll progress, fallback images
Pipeline #19092 passed
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
<div class="grid grid-cols-1 xl:grid-cols-2 gap-4 mb-16"> <div class="grid grid-cols-1 xl:grid-cols-2 gap-4 mb-16">
{% for contact_person in page.contact_people %} {% for contact_person in page.contact_people %}
{% with contact_person.get_profile_image as profile_image %} {% with contact_person.specific.get_profile_image as profile_image %}
{% if profile_image %} {% if profile_image %}
{% image profile_image fill-256x256 as contact_box_image %} {% image profile_image fill-256x256 as contact_box_image %}
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
flex font-bold justify-center items-center rounded-full w-12 shrink-0 grow-1 flex font-bold justify-center items-center rounded-full w-12 shrink-0 grow-1
" "
> >
{% with self.page.get_profile_image as profile_image %} {% with self.page.specific.get_profile_image as profile_image %}
{% if profile_image %} {% if profile_image %}
{% image profile_image fill-150x150 class="object-cover w-12 shrink-0 grow-1" %} {% image profile_image fill-150x150 class="object-cover w-12 shrink-0 grow-1" %}
{% endif %} {% endif %}
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
{% for contact_details in self.contact_list %} {% for contact_details in self.contact_list %}
<div class="grid grid-cols-1 xl:grid-cols-2 gap-4"> <div class="grid grid-cols-1 xl:grid-cols-2 gap-4">
{% with contact_details.person as person_page %} {% with contact_details.person as person_page %}
{% image person_page.get_profile_image fill-256x256 as contact_box_image %} {% image person_page.specific.get_profile_image fill-256x256 as contact_box_image %}
{% include 'styleguide2/includes/molecules/contact/contact_person_large_box.html' with image=contact_box_image name=person_page.title function=person_page.position %} {% include 'styleguide2/includes/molecules/contact/contact_person_large_box.html' with image=contact_box_image name=person_page.title function=person_page.position %}
{% endwith %} {% endwith %}
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
Garant programového bodu: Garant programového bodu:
</div> </div>
{% with self.page.get_profile_image as profile_image %} {% with self.page.specific.get_profile_image as profile_image %}
{% if profile_image %} {% if profile_image %}
{% image profile_image fill-150x150 class="w-10 h-10 opacity-75 m-0 p-0 rounded-full" %} {% image profile_image fill-150x150 class="w-10 h-10 opacity-75 m-0 p-0 rounded-full" %}
......
...@@ -5,14 +5,14 @@ ...@@ -5,14 +5,14 @@
<div class="grid grid-cols-1 gap-4 md:grid-cols-2 w-full my-8"> <div class="grid grid-cols-1 gap-4 md:grid-cols-2 w-full my-8">
{% if self.person_list %} {% if self.person_list %}
{% for person_page in self.person_list %} {% for person_page in self.person_list %}
{% image person_page.get_profile_image fill-480x480 as profile_image %} {% image person_page.specific.get_profile_image fill-480x480 as profile_image %}
{% include 'styleguide2/includes/molecules/contact/contact_person_large_box.html' with image=profile_image name=person_page.title function=person_page.position telephone=person_page.phone mail=person_page.email url=person_page.url %} {% include 'styleguide2/includes/molecules/contact/contact_person_large_box.html' with image=profile_image name=person_page.title function=person_page.position telephone=person_page.phone mail=person_page.email url=person_page.url %}
{% endfor %} {% endfor %}
{% elif self.person_list_with_custom_positions %} {% elif self.person_list_with_custom_positions %}
{% for person in self.person_list_with_custom_positions %} {% for person in self.person_list_with_custom_positions %}
{% with person.page as person_page %} {% with person.page as person_page %}
{% image person_page.get_profile_image fill-480x480 as profile_image %} {% image person_page.specific.get_profile_image fill-480x480 as profile_image %}
{% firstof person.position person_page.position as position %} {% firstof person.position person_page.position as position %}
{% include 'styleguide2/includes/molecules/contact/contact_person_large_box.html' with image=profile_image name=person_page.title function=position telephone=person_page.phone mail=person_page.email url=person_page.url %} {% include 'styleguide2/includes/molecules/contact/contact_person_large_box.html' with image=profile_image name=person_page.title function=position telephone=person_page.phone mail=person_page.email url=person_page.url %}
......
{% load wagtailimages_tags %} {% load wagtailimages_tags %}
{% image main_image max-1920x1080 as background_image %} {% image main_image fill-1920x1080 as background_image %}
{% image profile_image max-500x500 as processed_profile_image %} {% image profile_image fill-500x500 as processed_profile_image %}
<header <header
class=" class="
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
<div class="flex flex-col gap-12"> <div class="flex flex-col gap-12">
{% if page.root_page.footer_person_list %} {% if page.root_page.footer_person_list %}
{% for person in page.root_page.footer_person_list %} {% for person in page.root_page.footer_person_list %}
{% image person.value.person.get_profile_image fill-256x256 as person_profile_image %} {% image person.value.person.specific.get_profile_image fill-256x256 as person_profile_image %}
{% firstof person.value.position person.value.person.position as position %} {% firstof person.value.position person.value.person.position as position %}
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
<template v-if="isCurrentView('{{ block.value.slug }}-{{ forloop.counter }}')"> <template v-if="isCurrentView('{{ block.value.slug }}-{{ forloop.counter }}')">
{% if block.value.person_list|length %} {% if block.value.person_list|length %}
{% for person_page in block.value.person_list %} {% for person_page in block.value.person_list %}
{% image person_page.get_profile_image fill-480x480 as profile_image %} {% image person_page.specific.get_profile_image fill-480x480 as profile_image %}
{% include 'styleguide2/includes/molecules/contact/contact_person_large_box.html' with image=profile_image name=person_page.title function=person_page.position telephone=person_page.phone mail=person_page.email url=person_page.url %} {% include 'styleguide2/includes/molecules/contact/contact_person_large_box.html' with image=profile_image name=person_page.title function=person_page.position telephone=person_page.phone mail=person_page.email url=person_page.url %}
{% endfor %} {% endfor %}
...@@ -44,7 +44,8 @@ ...@@ -44,7 +44,8 @@
{% if block.value.person_list_with_custom_positions|length %} {% if block.value.person_list_with_custom_positions|length %}
{% for person in block.value.person_list_with_custom_positions %} {% for person in block.value.person_list_with_custom_positions %}
{% with person.page as person_page %} {% with person.page as person_page %}
{% image person_page.get_profile_image fill-480x480 as profile_image %} {% image person_page.specific.get_profile_image fill-480x480 as profile_image %}
{% firstof person.position person_page.position as position %} {% firstof person.position person_page.position as position %}
{% include 'styleguide2/includes/molecules/contact/contact_person_large_box.html' with image=profile_image name=person_page.title function=position telephone=person_page.phone mail=person_page.email url=person_page.url %} {% include 'styleguide2/includes/molecules/contact/contact_person_large_box.html' with image=profile_image name=person_page.title function=position telephone=person_page.phone mail=person_page.email url=person_page.url %}
......
...@@ -132,7 +132,7 @@ ...@@ -132,7 +132,7 @@
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 content-stretch gap-8"> <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 content-stretch gap-8">
{% for person in page.related_people %} {% for person in page.related_people %}
{% with person.value as person %} {% with person.value as person %}
{% image person.get_profile_image fill-500x500 as profile_image %} {% image person.specific.get_profile_image fill-500x500 as profile_image %}
{% include 'styleguide2/includes/molecules/boxes/card_box.html' with image=profile_image url=person.url header=person.title content=person.position description_classes='!bg-grey-180' %} {% include 'styleguide2/includes/molecules/boxes/card_box.html' with image=profile_image url=person.url header=person.title content=person.position description_classes='!bg-grey-180' %}
{% endwith %} {% endwith %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment