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

3:2 image sizing

parent 30c34ebd
No related branches found
No related tags found
2 merge requests!899Release,!8873:2 image sizing, fix URL
Pipeline #16318 passed
......@@ -87,8 +87,6 @@ class CandidateSecondaryListBlock(StructBlock):
class ProgramCategoryItemBlock(StructBlock):
number = IntegerBlock(label="Číslo")
content = TextBlock(label="Obsah")
class Meta:
......
# Generated by Django 4.1.10 on 2024-01-18 10:09
from django.db import migrations
import wagtail.blocks
import wagtail.fields
import wagtail.images.blocks
class Migration(migrations.Migration):
dependencies = [
('elections', '0009_remove_electionscandidatepage_related_candidates_and_more'),
]
operations = [
migrations.AlterField(
model_name='electionshomepage',
name='content',
field=wagtail.fields.StreamField([('carousel', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(label='Obrázek na pozadí'))])), ('candidates', wagtail.blocks.StructBlock([('candidates', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('page', wagtail.blocks.PageChooserBlock(label='Stránka', page_type=['elections.ElectionsCandidatePage'])), ('image', wagtail.images.blocks.ImageChooserBlock(help_text='Pokud není vybrán, použije se obrázek ze stránky kandidáta', label='Obrázek', required=False)), ('description', wagtail.blocks.TextBlock(label='Popis'))]), label='Kandidáti'))])), ('secondary_candidates', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(label='Nadpis')), ('candidates', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('number', wagtail.blocks.CharBlock(label='Číslo')), ('page', wagtail.blocks.PageChooserBlock(label='Stránka', page_type=['elections.ElectionsCandidatePage'])), ('image', wagtail.images.blocks.ImageChooserBlock(help_text='Pokud není vybrán, použije se obrázek ze stránky kandidáta', label='Obrázek', required=False))]), label='Kandidáti'))])), ('program', wagtail.blocks.StructBlock([('categories', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('number', wagtail.blocks.IntegerBlock(label='Číslo')), ('name', wagtail.blocks.CharBlock(label='Název')), ('points', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('content', wagtail.blocks.TextBlock(label='Obsah'))]), label='Body'))]), label='Kategorie')), ('long_version_url', wagtail.blocks.URLBlock(help_text='Pro zobrazení odkazu na celou verzi programu musí být obě následující pole vyplněná.', label='Odkaz na celou verzi programu', required=False)), ('long_version_text', wagtail.blocks.CharBlock(label='Nadpis odkazu na celou verzi programu', required=False))])), ('news', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(help_text='Nejnovější články se načtou automaticky', label='Titulek')), ('description', wagtail.blocks.TextBlock(label='Popis'))], template='styleguide2/includes/organisms/articles/elections/articles_section.html'))], blank=True, use_json_field=True, verbose_name='Hlavní obsah'),
),
]
This diff is collapsed.
This diff is collapsed.
......@@ -12,7 +12,7 @@
<img
src="{{ image.url }}"
class="w-full object-cover object-center h-[20rem]"
class="w-full object-cover object-center h-[27rem]"
>
</a>
......
......@@ -6,7 +6,7 @@
"
>
<a href="{{ url }}">
<img src="{{ image.url }}" alt="{{ header }}" draggable="false" class="w-full h-80 object-cover">
<img src="{{ image.url }}" alt="{{ header }}" draggable="false" class="w-full h-[17rem] object-cover">
</a>
<div class="p-6 bg-white text-black {{ description_classes }} h-full flex flex-col justify-between">
<div class="mb-6">
......
......@@ -16,7 +16,6 @@
points: [
{% for point in category.points %}
{
number: '{{ point.number }}',
content: '{{ point.content|rawtext }}'
}{% if not forloop.last %},{% endif %}
{% endfor %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment