From fc79424aa49743548e278a5094e3ba18994317d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0t=C4=9Bp=C3=A1n=20Farka?= <mail@stepanfarka.cz> Date: Fri, 18 Nov 2022 10:06:13 +0100 Subject: [PATCH] [ADD] linebreaksbr to header carousel & HomePageCarouseSlideBlock Charblock -> Textblock --- main/blocks.py | 4 ++-- main/templates/main/blocks/homepage_carousel_block.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/main/blocks.py b/main/blocks.py index 4a567c12..acf8ff94 100644 --- a/main/blocks.py +++ b/main/blocks.py @@ -44,8 +44,8 @@ class BoxesBlock(StructBlock): class HomePageCarouseSlideBlock(CTAMixin, StructBlock): image = ImageChooserBlock(label="Hlavní obrázek jednoho slidu carouselu") - line_1 = CharBlock(label="První řádek") - line_2 = CharBlock(label="Druhý řádek") + line_1 = TextBlock(label="První řádek") + line_2 = TextBlock(label="Druhý řádek") class Meta: icon = "form" diff --git a/main/templates/main/blocks/homepage_carousel_block.html b/main/templates/main/blocks/homepage_carousel_block.html index 892e042c..f7e827ae 100644 --- a/main/templates/main/blocks/homepage_carousel_block.html +++ b/main/templates/main/blocks/homepage_carousel_block.html @@ -8,8 +8,8 @@ <img src="{{ slide_img.url }}" draggable="false"> <div class="header-carousel--text grid-container"> <div class="h-fit"> - <h1 class="text-white">{{ slide.line_1 }}</h1>{# TODO SEO <h1><span><span> #} - <h1 class="text-yellow-500 mb-2">{{ slide.line_2 }}</h1> + <h1 class="text-white">{{ slide.line_1|linebreaksbr }}</h1>{# TODO SEO <h1><span><span> #} + <h1 class="text-yellow-500 mb-2">{{ slide.line_2|linebreaksbr }}</h1> {% include 'main/includes/href_button.html' with btn_link=slide.button_link btn_text=slide.button_text extra_classes="btn-carousel" %} </div> </div> -- GitLab