add betongGray as background color option and default for featured block

This commit is contained in:
2024-06-27 01:51:08 +02:00
parent 473b39410f
commit d4399d03d3
13 changed files with 282 additions and 2 deletions
+4 -2
View File
@@ -101,6 +101,7 @@ class FeaturedBlock(blocks.StructBlock):
)
COLOR_CHOICES = (
("betongGray", "Betonggrå"),
("deepBrick", "Dyp tegl"),
("neufPink", "Griserosa"),
("goldenOrange", "Gyllen oransje"),
@@ -120,7 +121,8 @@ class FeaturedBlock(blocks.StructBlock):
)
background_color = blocks.ChoiceBlock(
label="Bakgrunnsfarge",
required=False,
required=True,
default="betongGray",
choices=COLOR_CHOICES,
)
image_position = blocks.ChoiceBlock(
@@ -145,7 +147,7 @@ class FeaturedBlock(blocks.StructBlock):
GraphQLString("link_text", required=True),
GraphQLString("image_position", required=True),
GraphQLImage("featured_image_override"),
GraphQLString("background_color", required=False),
GraphQLString("background_color", required=True),
GraphQLPage("featured_page", required=True),
]