From 390dde4ca272d995267253184f87200352877eb4 Mon Sep 17 00:00:00 2001 From: phillimorland <5871230+phillimorland@users.noreply.github.com> Date: Thu, 16 Jun 2022 15:50:39 +0200 Subject: [PATCH] template updates --- .../assets/scss/components/_blocks.scss | 36 ++----------------- apps/cms/blocks.py | 11 ++---- .../blocks/col_background_cta_block.html | 22 +++++++----- 3 files changed, 19 insertions(+), 50 deletions(-) diff --git a/adhocracy-plus/assets/scss/components/_blocks.scss b/adhocracy-plus/assets/scss/components/_blocks.scss index 2d81cd8c08..6398bbbe11 100644 --- a/adhocracy-plus/assets/scss/components/_blocks.scss +++ b/adhocracy-plus/assets/scss/components/_blocks.scss @@ -52,29 +52,6 @@ $block-padding-md: 7.5 * $padding; text-align: left; } -.block-img-col-1 { - @extend .col-md-7; - - img { - display: inline-block; - float: left; - padding-right: $padding; - } -} - -.block-img-col-2 { - @extend .col-md-5; - - .block-img-col__image { - width: 100%; - position: relative; - - @media screen and (min-width: $breakpoint-xxl) { - margin-top: 2 * $spacer; - } - } -} - // old block styling, still used in activity block .block--bordered { padding: 1em; @@ -88,7 +65,6 @@ $block-padding-md: 7.5 * $padding; // responsive padding for image, 2 col cta .homepage__wrapper { - .block-img-col-1, .block-row-2 { padding: 2 * $padding; @@ -128,26 +104,20 @@ $block-padding-md: 7.5 * $padding; width: 80px; border-bottom: solid 8px $brand-secondary; } - - .block-img-col-1 { - h2:after { - left: 0; - } - } } // coloured background block -.block-background_cta_block .block > :first-child { +.block-background_cta_block .block-light { background-color: $brand-secondary; } -.block-background_cta_block .block > :last-child { +.block-background_cta_block .block-dark { background-color: $brand-primary; color: $text-color-inverted; } // linked for specificty -.btn--transparent.block-bg_btn-2 { +.block-dark .btn--transparent { color: $text-color-inverted; border-color: $text-color-inverted; diff --git a/apps/cms/blocks.py b/apps/cms/blocks.py index 8d48f81b6d..e56231f6e3 100644 --- a/apps/cms/blocks.py +++ b/apps/cms/blocks.py @@ -31,15 +31,8 @@ class Meta: # 2-col, richtext, CTA btn, background colour class ColBackgroundCTABlock(blocks.StructBlock): - columns_count = blocks.ChoiceBlock(choices=[ - (1, 'One column'), - (2, 'Two columns') - - ], default=2) - - columns = blocks.ListBlock( - CallToActionBlock(label='CTA with Background') - ) + 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' diff --git a/apps/cms/pages/templates/a4_candy_cms_pages/blocks/col_background_cta_block.html b/apps/cms/pages/templates/a4_candy_cms_pages/blocks/col_background_cta_block.html index ecad65b6a4..02fbf98ffe 100644 --- a/apps/cms/pages/templates/a4_candy_cms_pages/blocks/col_background_cta_block.html +++ b/apps/cms/pages/templates/a4_candy_cms_pages/blocks/col_background_cta_block.html @@ -1,14 +1,20 @@ {% load wagtailcore_tags %}