Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Kl 2021 05 pm block clean #1521

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion apps/cms/blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class Meta:
icon = 'view'


# 2-col, headline, text, CTA btn, background colors, text colors
# 2-col, headline, text, CTA btn, image, list
class ColumnsImageCTABlock(blocks.StructBlock):
columns_count = blocks.ChoiceBlock(choices=[
(1, 'One column'),
Expand All @@ -45,6 +45,16 @@ class Meta:
icon = 'list-ul'


class TwoColImageCTABlock(blocks.StructBlock):
column1_img = CallToActionBlock(label='CTA column')
column2_img = ImageCTABlock(label='Wide image CTA column')

class Meta:
template = 'a4_candy_cms_pages/blocks/col_img_cta_block.html'
icon = 'list-ul'


# 2-col, headline, text, CTA btn, background colors, text colors
class ColBackgroundCTABlock(blocks.StructBlock):
columns_count = blocks.ChoiceBlock(choices=[
(1, 'One column'),
Expand All @@ -61,6 +71,15 @@ class Meta:
icon = 'tick-inverse'


class TwoColBackgroundCTABlock(blocks.StructBlock):
column1_bg = CallToActionBlock(label='CTA column light blue')
column2_bg = CallToActionBlock(label='CTA column dark blue')

class Meta:
template = 'a4_candy_cms_pages/blocks/col_background_cta_block.html'
icon = 'tick-inverse'


# 3 column block with an optional button/link for each col,
# Call-to-action block can have up to 3 big CTA btn
class ColumnsCTABlock(blocks.StructBlock):
Expand Down
Loading