Skip to content
Snippets Groups Projects
Commit f44c325b authored by Tomáš Valenta's avatar Tomáš Valenta
Browse files

auto-resize images

parent c0e4a67e
No related branches found
No related tags found
2 merge requests!899Release,!897Auto-resize images, show initial image
Pipeline #16379 passed
......@@ -9,7 +9,7 @@
lg:mx-8 lg:my-4 lg:w-2/5
"
>
{% image image original as side_image %}
{% image image max-512x512 as side_image %}
<img
class="my-0"
......
......@@ -10,7 +10,7 @@
lg:min-w-[24rem]
"
>
{% image candidate_page.image original as candidate_image %}
{% image candidate_page.image max-512x512 as candidate_image %}
<img
class="w-3/5"
......
......@@ -6,9 +6,9 @@
>
{% for candidate in self.candidates %}
{% if candidate.image %}
{% image candidate.image original as resized_candidate_image %}
{% image candidate.image max-756x756 as resized_candidate_image %}
{% else %}
{% image candidate.page.image original as resized_candidate_image %}
{% image candidate.page.image max-756x756 as resized_candidate_image %}
{% endif %}
{% include "styleguide2/includes/molecules/candidates/elections/candidate_primary_box.html" with name=candidate.page.title position=candidate.page.position description=candidate.description url=candidate.page.url candidate_image=resized_candidate_image %}
......
......@@ -10,9 +10,9 @@
name: '{{ candidate.page.title }}',
{% if candidate.image %}
{% image candidate.image original as resized_candidate_image %}
{% image candidate.image max-756x756 as resized_candidate_image %}
{% else %}
{% image candidate.page.image original as resized_candidate_image %}
{% image candidate.page.image max-756x756 as resized_candidate_image %}
{% endif %}
imageSource: '{{ resized_candidate_image.url }}',
......
......@@ -63,9 +63,9 @@
</div>
{% if self.image %}
{% image self.image original as person_image %}
{% image self.image max-512x512 as person_image %}
{% else %}
{% image self.person_page.image original as person_image %}
{% image self.person_page.image max-512x512 as person_image %}
{% endif %}
<img
......
......@@ -77,7 +77,7 @@
flex justify-center items-start grow w-full
"
>
{% image image original as person_image %}
{% image image max-756x756 as person_image %}
<img
class="lg:w-3/5"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment