diff --git a/donate/static/donate/assets/css/style.css b/donate/static/donate/assets/css/style.css index a992383afdeedaaca7c965fa0fc0140795863449..4a6b97479cdbf3c9393b8f9a3de9164947c1facd 100644 --- a/donate/static/donate/assets/css/style.css +++ b/donate/static/donate/assets/css/style.css @@ -1272,6 +1272,10 @@ img.full-width { .lg\:h-max { height: max-content; } + + .lg\:w-auto { + width: auto; + } } /* END TailwindCSS-based image formatting */ diff --git a/main/migrations/0073_alter_mainhomepage_content.py b/main/migrations/0073_alter_mainhomepage_content.py index 59b71357f2be3c772e66edfaf70619f3dfb1c1e3..e38ae81e529f3f75c750025157fea6bd846c0ef3 100644 --- a/main/migrations/0073_alter_mainhomepage_content.py +++ b/main/migrations/0073_alter_mainhomepage_content.py @@ -1,22 +1,175 @@ # Generated by Django 4.1.10 on 2024-02-09 13:34 -from django.db import migrations -import main.blocks import wagtail.blocks import wagtail.fields import wagtail.images.blocks +from django.db import migrations +import main.blocks -class Migration(migrations.Migration): +class Migration(migrations.Migration): dependencies = [ - ('main', '0072_mainarticlepage_show_initial_image'), + ("main", "0072_mainarticlepage_show_initial_image"), ] operations = [ migrations.AlterField( - model_name='mainhomepage', - name='content', - field=wagtail.fields.StreamField([('carousel', wagtail.blocks.StructBlock([('desktop_line_1', wagtail.blocks.TextBlock(label='Desktop první řádek')), ('desktop_line_2', wagtail.blocks.TextBlock(label='Desktop druhý řádek')), ('mobile_line_1', wagtail.blocks.TextBlock(label='První mobilní řádek')), ('mobile_line_2', wagtail.blocks.TextBlock(label='Druhý mobilní řádek')), ('mobile_line_3', wagtail.blocks.TextBlock(label='Třetí mobilní řádek')), ('desktop_image', wagtail.images.blocks.ImageChooserBlock(label='Obrázek nahrazující animaci (desktop)', required=False)), ('mobile_image', wagtail.images.blocks.ImageChooserBlock(label='Obrázek nahrazující animaci (mobil / tablet)', required=False)), ('button_url', wagtail.blocks.URLBlock(help_text='Bez odkazu tlačítko nebude viditelné.', label='Odkaz tlačítka', required=False)), ('button_text', wagtail.blocks.CharBlock(label='Text tlačítka', 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/articles_section.html')), ('people', wagtail.blocks.StructBlock([('title_line_1', wagtail.blocks.CharBlock(label='První řádek titulku')), ('title_line_2', wagtail.blocks.CharBlock(label='Druhý řádek titulku')), ('description', wagtail.blocks.TextBlock(label='Popis')), ('list', wagtail.blocks.ListBlock(main.blocks.BoxBlock, label='Boxíky'))])), ('regions', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(help_text='Články pro regiony se načtou automaticky', label='Titulek'))])), ('boxes', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(label='Nadpis')), ('list', wagtail.blocks.ListBlock(main.blocks.BoxBlock, label='Boxíky')), ('image', wagtail.images.blocks.ImageChooserBlock(label='Obrázek pozadí', required=False))]))], blank=True, use_json_field=True, verbose_name='Hlavní obsah'), + model_name="mainhomepage", + name="content", + field=wagtail.fields.StreamField( + [ + ( + "carousel", + wagtail.blocks.StructBlock( + [ + ( + "desktop_line_1", + wagtail.blocks.TextBlock( + label="Desktop první řádek" + ), + ), + ( + "desktop_line_2", + wagtail.blocks.TextBlock( + label="Desktop druhý řádek" + ), + ), + ( + "mobile_line_1", + wagtail.blocks.TextBlock( + label="První mobilní řádek" + ), + ), + ( + "mobile_line_2", + wagtail.blocks.TextBlock( + label="Druhý mobilní řádek" + ), + ), + ( + "mobile_line_3", + wagtail.blocks.TextBlock( + label="Třetí mobilní řádek" + ), + ), + ( + "desktop_image", + wagtail.images.blocks.ImageChooserBlock( + label="Obrázek nahrazující animaci (desktop)", + required=False, + ), + ), + ( + "mobile_image", + wagtail.images.blocks.ImageChooserBlock( + label="Obrázek nahrazující animaci (mobil / tablet)", + required=False, + ), + ), + ( + "button_url", + wagtail.blocks.URLBlock( + help_text="Bez odkazu tlačítko nebude viditelné.", + label="Odkaz tlačítka", + required=False, + ), + ), + ( + "button_text", + wagtail.blocks.CharBlock( + label="Text tlačítka", 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/articles_section.html", + ), + ), + ( + "people", + wagtail.blocks.StructBlock( + [ + ( + "title_line_1", + wagtail.blocks.CharBlock( + label="První řádek titulku" + ), + ), + ( + "title_line_2", + wagtail.blocks.CharBlock( + label="Druhý řádek titulku" + ), + ), + ( + "description", + wagtail.blocks.TextBlock(label="Popis"), + ), + ( + "list", + wagtail.blocks.ListBlock( + main.blocks.BoxBlock, label="Boxíky" + ), + ), + ] + ), + ), + ( + "regions", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Články pro regiony se načtou automaticky", + label="Titulek", + ), + ) + ] + ), + ), + ( + "boxes", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Nadpis")), + ( + "list", + wagtail.blocks.ListBlock( + main.blocks.BoxBlock, label="Boxíky" + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Obrázek pozadí", required=False + ), + ), + ] + ), + ), + ], + blank=True, + use_json_field=True, + verbose_name="Hlavní obsah", + ), ), ] diff --git a/majak/settings/base.py b/majak/settings/base.py index f84429231cec45ba02a4ac4f7dbce2c9ee9059be..b790b99583379bb85390310308fa5abf066f2acb 100644 --- a/majak/settings/base.py +++ b/majak/settings/base.py @@ -265,7 +265,7 @@ WAGTAILADMIN_BASE_URL = BASE_URL # CUSTOM SETTINGS # ------------------------------------------------------------------------------ -STYLEGUIDE_URL = env.str("STYLEGUIDE_URL", "https://styleguide.pirati.cz/2.16.x") +STYLEGUIDE_URL = env.str("STYLEGUIDE_URL", "https://styleguide.pirati.cz/2.17.x") MAJAK_ENV = env.str("MAJAK_ENV", default="prod") diff --git a/shared/image_formats.py b/shared/image_formats.py index 0fb580885bb44bfd2be387b5c2d9bd66578ce3d1..0dbc0009094f4942c9a8c3d7347886b80fe78b53 100644 --- a/shared/image_formats.py +++ b/shared/image_formats.py @@ -4,11 +4,29 @@ register_image_format( Format( "tailwind_center_800", "šablona: Uprostřed (max 800px)", - "w-full mx-auto my-6 object-contain h-max lg:h-max", + "w-full mx-auto my-6 object-contain h-max lg:h-max lg:w-auto", "max-800x800", ) ) +register_image_format( + Format( + "tailwind_center_400", + "šablona: Uprostřed (max 400px)", + "w-full mx-auto my-6 object-contain h-max lg:h-max lg:w-auto", + "max-400x400", + ) +) + +register_image_format( + Format( + "tailwind_center_200", + "šablona: Uprostřed (max 200px)", + "w-full mx-auto my-6 object-contain h-max lg:h-max lg:w-auto", + "max-200x200", + ) +) + register_image_format( Format( "tailwind_left_400",