From 11cca3d513bb7122792bdd63c6575275e8dc8b8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Valenta?= <tomas@imaniti.org> Date: Tue, 20 Feb 2024 12:02:58 +0100 Subject: [PATCH] make line breaks manual --- main/blocks.py | 2 +- .../0076_alter_mainresultspage_content.py | 21 +++++++++++++++++++ .../molecules/boxes/flip_card_box.html | 4 +--- 3 files changed, 23 insertions(+), 4 deletions(-) create mode 100644 main/migrations/0076_alter_mainresultspage_content.py diff --git a/main/blocks.py b/main/blocks.py index 8eb96ff3..d3ec6128 100644 --- a/main/blocks.py +++ b/main/blocks.py @@ -323,7 +323,7 @@ class TeamBlock(StructBlock): class FlipCardBlock(StructBlock): image = ImageChooserBlock(label="Obrázek") - title = CharBlock(label="Nadpis") + title = TextBlock(label="Nadpis", help_text="Řádkování je manuální.") content = RichTextBlock(label="Obsah") diff --git a/main/migrations/0076_alter_mainresultspage_content.py b/main/migrations/0076_alter_mainresultspage_content.py new file mode 100644 index 00000000..f21f4925 --- /dev/null +++ b/main/migrations/0076_alter_mainresultspage_content.py @@ -0,0 +1,21 @@ +# Generated by Django 4.1.10 on 2024-02-20 11:01 + +from django.db import migrations +import wagtail.blocks +import wagtail.fields +import wagtail.images.blocks + + +class Migration(migrations.Migration): + + dependencies = [ + ('main', '0075_alter_mainresultspage_content'), + ] + + operations = [ + migrations.AlterField( + model_name='mainresultspage', + name='content', + field=wagtail.fields.StreamField([('flip_cards', wagtail.blocks.StructBlock([('cards', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(label='Obrázek')), ('title', wagtail.blocks.TextBlock(help_text='Řádkování je manuální.', label='Nadpis')), ('content', wagtail.blocks.RichTextBlock(label='Obsah')), ('button_text', wagtail.blocks.CharBlock(help_text='Pokud není vyplněn, tlačítko se neukáže.', label='Nadpis tlačítka', required=False)), ('button_url', wagtail.blocks.CharBlock(label='Odkaz tlačítka', required=False))], label='Karta'), label='Karty'))])), ('text', wagtail.blocks.RichTextBlock(template='styleguide2/includes/atoms/text/prose_richtext.html'))], blank=True, use_json_field=True, verbose_name='Obsah'), + ), + ] diff --git a/shared/templates/styleguide2/includes/molecules/boxes/flip_card_box.html b/shared/templates/styleguide2/includes/molecules/boxes/flip_card_box.html index d64b2dc7..d8955ad9 100644 --- a/shared/templates/styleguide2/includes/molecules/boxes/flip_card_box.html +++ b/shared/templates/styleguide2/includes/molecules/boxes/flip_card_box.html @@ -19,9 +19,7 @@ ></div> <h1 - class=" - font-alt text-5xl whitespace-pre-line absolute top-10 left-10 max-w-[60%] - " + class="font-alt text-5xl whitespace-pre-line absolute top-10 left-10" >{{ self.title }}</h1> </div> </div> -- GitLab