Skip to content
Snippets Groups Projects
Commit 613d8216 authored by Tomi Valentová's avatar Tomi Valentová
Browse files

fix image alignment

parent 80cecf6b
No related branches found
No related tags found
2 merge requests!1049Release,!1048Fix image alignment
Pipeline #19020 passed
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -15,6 +15,7 @@ DEFAULT_CONTENT_BLOCKS = [
("two_columns_text", ColumnsTextBlock()),
("headline", HeadlineBlock()),
("headline_with_picture", PictureHeadlineBlock()),
("picture_list", PictureListBlock()),
(
"table",
TableBlock(
......
......@@ -21,7 +21,9 @@ class ColorBlock(blocks.StructBlock):
context = super().get_context(value, parent_context=parent_context)
if "css_class" not in context:
context["css_class"] = []
context["css_class"] += COLOR_CSS[value["color"]]
# If the CSS class has been removed at some point, just add no classes.
context["css_class"] += COLOR_CSS.get(value["color"], "")
return context
......
......@@ -55,12 +55,9 @@ COLOR_CHOICES = (
# TODO
COLOR_CSS = {
BLACK_ON_WHITE: ["text-black", "bg-white"],
BLACK_ON_YELLOW: ["text-black", "bg-pirati-yellow"],
WHITE_ON_BLACK: ["text-white", "bg-black"],
WHITE_ON_BLUE: ["text-white", "bg-blue-300"],
WHITE_ON_CYAN: ["text-white", "bg-cyan-300"],
WHITE_ON_VIOLET: ["text-white", "bg-violet-300"],
BLACK_ON_WHITE: ["text-black", "[&_p]:!text-black", "bg-white"],
BLACK_ON_YELLOW: ["text-black", "[&_p]:!text-black", "bg-pirati-yellow"],
WHITE_ON_BLACK: ["text-white", "[&_p]:!text-white", "bg-black"],
}
ALIGN_CHOICES = (
......
Source diff could not be displayed: it is too large. Options to address this: view the blob.
This diff is collapsed.
Source diff could not be displayed: it is too large. Options to address this: view the blob.
......@@ -51,12 +51,6 @@ from .forms import UniwebHomePageAdminForm
CONTENT_STREAM_BLOCKS = DEFAULT_CONTENT_BLOCKS + [
("calendar", CalendarBlock()),
(
"news_block",
NewsBlock(
template="styleguide2/includes/organisms/articles/district/articles_section.html"
),
),
]
......@@ -84,7 +78,16 @@ class UniwebHomePage(
)
content = StreamField(
CONTENT_STREAM_BLOCKS + [("newsletter", NewsletterSubscriptionBlock())],
CONTENT_STREAM_BLOCKS + [
("newsletter", NewsletterSubscriptionBlock()),
(
"news_block",
NewsBlock(
template="styleguide2/includes/organisms/articles/district/articles_section.html",
group="3. Ostatní"
),
),
],
verbose_name="obsah stránky",
blank=True,
use_json_field=True,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment