diff --git a/uniweb/models.py b/uniweb/models.py index ecc8812a472a09d4cebe9a8c961230b67e18c215..9d86e9c80428e28845e6cbac51a7b08bea1881f9 100644 --- a/uniweb/models.py +++ b/uniweb/models.py @@ -99,7 +99,10 @@ class AdvancedTitleBlock(ColorBlock, AlignBlock): class PictureTitleBlock(ColorBlock): title = blocks.CharBlock(label="nadpis") - image = ImageChooserBlock(label="obrázek") + picture = ImageChooserBlock( + label="obrázek", + help_text="rozmÄ›r na výšku 75px nebo vĂce (obrázek bude zmenšen na výšku 75px)", + ) class Meta: label = "nadpis (s obrázkem)" diff --git a/uniweb/templates/uniweb/blocks/picture_title.html b/uniweb/templates/uniweb/blocks/picture_title.html new file mode 100644 index 0000000000000000000000000000000000000000..863e5ef8877c68325c9c4c7efdd928998e28abc8 --- /dev/null +++ b/uniweb/templates/uniweb/blocks/picture_title.html @@ -0,0 +1,5 @@ +{% load wagtailimages_tags %} +<h1 class="head-alt-md md:head-alt-lg px-4 pt-4 pb-2 lg:mt-16 clearfix {{ css_class|join:" " }}"> + {% image block.value.picture height-75 class="float-right mb-2" %} + {{ block.value.title }} +</h1>