From 6408c4bef2e810b8f38f33a09deb8342ae9665fe Mon Sep 17 00:00:00 2001 From: Albina Starykova Date: Tue, 20 Jun 2023 16:16:41 +0300 Subject: [PATCH 1/7] Style mailchimp newsletter form --- .../sass/components/_mailchimp.scss | 84 +++++++++++++++++++ .../sass/components/_raw-html-block.scss | 8 ++ tbx/static_src/sass/main.scss | 1 + 3 files changed, 93 insertions(+) create mode 100644 tbx/static_src/sass/components/_mailchimp.scss diff --git a/tbx/static_src/sass/components/_mailchimp.scss b/tbx/static_src/sass/components/_mailchimp.scss new file mode 100644 index 000000000..7769b00fe --- /dev/null +++ b/tbx/static_src/sass/components/_mailchimp.scss @@ -0,0 +1,84 @@ +/* Overriding styles for embedded mailchimp form */ + +/* stylelint-disable selector-max-id */ +/* stylelint-disable selector-max-specificity */ +/* stylelint-disable declaration-no-important */ +#mc_embed_signup { + width: min(calc(100vw - 2 * $variable-gutter--small), 700px) !important; + + #mc_embed_signup_scroll { + font-family: $font--primary; + font-size: rem(18px); + + .mc-field-group { + width: 100%; + color: var(--color--dark-indigo); + + input { + border-radius: 0; + } + + input[type="checkbox"] { + margin-right: 10px; + } + + label { + margin-bottom: 10px; + } + + &.input-group { + margin-top: 20px; + + strong { + margin-bottom: 10px; + } + + + li::before { + content: none; + } + } + } + + #mce-responses { + padding: 0; + margin: 0; + + .response { + width: 100%; + } + + #mce-error-response { + color: var(--color--coral-dark); + } + + #mce-success-response { + color: var(--color--dark-indigo); + } + } + + .button { + font-size: rem(18px); + font-weight: $weight--bold; + background-color: var(--color--dark-indigo); + height: auto; + padding: 15px 30px; + margin-bottom: 30px; + border-radius: 0; + + @include media-query('medium') { + font-size: rem(22px); + padding: 18px 36px; + } + + &:hover, + &:focus, + &:active { + background-color: var(--color--indigo); + } + } + } +} +/* stylelint-enable */ + + diff --git a/tbx/static_src/sass/components/_raw-html-block.scss b/tbx/static_src/sass/components/_raw-html-block.scss index c5b31fd1b..0efe9eb56 100644 --- a/tbx/static_src/sass/components/_raw-html-block.scss +++ b/tbx/static_src/sass/components/_raw-html-block.scss @@ -2,4 +2,12 @@ border: 10px solid var(--color--light-grey); max-width: 550px; margin: 0 auto; + + /* stylelint-disable selector-max-id */ + /* stylelint-disable selector-max-specificity */ + &:has(#mc_embed_signup) { + border: none; + max-width: 700px; + } + /* stylelint-enable */ } diff --git a/tbx/static_src/sass/main.scss b/tbx/static_src/sass/main.scss index 5c27239ec..c2278ea9d 100644 --- a/tbx/static_src/sass/main.scss +++ b/tbx/static_src/sass/main.scss @@ -50,6 +50,7 @@ @import 'components/list-item'; @import 'components/locations'; @import 'components/logo'; +@import 'components/mailchimp'; @import 'components/menu-button'; @import 'components/mobile-nav'; @import 'components/page'; From 020ae8674747db7028620a5a62162ef4d4c56a8e Mon Sep 17 00:00:00 2001 From: Helen C Date: Wed, 21 Jun 2023 15:07:57 +0100 Subject: [PATCH 2/7] Add a new streamfield block for the mailchimp embed --- .../migrations/0025_add_mailchimp_block.py | 24 +++++++++++++++++++ tbx/core/blocks.py | 5 ++++ .../migrations/0147_add_mailchimp_block.py | 24 +++++++++++++++++++ .../blocks/mailchimp_form_block.html | 3 +++ .../blocks/mailchimp_form_block.yaml | 2 ++ .../migrations/0027_add_mailchimp_block.py | 24 +++++++++++++++++++ 6 files changed, 82 insertions(+) create mode 100644 tbx/blog/migrations/0025_add_mailchimp_block.py create mode 100644 tbx/core/migrations/0147_add_mailchimp_block.py create mode 100644 tbx/project_styleguide/templates/patterns/molecules/streamfield/blocks/mailchimp_form_block.html create mode 100644 tbx/project_styleguide/templates/patterns/molecules/streamfield/blocks/mailchimp_form_block.yaml create mode 100644 tbx/work/migrations/0027_add_mailchimp_block.py diff --git a/tbx/blog/migrations/0025_add_mailchimp_block.py b/tbx/blog/migrations/0025_add_mailchimp_block.py new file mode 100644 index 000000000..c1f988049 --- /dev/null +++ b/tbx/blog/migrations/0025_add_mailchimp_block.py @@ -0,0 +1,24 @@ +# Generated by Django 3.2.18 on 2023-06-21 14:06 + +from django.db import migrations +import tbx.core.blocks +import wagtail.blocks +import wagtail.embeds.blocks +import wagtail.fields +import wagtail.images.blocks +import wagtailmarkdown.blocks + + +class Migration(migrations.Migration): + + dependencies = [ + ('blog', '0024_alter_blogpage_body'), + ] + + operations = [ + migrations.AlterField( + model_name='blogpage', + name='body', + field=wagtail.fields.StreamField([('h2', wagtail.blocks.CharBlock(form_classname='title', icon='title', template='patterns/molecules/streamfield/blocks/heading2_block.html')), ('h3', wagtail.blocks.CharBlock(form_classname='title', icon='title', template='patterns/molecules/streamfield/blocks/heading3_block.html')), ('h4', wagtail.blocks.CharBlock(form_classname='title', icon='title', template='patterns/molecules/streamfield/blocks/heading4_block.html')), ('intro', wagtail.blocks.RichTextBlock(icon='pilcrow', template='patterns/molecules/streamfield/blocks/intro_block.html')), ('paragraph', wagtail.blocks.RichTextBlock(icon='pilcrow', template='patterns/molecules/streamfield/blocks/paragraph_block.html')), ('aligned_image', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock()), ('alignment', tbx.core.blocks.ImageFormatChoiceBlock()), ('caption', wagtail.blocks.CharBlock()), ('attribution', wagtail.blocks.CharBlock(required=False))], label='Aligned image', template='patterns/molecules/streamfield/blocks/aligned_image_block.html')), ('wide_image', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock())], label='Wide image', template='patterns/molecules/streamfield/blocks/wide_image_block.html')), ('bustout', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock()), ('text', wagtail.blocks.RichTextBlock())], template='patterns/molecules/streamfield/blocks/bustout_block.html')), ('pullquote', wagtail.blocks.StructBlock([('quote', wagtail.blocks.CharBlock(form_classname='quote title')), ('attribution', wagtail.blocks.CharBlock())], template='patterns/molecules/streamfield/blocks/pullquote_block.html')), ('raw_html', wagtail.blocks.RawHTMLBlock(icon='code', label='Raw HTML', template='patterns/molecules/streamfield/blocks/raw_html_block.html')), ('mailchimp_form', wagtail.blocks.RawHTMLBlock(icon='code', label='Mailchimp embedded form', template='patterns/molecules/streamfield/blocks/mailchimp_form_block.html')), ('embed', wagtail.embeds.blocks.EmbedBlock(icon='code', template='patterns/molecules/streamfield/blocks/embed_block.html')), ('markdown', wagtailmarkdown.blocks.MarkdownBlock(icon='code', template='patterns/molecules/streamfield/blocks/markdown_block.html')), ('story_embed', tbx.core.blocks.ExternalStoryEmbedBlock(icon='code', template='patterns/molecules/streamfield/blocks/external_story_block.html'))], use_json_field=True), + ), + ] diff --git a/tbx/core/blocks.py b/tbx/core/blocks.py index 6223c2c83..5c89a9b7e 100644 --- a/tbx/core/blocks.py +++ b/tbx/core/blocks.py @@ -275,6 +275,11 @@ class StoryBlock(StreamBlock): icon="code", template="patterns/molecules/streamfield/blocks/raw_html_block.html", ) + mailchimp_form = RawHTMLBlock( + label="Mailchimp embedded form", + icon="code", + template="patterns/molecules/streamfield/blocks/mailchimp_form_block.html", + ) markdown = MarkdownBlock( icon="code", template="patterns/molecules/streamfield/blocks/markdown_block.html", diff --git a/tbx/core/migrations/0147_add_mailchimp_block.py b/tbx/core/migrations/0147_add_mailchimp_block.py new file mode 100644 index 000000000..0720a5f51 --- /dev/null +++ b/tbx/core/migrations/0147_add_mailchimp_block.py @@ -0,0 +1,24 @@ +# Generated by Django 3.2.18 on 2023-06-21 14:06 + +from django.db import migrations +import tbx.core.blocks +import wagtail.blocks +import wagtail.embeds.blocks +import wagtail.fields +import wagtail.images.blocks +import wagtailmarkdown.blocks + + +class Migration(migrations.Migration): + + dependencies = [ + ('torchbox', '0146_alter_standardpage_additional_content'), + ] + + operations = [ + migrations.AlterField( + model_name='standardpage', + name='body', + field=wagtail.fields.StreamField([('h2', wagtail.blocks.CharBlock(form_classname='title', icon='title', template='patterns/molecules/streamfield/blocks/heading2_block.html')), ('h3', wagtail.blocks.CharBlock(form_classname='title', icon='title', template='patterns/molecules/streamfield/blocks/heading3_block.html')), ('h4', wagtail.blocks.CharBlock(form_classname='title', icon='title', template='patterns/molecules/streamfield/blocks/heading4_block.html')), ('intro', wagtail.blocks.RichTextBlock(icon='pilcrow', template='patterns/molecules/streamfield/blocks/intro_block.html')), ('paragraph', wagtail.blocks.RichTextBlock(icon='pilcrow', template='patterns/molecules/streamfield/blocks/paragraph_block.html')), ('aligned_image', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock()), ('alignment', tbx.core.blocks.ImageFormatChoiceBlock()), ('caption', wagtail.blocks.CharBlock()), ('attribution', wagtail.blocks.CharBlock(required=False))], label='Aligned image', template='patterns/molecules/streamfield/blocks/aligned_image_block.html')), ('wide_image', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock())], label='Wide image', template='patterns/molecules/streamfield/blocks/wide_image_block.html')), ('bustout', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock()), ('text', wagtail.blocks.RichTextBlock())], template='patterns/molecules/streamfield/blocks/bustout_block.html')), ('pullquote', wagtail.blocks.StructBlock([('quote', wagtail.blocks.CharBlock(form_classname='quote title')), ('attribution', wagtail.blocks.CharBlock())], template='patterns/molecules/streamfield/blocks/pullquote_block.html')), ('raw_html', wagtail.blocks.RawHTMLBlock(icon='code', label='Raw HTML', template='patterns/molecules/streamfield/blocks/raw_html_block.html')), ('mailchimp_form', wagtail.blocks.RawHTMLBlock(icon='code', label='Mailchimp embedded form', template='patterns/molecules/streamfield/blocks/mailchimp_form_block.html')), ('embed', wagtail.embeds.blocks.EmbedBlock(icon='code', template='patterns/molecules/streamfield/blocks/embed_block.html')), ('markdown', wagtailmarkdown.blocks.MarkdownBlock(icon='code', template='patterns/molecules/streamfield/blocks/markdown_block.html')), ('story_embed', tbx.core.blocks.ExternalStoryEmbedBlock(icon='code', template='patterns/molecules/streamfield/blocks/external_story_block.html'))], use_json_field=True), + ), + ] diff --git a/tbx/project_styleguide/templates/patterns/molecules/streamfield/blocks/mailchimp_form_block.html b/tbx/project_styleguide/templates/patterns/molecules/streamfield/blocks/mailchimp_form_block.html new file mode 100644 index 000000000..41d8779ef --- /dev/null +++ b/tbx/project_styleguide/templates/patterns/molecules/streamfield/blocks/mailchimp_form_block.html @@ -0,0 +1,3 @@ +
+ {{ value }} +
diff --git a/tbx/project_styleguide/templates/patterns/molecules/streamfield/blocks/mailchimp_form_block.yaml b/tbx/project_styleguide/templates/patterns/molecules/streamfield/blocks/mailchimp_form_block.yaml new file mode 100644 index 000000000..a58e4315d --- /dev/null +++ b/tbx/project_styleguide/templates/patterns/molecules/streamfield/blocks/mailchimp_form_block.yaml @@ -0,0 +1,2 @@ +context: + value: '
' diff --git a/tbx/work/migrations/0027_add_mailchimp_block.py b/tbx/work/migrations/0027_add_mailchimp_block.py new file mode 100644 index 000000000..51c5d376f --- /dev/null +++ b/tbx/work/migrations/0027_add_mailchimp_block.py @@ -0,0 +1,24 @@ +# Generated by Django 3.2.18 on 2023-06-21 14:06 + +from django.db import migrations +import tbx.core.blocks +import wagtail.blocks +import wagtail.embeds.blocks +import wagtail.fields +import wagtail.images.blocks +import wagtailmarkdown.blocks + + +class Migration(migrations.Migration): + + dependencies = [ + ('work', '0026_alter_workpage_body'), + ] + + operations = [ + migrations.AlterField( + model_name='workpage', + name='body', + field=wagtail.fields.StreamField([('h2', wagtail.blocks.CharBlock(form_classname='title', icon='title', template='patterns/molecules/streamfield/blocks/heading2_block.html')), ('h3', wagtail.blocks.CharBlock(form_classname='title', icon='title', template='patterns/molecules/streamfield/blocks/heading3_block.html')), ('h4', wagtail.blocks.CharBlock(form_classname='title', icon='title', template='patterns/molecules/streamfield/blocks/heading4_block.html')), ('intro', wagtail.blocks.RichTextBlock(icon='pilcrow', template='patterns/molecules/streamfield/blocks/intro_block.html')), ('paragraph', wagtail.blocks.RichTextBlock(icon='pilcrow', template='patterns/molecules/streamfield/blocks/paragraph_block.html')), ('aligned_image', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock()), ('alignment', tbx.core.blocks.ImageFormatChoiceBlock()), ('caption', wagtail.blocks.CharBlock()), ('attribution', wagtail.blocks.CharBlock(required=False))], label='Aligned image', template='patterns/molecules/streamfield/blocks/aligned_image_block.html')), ('wide_image', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock())], label='Wide image', template='patterns/molecules/streamfield/blocks/wide_image_block.html')), ('bustout', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock()), ('text', wagtail.blocks.RichTextBlock())], template='patterns/molecules/streamfield/blocks/bustout_block.html')), ('pullquote', wagtail.blocks.StructBlock([('quote', wagtail.blocks.CharBlock(form_classname='quote title')), ('attribution', wagtail.blocks.CharBlock())], template='patterns/molecules/streamfield/blocks/pullquote_block.html')), ('raw_html', wagtail.blocks.RawHTMLBlock(icon='code', label='Raw HTML', template='patterns/molecules/streamfield/blocks/raw_html_block.html')), ('mailchimp_form', wagtail.blocks.RawHTMLBlock(icon='code', label='Mailchimp embedded form', template='patterns/molecules/streamfield/blocks/mailchimp_form_block.html')), ('embed', wagtail.embeds.blocks.EmbedBlock(icon='code', template='patterns/molecules/streamfield/blocks/embed_block.html')), ('markdown', wagtailmarkdown.blocks.MarkdownBlock(icon='code', template='patterns/molecules/streamfield/blocks/markdown_block.html')), ('story_embed', tbx.core.blocks.ExternalStoryEmbedBlock(icon='code', template='patterns/molecules/streamfield/blocks/external_story_block.html'))], use_json_field=True), + ), + ] From c29be7e807f6084ae833b2713740af450726f9b3 Mon Sep 17 00:00:00 2001 From: Albina Starykova Date: Mon, 26 Jun 2023 23:16:45 +0300 Subject: [PATCH 3/7] Style new streamfield block for the mailchimp embed --- .../blocks/mailchimp_form_block.html | 2 +- .../sass/components/_mailchimp.scss | 104 +++++++++--------- .../sass/components/_raw-html-block.scss | 8 -- 3 files changed, 54 insertions(+), 60 deletions(-) diff --git a/tbx/project_styleguide/templates/patterns/molecules/streamfield/blocks/mailchimp_form_block.html b/tbx/project_styleguide/templates/patterns/molecules/streamfield/blocks/mailchimp_form_block.html index 41d8779ef..bdb835350 100644 --- a/tbx/project_styleguide/templates/patterns/molecules/streamfield/blocks/mailchimp_form_block.html +++ b/tbx/project_styleguide/templates/patterns/molecules/streamfield/blocks/mailchimp_form_block.html @@ -1,3 +1,3 @@ -
+
{{ value }}
diff --git a/tbx/static_src/sass/components/_mailchimp.scss b/tbx/static_src/sass/components/_mailchimp.scss index 7769b00fe..0c971dcdf 100644 --- a/tbx/static_src/sass/components/_mailchimp.scss +++ b/tbx/static_src/sass/components/_mailchimp.scss @@ -2,83 +2,85 @@ /* stylelint-disable selector-max-id */ /* stylelint-disable selector-max-specificity */ -/* stylelint-disable declaration-no-important */ -#mc_embed_signup { - width: min(calc(100vw - 2 * $variable-gutter--small), 700px) !important; +.mailchimp-form-block { + border: none; + max-width: 700px; + margin: 0 auto; - #mc_embed_signup_scroll { - font-family: $font--primary; - font-size: rem(18px); + #mc_embed_signup { + width: min(calc(100vw - 2 * $variable-gutter--small), 700px); - .mc-field-group { - width: 100%; - color: var(--color--dark-indigo); + #mc_embed_signup_scroll { + font-family: $font--primary; + font-size: rem(18px); - input { - border-radius: 0; - } + .mc-field-group { + width: 100%; + color: var(--color--dark-indigo); - input[type="checkbox"] { - margin-right: 10px; - } + label { + margin-bottom: 10px; + } - label { - margin-bottom: 10px; + input { + border-radius: 0; + } + + input[type='checkbox'] { + margin-right: 10px; + } } - &.input-group { + .input-group { margin-top: 20px; strong { margin-bottom: 10px; } - li::before { content: none; } } - } - #mce-responses { - padding: 0; - margin: 0; + #mce-responses { + padding: 0; + margin: 0; - .response { - width: 100%; - } + .response { + width: 100%; + } - #mce-error-response { - color: var(--color--coral-dark); - } + #mce-error-response { + color: var(--color--coral-dark); + } - #mce-success-response { - color: var(--color--dark-indigo); + #mce-success-response { + color: var(--color--dark-indigo); + } } - } - .button { - font-size: rem(18px); - font-weight: $weight--bold; - background-color: var(--color--dark-indigo); - height: auto; - padding: 15px 30px; - margin-bottom: 30px; - border-radius: 0; - - @include media-query('medium') { - font-size: rem(22px); - padding: 18px 36px; - } + .button { + font-size: rem(18px); + font-weight: $weight--bold; + background-color: var(--color--dark-indigo); + height: auto; + padding: 15px 30px; + margin-bottom: 30px; + border-radius: 0; + + @include media-query('medium') { + font-size: rem(22px); + padding: 18px 36px; + } - &:hover, - &:focus, - &:active { - background-color: var(--color--indigo); + &:hover, + &:focus, + &:active { + background-color: var(--color--indigo); + } } } } } /* stylelint-enable */ - - diff --git a/tbx/static_src/sass/components/_raw-html-block.scss b/tbx/static_src/sass/components/_raw-html-block.scss index 0efe9eb56..c5b31fd1b 100644 --- a/tbx/static_src/sass/components/_raw-html-block.scss +++ b/tbx/static_src/sass/components/_raw-html-block.scss @@ -2,12 +2,4 @@ border: 10px solid var(--color--light-grey); max-width: 550px; margin: 0 auto; - - /* stylelint-disable selector-max-id */ - /* stylelint-disable selector-max-specificity */ - &:has(#mc_embed_signup) { - border: none; - max-width: 700px; - } - /* stylelint-enable */ } From b56a3904e1c2cb3ddab16e09e998b70df4bdc82d Mon Sep 17 00:00:00 2001 From: Helen C Date: Tue, 27 Jun 2023 09:30:58 +0100 Subject: [PATCH 4/7] Merge migrations --- ...025_add_mailchimp_block_0026_add_video_block.py | 14 ++++++++++++++ ...147_add_mailchimp_block_0149_add_video_block.py | 14 ++++++++++++++ ...027_add_mailchimp_block_0028_add_video_block.py | 14 ++++++++++++++ 3 files changed, 42 insertions(+) create mode 100644 tbx/blog/migrations/0027_merge_0025_add_mailchimp_block_0026_add_video_block.py create mode 100644 tbx/core/migrations/0150_merge_0147_add_mailchimp_block_0149_add_video_block.py create mode 100644 tbx/work/migrations/0029_merge_0027_add_mailchimp_block_0028_add_video_block.py diff --git a/tbx/blog/migrations/0027_merge_0025_add_mailchimp_block_0026_add_video_block.py b/tbx/blog/migrations/0027_merge_0025_add_mailchimp_block_0026_add_video_block.py new file mode 100644 index 000000000..6c9c4b3a1 --- /dev/null +++ b/tbx/blog/migrations/0027_merge_0025_add_mailchimp_block_0026_add_video_block.py @@ -0,0 +1,14 @@ +# Generated by Django 3.2.18 on 2023-06-27 08:21 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('blog', '0025_add_mailchimp_block'), + ('blog', '0026_add_video_block'), + ] + + operations = [ + ] diff --git a/tbx/core/migrations/0150_merge_0147_add_mailchimp_block_0149_add_video_block.py b/tbx/core/migrations/0150_merge_0147_add_mailchimp_block_0149_add_video_block.py new file mode 100644 index 000000000..e95228cf8 --- /dev/null +++ b/tbx/core/migrations/0150_merge_0147_add_mailchimp_block_0149_add_video_block.py @@ -0,0 +1,14 @@ +# Generated by Django 3.2.18 on 2023-06-27 08:21 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('torchbox', '0147_add_mailchimp_block'), + ('torchbox', '0149_add_video_block'), + ] + + operations = [ + ] diff --git a/tbx/work/migrations/0029_merge_0027_add_mailchimp_block_0028_add_video_block.py b/tbx/work/migrations/0029_merge_0027_add_mailchimp_block_0028_add_video_block.py new file mode 100644 index 000000000..a7deb6817 --- /dev/null +++ b/tbx/work/migrations/0029_merge_0027_add_mailchimp_block_0028_add_video_block.py @@ -0,0 +1,14 @@ +# Generated by Django 3.2.18 on 2023-06-27 08:22 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('work', '0027_add_mailchimp_block'), + ('work', '0028_add_video_block'), + ] + + operations = [ + ] From 738b241fb1945203ac0980e1d0e4e5bfc8eee22b Mon Sep 17 00:00:00 2001 From: Helen C Date: Tue, 27 Jun 2023 09:39:05 +0100 Subject: [PATCH 5/7] Add extra migrations after merges --- .../migrations/0028_alter_blogpage_body.py | 25 +++++++++++++++++++ .../0151_alter_standardpage_body.py | 25 +++++++++++++++++++ .../migrations/0030_alter_workpage_body.py | 25 +++++++++++++++++++ 3 files changed, 75 insertions(+) create mode 100644 tbx/blog/migrations/0028_alter_blogpage_body.py create mode 100644 tbx/core/migrations/0151_alter_standardpage_body.py create mode 100644 tbx/work/migrations/0030_alter_workpage_body.py diff --git a/tbx/blog/migrations/0028_alter_blogpage_body.py b/tbx/blog/migrations/0028_alter_blogpage_body.py new file mode 100644 index 000000000..a940a554a --- /dev/null +++ b/tbx/blog/migrations/0028_alter_blogpage_body.py @@ -0,0 +1,25 @@ +# Generated by Django 3.2.18 on 2023-06-27 08:37 + +from django.db import migrations +import tbx.core.blocks +import wagtail.blocks +import wagtail.embeds.blocks +import wagtail.fields +import wagtail.images.blocks +import wagtailmarkdown.blocks +import wagtailmedia.blocks + + +class Migration(migrations.Migration): + + dependencies = [ + ('blog', '0027_merge_0025_add_mailchimp_block_0026_add_video_block'), + ] + + operations = [ + migrations.AlterField( + model_name='blogpage', + name='body', + field=wagtail.fields.StreamField([('h2', wagtail.blocks.CharBlock(form_classname='title', icon='title', template='patterns/molecules/streamfield/blocks/heading2_block.html')), ('h3', wagtail.blocks.CharBlock(form_classname='title', icon='title', template='patterns/molecules/streamfield/blocks/heading3_block.html')), ('h4', wagtail.blocks.CharBlock(form_classname='title', icon='title', template='patterns/molecules/streamfield/blocks/heading4_block.html')), ('intro', wagtail.blocks.RichTextBlock(icon='pilcrow', template='patterns/molecules/streamfield/blocks/intro_block.html')), ('paragraph', wagtail.blocks.RichTextBlock(icon='pilcrow', template='patterns/molecules/streamfield/blocks/paragraph_block.html')), ('aligned_image', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock()), ('alignment', tbx.core.blocks.ImageFormatChoiceBlock()), ('caption', wagtail.blocks.CharBlock()), ('attribution', wagtail.blocks.CharBlock(required=False))], label='Aligned image', template='patterns/molecules/streamfield/blocks/aligned_image_block.html')), ('wide_image', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock())], label='Wide image', template='patterns/molecules/streamfield/blocks/wide_image_block.html')), ('bustout', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock()), ('text', wagtail.blocks.RichTextBlock())], template='patterns/molecules/streamfield/blocks/bustout_block.html')), ('pullquote', wagtail.blocks.StructBlock([('quote', wagtail.blocks.CharBlock(form_classname='quote title')), ('attribution', wagtail.blocks.CharBlock())], template='patterns/molecules/streamfield/blocks/pullquote_block.html')), ('raw_html', wagtail.blocks.RawHTMLBlock(icon='code', label='Raw HTML', template='patterns/molecules/streamfield/blocks/raw_html_block.html')), ('mailchimp_form', wagtail.blocks.RawHTMLBlock(icon='code', label='Mailchimp embedded form', template='patterns/molecules/streamfield/blocks/mailchimp_form_block.html')), ('markdown', wagtailmarkdown.blocks.MarkdownBlock(icon='code', template='patterns/molecules/streamfield/blocks/markdown_block.html')), ('embed', wagtail.embeds.blocks.EmbedBlock(group='Media', icon='code', template='patterns/molecules/streamfield/blocks/embed_block.html')), ('video_block', wagtail.blocks.StructBlock([('video', wagtailmedia.blocks.VideoChooserBlock()), ('autoplay', wagtail.blocks.BooleanBlock(default=False, help_text='Automatically start and loop the video. Please use sparingly.', required=False)), ('use_original_width', wagtail.blocks.BooleanBlock(default=False, help_text='Use the original width of the video instead of the default content width. Note that videos wider than the content width will be limited to the content width.', required=False))], group='Media')), ('story_embed', tbx.core.blocks.ExternalStoryEmbedBlock(icon='code', template='patterns/molecules/streamfield/blocks/external_story_block.html'))], use_json_field=True), + ), + ] diff --git a/tbx/core/migrations/0151_alter_standardpage_body.py b/tbx/core/migrations/0151_alter_standardpage_body.py new file mode 100644 index 000000000..2fdf59919 --- /dev/null +++ b/tbx/core/migrations/0151_alter_standardpage_body.py @@ -0,0 +1,25 @@ +# Generated by Django 3.2.18 on 2023-06-27 08:37 + +from django.db import migrations +import tbx.core.blocks +import wagtail.blocks +import wagtail.embeds.blocks +import wagtail.fields +import wagtail.images.blocks +import wagtailmarkdown.blocks +import wagtailmedia.blocks + + +class Migration(migrations.Migration): + + dependencies = [ + ('torchbox', '0150_merge_0147_add_mailchimp_block_0149_add_video_block'), + ] + + operations = [ + migrations.AlterField( + model_name='standardpage', + name='body', + field=wagtail.fields.StreamField([('h2', wagtail.blocks.CharBlock(form_classname='title', icon='title', template='patterns/molecules/streamfield/blocks/heading2_block.html')), ('h3', wagtail.blocks.CharBlock(form_classname='title', icon='title', template='patterns/molecules/streamfield/blocks/heading3_block.html')), ('h4', wagtail.blocks.CharBlock(form_classname='title', icon='title', template='patterns/molecules/streamfield/blocks/heading4_block.html')), ('intro', wagtail.blocks.RichTextBlock(icon='pilcrow', template='patterns/molecules/streamfield/blocks/intro_block.html')), ('paragraph', wagtail.blocks.RichTextBlock(icon='pilcrow', template='patterns/molecules/streamfield/blocks/paragraph_block.html')), ('aligned_image', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock()), ('alignment', tbx.core.blocks.ImageFormatChoiceBlock()), ('caption', wagtail.blocks.CharBlock()), ('attribution', wagtail.blocks.CharBlock(required=False))], label='Aligned image', template='patterns/molecules/streamfield/blocks/aligned_image_block.html')), ('wide_image', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock())], label='Wide image', template='patterns/molecules/streamfield/blocks/wide_image_block.html')), ('bustout', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock()), ('text', wagtail.blocks.RichTextBlock())], template='patterns/molecules/streamfield/blocks/bustout_block.html')), ('pullquote', wagtail.blocks.StructBlock([('quote', wagtail.blocks.CharBlock(form_classname='quote title')), ('attribution', wagtail.blocks.CharBlock())], template='patterns/molecules/streamfield/blocks/pullquote_block.html')), ('raw_html', wagtail.blocks.RawHTMLBlock(icon='code', label='Raw HTML', template='patterns/molecules/streamfield/blocks/raw_html_block.html')), ('mailchimp_form', wagtail.blocks.RawHTMLBlock(icon='code', label='Mailchimp embedded form', template='patterns/molecules/streamfield/blocks/mailchimp_form_block.html')), ('markdown', wagtailmarkdown.blocks.MarkdownBlock(icon='code', template='patterns/molecules/streamfield/blocks/markdown_block.html')), ('embed', wagtail.embeds.blocks.EmbedBlock(group='Media', icon='code', template='patterns/molecules/streamfield/blocks/embed_block.html')), ('video_block', wagtail.blocks.StructBlock([('video', wagtailmedia.blocks.VideoChooserBlock()), ('autoplay', wagtail.blocks.BooleanBlock(default=False, help_text='Automatically start and loop the video. Please use sparingly.', required=False)), ('use_original_width', wagtail.blocks.BooleanBlock(default=False, help_text='Use the original width of the video instead of the default content width. Note that videos wider than the content width will be limited to the content width.', required=False))], group='Media')), ('story_embed', tbx.core.blocks.ExternalStoryEmbedBlock(icon='code', template='patterns/molecules/streamfield/blocks/external_story_block.html'))], use_json_field=True), + ), + ] diff --git a/tbx/work/migrations/0030_alter_workpage_body.py b/tbx/work/migrations/0030_alter_workpage_body.py new file mode 100644 index 000000000..7f78966bd --- /dev/null +++ b/tbx/work/migrations/0030_alter_workpage_body.py @@ -0,0 +1,25 @@ +# Generated by Django 3.2.18 on 2023-06-27 08:37 + +from django.db import migrations +import tbx.core.blocks +import wagtail.blocks +import wagtail.embeds.blocks +import wagtail.fields +import wagtail.images.blocks +import wagtailmarkdown.blocks +import wagtailmedia.blocks + + +class Migration(migrations.Migration): + + dependencies = [ + ('work', '0029_merge_0027_add_mailchimp_block_0028_add_video_block'), + ] + + operations = [ + migrations.AlterField( + model_name='workpage', + name='body', + field=wagtail.fields.StreamField([('h2', wagtail.blocks.CharBlock(form_classname='title', icon='title', template='patterns/molecules/streamfield/blocks/heading2_block.html')), ('h3', wagtail.blocks.CharBlock(form_classname='title', icon='title', template='patterns/molecules/streamfield/blocks/heading3_block.html')), ('h4', wagtail.blocks.CharBlock(form_classname='title', icon='title', template='patterns/molecules/streamfield/blocks/heading4_block.html')), ('intro', wagtail.blocks.RichTextBlock(icon='pilcrow', template='patterns/molecules/streamfield/blocks/intro_block.html')), ('paragraph', wagtail.blocks.RichTextBlock(icon='pilcrow', template='patterns/molecules/streamfield/blocks/paragraph_block.html')), ('aligned_image', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock()), ('alignment', tbx.core.blocks.ImageFormatChoiceBlock()), ('caption', wagtail.blocks.CharBlock()), ('attribution', wagtail.blocks.CharBlock(required=False))], label='Aligned image', template='patterns/molecules/streamfield/blocks/aligned_image_block.html')), ('wide_image', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock())], label='Wide image', template='patterns/molecules/streamfield/blocks/wide_image_block.html')), ('bustout', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock()), ('text', wagtail.blocks.RichTextBlock())], template='patterns/molecules/streamfield/blocks/bustout_block.html')), ('pullquote', wagtail.blocks.StructBlock([('quote', wagtail.blocks.CharBlock(form_classname='quote title')), ('attribution', wagtail.blocks.CharBlock())], template='patterns/molecules/streamfield/blocks/pullquote_block.html')), ('raw_html', wagtail.blocks.RawHTMLBlock(icon='code', label='Raw HTML', template='patterns/molecules/streamfield/blocks/raw_html_block.html')), ('mailchimp_form', wagtail.blocks.RawHTMLBlock(icon='code', label='Mailchimp embedded form', template='patterns/molecules/streamfield/blocks/mailchimp_form_block.html')), ('markdown', wagtailmarkdown.blocks.MarkdownBlock(icon='code', template='patterns/molecules/streamfield/blocks/markdown_block.html')), ('embed', wagtail.embeds.blocks.EmbedBlock(group='Media', icon='code', template='patterns/molecules/streamfield/blocks/embed_block.html')), ('video_block', wagtail.blocks.StructBlock([('video', wagtailmedia.blocks.VideoChooserBlock()), ('autoplay', wagtail.blocks.BooleanBlock(default=False, help_text='Automatically start and loop the video. Please use sparingly.', required=False)), ('use_original_width', wagtail.blocks.BooleanBlock(default=False, help_text='Use the original width of the video instead of the default content width. Note that videos wider than the content width will be limited to the content width.', required=False))], group='Media')), ('story_embed', tbx.core.blocks.ExternalStoryEmbedBlock(icon='code', template='patterns/molecules/streamfield/blocks/external_story_block.html'))], use_json_field=True), + ), + ] From 9c64b732ffbcf1b63f0786ef38a45057f3de5420 Mon Sep 17 00:00:00 2001 From: Albina Starykova Date: Tue, 27 Jun 2023 13:23:23 +0300 Subject: [PATCH 6/7] Align mailchimp form with the other streamfield blocks --- tbx/static_src/sass/components/_mailchimp.scss | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tbx/static_src/sass/components/_mailchimp.scss b/tbx/static_src/sass/components/_mailchimp.scss index 0c971dcdf..9529181a1 100644 --- a/tbx/static_src/sass/components/_mailchimp.scss +++ b/tbx/static_src/sass/components/_mailchimp.scss @@ -3,13 +3,15 @@ /* stylelint-disable selector-max-id */ /* stylelint-disable selector-max-specificity */ .mailchimp-form-block { - border: none; - max-width: 700px; - margin: 0 auto; + @include streamblock-padding(); #mc_embed_signup { width: min(calc(100vw - 2 * $variable-gutter--small), 700px); + form { + margin: 0; + } + #mc_embed_signup_scroll { font-family: $font--primary; font-size: rem(18px); From 3544b5b94ba0d771b9226fd5936a6e8304721e94 Mon Sep 17 00:00:00 2001 From: Victor Miti Date: Wed, 28 Jun 2023 11:44:04 +0100 Subject: [PATCH 7/7] Recreate migrations for mailchimp block --- .../migrations/0025_add_mailchimp_block.py | 24 --- .../migrations/0027_add_mailchimp_block.py | 179 ++++++++++++++++++ ...dd_mailchimp_block_0026_add_video_block.py | 14 -- .../migrations/0028_alter_blogpage_body.py | 25 --- .../migrations/0147_add_mailchimp_block.py | 24 --- .../migrations/0150_add_mailchimp_block.py | 179 ++++++++++++++++++ ...dd_mailchimp_block_0149_add_video_block.py | 14 -- .../0151_alter_standardpage_body.py | 25 --- .../migrations/0027_add_mailchimp_block.py | 24 --- .../migrations/0029_add_mailchimp_block.py | 179 ++++++++++++++++++ ...dd_mailchimp_block_0028_add_video_block.py | 14 -- .../migrations/0030_alter_workpage_body.py | 25 --- 12 files changed, 537 insertions(+), 189 deletions(-) delete mode 100644 tbx/blog/migrations/0025_add_mailchimp_block.py create mode 100644 tbx/blog/migrations/0027_add_mailchimp_block.py delete mode 100644 tbx/blog/migrations/0027_merge_0025_add_mailchimp_block_0026_add_video_block.py delete mode 100644 tbx/blog/migrations/0028_alter_blogpage_body.py delete mode 100644 tbx/core/migrations/0147_add_mailchimp_block.py create mode 100644 tbx/core/migrations/0150_add_mailchimp_block.py delete mode 100644 tbx/core/migrations/0150_merge_0147_add_mailchimp_block_0149_add_video_block.py delete mode 100644 tbx/core/migrations/0151_alter_standardpage_body.py delete mode 100644 tbx/work/migrations/0027_add_mailchimp_block.py create mode 100644 tbx/work/migrations/0029_add_mailchimp_block.py delete mode 100644 tbx/work/migrations/0029_merge_0027_add_mailchimp_block_0028_add_video_block.py delete mode 100644 tbx/work/migrations/0030_alter_workpage_body.py diff --git a/tbx/blog/migrations/0025_add_mailchimp_block.py b/tbx/blog/migrations/0025_add_mailchimp_block.py deleted file mode 100644 index c1f988049..000000000 --- a/tbx/blog/migrations/0025_add_mailchimp_block.py +++ /dev/null @@ -1,24 +0,0 @@ -# Generated by Django 3.2.18 on 2023-06-21 14:06 - -from django.db import migrations -import tbx.core.blocks -import wagtail.blocks -import wagtail.embeds.blocks -import wagtail.fields -import wagtail.images.blocks -import wagtailmarkdown.blocks - - -class Migration(migrations.Migration): - - dependencies = [ - ('blog', '0024_alter_blogpage_body'), - ] - - operations = [ - migrations.AlterField( - model_name='blogpage', - name='body', - field=wagtail.fields.StreamField([('h2', wagtail.blocks.CharBlock(form_classname='title', icon='title', template='patterns/molecules/streamfield/blocks/heading2_block.html')), ('h3', wagtail.blocks.CharBlock(form_classname='title', icon='title', template='patterns/molecules/streamfield/blocks/heading3_block.html')), ('h4', wagtail.blocks.CharBlock(form_classname='title', icon='title', template='patterns/molecules/streamfield/blocks/heading4_block.html')), ('intro', wagtail.blocks.RichTextBlock(icon='pilcrow', template='patterns/molecules/streamfield/blocks/intro_block.html')), ('paragraph', wagtail.blocks.RichTextBlock(icon='pilcrow', template='patterns/molecules/streamfield/blocks/paragraph_block.html')), ('aligned_image', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock()), ('alignment', tbx.core.blocks.ImageFormatChoiceBlock()), ('caption', wagtail.blocks.CharBlock()), ('attribution', wagtail.blocks.CharBlock(required=False))], label='Aligned image', template='patterns/molecules/streamfield/blocks/aligned_image_block.html')), ('wide_image', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock())], label='Wide image', template='patterns/molecules/streamfield/blocks/wide_image_block.html')), ('bustout', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock()), ('text', wagtail.blocks.RichTextBlock())], template='patterns/molecules/streamfield/blocks/bustout_block.html')), ('pullquote', wagtail.blocks.StructBlock([('quote', wagtail.blocks.CharBlock(form_classname='quote title')), ('attribution', wagtail.blocks.CharBlock())], template='patterns/molecules/streamfield/blocks/pullquote_block.html')), ('raw_html', wagtail.blocks.RawHTMLBlock(icon='code', label='Raw HTML', template='patterns/molecules/streamfield/blocks/raw_html_block.html')), ('mailchimp_form', wagtail.blocks.RawHTMLBlock(icon='code', label='Mailchimp embedded form', template='patterns/molecules/streamfield/blocks/mailchimp_form_block.html')), ('embed', wagtail.embeds.blocks.EmbedBlock(icon='code', template='patterns/molecules/streamfield/blocks/embed_block.html')), ('markdown', wagtailmarkdown.blocks.MarkdownBlock(icon='code', template='patterns/molecules/streamfield/blocks/markdown_block.html')), ('story_embed', tbx.core.blocks.ExternalStoryEmbedBlock(icon='code', template='patterns/molecules/streamfield/blocks/external_story_block.html'))], use_json_field=True), - ), - ] diff --git a/tbx/blog/migrations/0027_add_mailchimp_block.py b/tbx/blog/migrations/0027_add_mailchimp_block.py new file mode 100644 index 000000000..e1ba92f96 --- /dev/null +++ b/tbx/blog/migrations/0027_add_mailchimp_block.py @@ -0,0 +1,179 @@ +# Generated by Django 3.2.18 on 2023-06-28 10:39 + +from django.db import migrations +import tbx.core.blocks +import wagtail.blocks +import wagtail.embeds.blocks +import wagtail.fields +import wagtail.images.blocks +import wagtailmarkdown.blocks +import wagtailmedia.blocks + + +class Migration(migrations.Migration): + + dependencies = [ + ("blog", "0026_add_video_block"), + ] + + operations = [ + migrations.AlterField( + model_name="blogpage", + name="body", + field=wagtail.fields.StreamField( + [ + ( + "h2", + wagtail.blocks.CharBlock( + form_classname="title", + icon="title", + template="patterns/molecules/streamfield/blocks/heading2_block.html", + ), + ), + ( + "h3", + wagtail.blocks.CharBlock( + form_classname="title", + icon="title", + template="patterns/molecules/streamfield/blocks/heading3_block.html", + ), + ), + ( + "h4", + wagtail.blocks.CharBlock( + form_classname="title", + icon="title", + template="patterns/molecules/streamfield/blocks/heading4_block.html", + ), + ), + ( + "intro", + wagtail.blocks.RichTextBlock( + icon="pilcrow", + template="patterns/molecules/streamfield/blocks/intro_block.html", + ), + ), + ( + "paragraph", + wagtail.blocks.RichTextBlock( + icon="pilcrow", + template="patterns/molecules/streamfield/blocks/paragraph_block.html", + ), + ), + ( + "aligned_image", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock()), + ("alignment", tbx.core.blocks.ImageFormatChoiceBlock()), + ("caption", wagtail.blocks.CharBlock()), + ( + "attribution", + wagtail.blocks.CharBlock(required=False), + ), + ], + label="Aligned image", + template="patterns/molecules/streamfield/blocks/aligned_image_block.html", + ), + ), + ( + "wide_image", + wagtail.blocks.StructBlock( + [("image", wagtail.images.blocks.ImageChooserBlock())], + label="Wide image", + template="patterns/molecules/streamfield/blocks/wide_image_block.html", + ), + ), + ( + "bustout", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock()), + ("text", wagtail.blocks.RichTextBlock()), + ], + template="patterns/molecules/streamfield/blocks/bustout_block.html", + ), + ), + ( + "pullquote", + wagtail.blocks.StructBlock( + [ + ( + "quote", + wagtail.blocks.CharBlock( + form_classname="quote title" + ), + ), + ("attribution", wagtail.blocks.CharBlock()), + ], + template="patterns/molecules/streamfield/blocks/pullquote_block.html", + ), + ), + ( + "raw_html", + wagtail.blocks.RawHTMLBlock( + icon="code", + label="Raw HTML", + template="patterns/molecules/streamfield/blocks/raw_html_block.html", + ), + ), + ( + "mailchimp_form", + wagtail.blocks.RawHTMLBlock( + icon="code", + label="Mailchimp embedded form", + template="patterns/molecules/streamfield/blocks/mailchimp_form_block.html", + ), + ), + ( + "markdown", + wagtailmarkdown.blocks.MarkdownBlock( + icon="code", + template="patterns/molecules/streamfield/blocks/markdown_block.html", + ), + ), + ( + "embed", + wagtail.embeds.blocks.EmbedBlock( + group="Media", + icon="code", + template="patterns/molecules/streamfield/blocks/embed_block.html", + ), + ), + ( + "video_block", + wagtail.blocks.StructBlock( + [ + ("video", wagtailmedia.blocks.VideoChooserBlock()), + ( + "autoplay", + wagtail.blocks.BooleanBlock( + default=False, + help_text="Automatically start and loop the video. Please use sparingly.", + required=False, + ), + ), + ( + "use_original_width", + wagtail.blocks.BooleanBlock( + default=False, + help_text="Use the original width of the video instead of the default content width. Note that videos wider than the content width will be limited to the content width.", + required=False, + ), + ), + ], + group="Media", + ), + ), + ( + "story_embed", + tbx.core.blocks.ExternalStoryEmbedBlock( + icon="code", + template="patterns/molecules/streamfield/blocks/external_story_block.html", + ), + ), + ], + use_json_field=True, + ), + ), + ] diff --git a/tbx/blog/migrations/0027_merge_0025_add_mailchimp_block_0026_add_video_block.py b/tbx/blog/migrations/0027_merge_0025_add_mailchimp_block_0026_add_video_block.py deleted file mode 100644 index 6c9c4b3a1..000000000 --- a/tbx/blog/migrations/0027_merge_0025_add_mailchimp_block_0026_add_video_block.py +++ /dev/null @@ -1,14 +0,0 @@ -# Generated by Django 3.2.18 on 2023-06-27 08:21 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('blog', '0025_add_mailchimp_block'), - ('blog', '0026_add_video_block'), - ] - - operations = [ - ] diff --git a/tbx/blog/migrations/0028_alter_blogpage_body.py b/tbx/blog/migrations/0028_alter_blogpage_body.py deleted file mode 100644 index a940a554a..000000000 --- a/tbx/blog/migrations/0028_alter_blogpage_body.py +++ /dev/null @@ -1,25 +0,0 @@ -# Generated by Django 3.2.18 on 2023-06-27 08:37 - -from django.db import migrations -import tbx.core.blocks -import wagtail.blocks -import wagtail.embeds.blocks -import wagtail.fields -import wagtail.images.blocks -import wagtailmarkdown.blocks -import wagtailmedia.blocks - - -class Migration(migrations.Migration): - - dependencies = [ - ('blog', '0027_merge_0025_add_mailchimp_block_0026_add_video_block'), - ] - - operations = [ - migrations.AlterField( - model_name='blogpage', - name='body', - field=wagtail.fields.StreamField([('h2', wagtail.blocks.CharBlock(form_classname='title', icon='title', template='patterns/molecules/streamfield/blocks/heading2_block.html')), ('h3', wagtail.blocks.CharBlock(form_classname='title', icon='title', template='patterns/molecules/streamfield/blocks/heading3_block.html')), ('h4', wagtail.blocks.CharBlock(form_classname='title', icon='title', template='patterns/molecules/streamfield/blocks/heading4_block.html')), ('intro', wagtail.blocks.RichTextBlock(icon='pilcrow', template='patterns/molecules/streamfield/blocks/intro_block.html')), ('paragraph', wagtail.blocks.RichTextBlock(icon='pilcrow', template='patterns/molecules/streamfield/blocks/paragraph_block.html')), ('aligned_image', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock()), ('alignment', tbx.core.blocks.ImageFormatChoiceBlock()), ('caption', wagtail.blocks.CharBlock()), ('attribution', wagtail.blocks.CharBlock(required=False))], label='Aligned image', template='patterns/molecules/streamfield/blocks/aligned_image_block.html')), ('wide_image', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock())], label='Wide image', template='patterns/molecules/streamfield/blocks/wide_image_block.html')), ('bustout', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock()), ('text', wagtail.blocks.RichTextBlock())], template='patterns/molecules/streamfield/blocks/bustout_block.html')), ('pullquote', wagtail.blocks.StructBlock([('quote', wagtail.blocks.CharBlock(form_classname='quote title')), ('attribution', wagtail.blocks.CharBlock())], template='patterns/molecules/streamfield/blocks/pullquote_block.html')), ('raw_html', wagtail.blocks.RawHTMLBlock(icon='code', label='Raw HTML', template='patterns/molecules/streamfield/blocks/raw_html_block.html')), ('mailchimp_form', wagtail.blocks.RawHTMLBlock(icon='code', label='Mailchimp embedded form', template='patterns/molecules/streamfield/blocks/mailchimp_form_block.html')), ('markdown', wagtailmarkdown.blocks.MarkdownBlock(icon='code', template='patterns/molecules/streamfield/blocks/markdown_block.html')), ('embed', wagtail.embeds.blocks.EmbedBlock(group='Media', icon='code', template='patterns/molecules/streamfield/blocks/embed_block.html')), ('video_block', wagtail.blocks.StructBlock([('video', wagtailmedia.blocks.VideoChooserBlock()), ('autoplay', wagtail.blocks.BooleanBlock(default=False, help_text='Automatically start and loop the video. Please use sparingly.', required=False)), ('use_original_width', wagtail.blocks.BooleanBlock(default=False, help_text='Use the original width of the video instead of the default content width. Note that videos wider than the content width will be limited to the content width.', required=False))], group='Media')), ('story_embed', tbx.core.blocks.ExternalStoryEmbedBlock(icon='code', template='patterns/molecules/streamfield/blocks/external_story_block.html'))], use_json_field=True), - ), - ] diff --git a/tbx/core/migrations/0147_add_mailchimp_block.py b/tbx/core/migrations/0147_add_mailchimp_block.py deleted file mode 100644 index 0720a5f51..000000000 --- a/tbx/core/migrations/0147_add_mailchimp_block.py +++ /dev/null @@ -1,24 +0,0 @@ -# Generated by Django 3.2.18 on 2023-06-21 14:06 - -from django.db import migrations -import tbx.core.blocks -import wagtail.blocks -import wagtail.embeds.blocks -import wagtail.fields -import wagtail.images.blocks -import wagtailmarkdown.blocks - - -class Migration(migrations.Migration): - - dependencies = [ - ('torchbox', '0146_alter_standardpage_additional_content'), - ] - - operations = [ - migrations.AlterField( - model_name='standardpage', - name='body', - field=wagtail.fields.StreamField([('h2', wagtail.blocks.CharBlock(form_classname='title', icon='title', template='patterns/molecules/streamfield/blocks/heading2_block.html')), ('h3', wagtail.blocks.CharBlock(form_classname='title', icon='title', template='patterns/molecules/streamfield/blocks/heading3_block.html')), ('h4', wagtail.blocks.CharBlock(form_classname='title', icon='title', template='patterns/molecules/streamfield/blocks/heading4_block.html')), ('intro', wagtail.blocks.RichTextBlock(icon='pilcrow', template='patterns/molecules/streamfield/blocks/intro_block.html')), ('paragraph', wagtail.blocks.RichTextBlock(icon='pilcrow', template='patterns/molecules/streamfield/blocks/paragraph_block.html')), ('aligned_image', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock()), ('alignment', tbx.core.blocks.ImageFormatChoiceBlock()), ('caption', wagtail.blocks.CharBlock()), ('attribution', wagtail.blocks.CharBlock(required=False))], label='Aligned image', template='patterns/molecules/streamfield/blocks/aligned_image_block.html')), ('wide_image', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock())], label='Wide image', template='patterns/molecules/streamfield/blocks/wide_image_block.html')), ('bustout', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock()), ('text', wagtail.blocks.RichTextBlock())], template='patterns/molecules/streamfield/blocks/bustout_block.html')), ('pullquote', wagtail.blocks.StructBlock([('quote', wagtail.blocks.CharBlock(form_classname='quote title')), ('attribution', wagtail.blocks.CharBlock())], template='patterns/molecules/streamfield/blocks/pullquote_block.html')), ('raw_html', wagtail.blocks.RawHTMLBlock(icon='code', label='Raw HTML', template='patterns/molecules/streamfield/blocks/raw_html_block.html')), ('mailchimp_form', wagtail.blocks.RawHTMLBlock(icon='code', label='Mailchimp embedded form', template='patterns/molecules/streamfield/blocks/mailchimp_form_block.html')), ('embed', wagtail.embeds.blocks.EmbedBlock(icon='code', template='patterns/molecules/streamfield/blocks/embed_block.html')), ('markdown', wagtailmarkdown.blocks.MarkdownBlock(icon='code', template='patterns/molecules/streamfield/blocks/markdown_block.html')), ('story_embed', tbx.core.blocks.ExternalStoryEmbedBlock(icon='code', template='patterns/molecules/streamfield/blocks/external_story_block.html'))], use_json_field=True), - ), - ] diff --git a/tbx/core/migrations/0150_add_mailchimp_block.py b/tbx/core/migrations/0150_add_mailchimp_block.py new file mode 100644 index 000000000..e7440e802 --- /dev/null +++ b/tbx/core/migrations/0150_add_mailchimp_block.py @@ -0,0 +1,179 @@ +# Generated by Django 3.2.18 on 2023-06-28 10:39 + +from django.db import migrations +import tbx.core.blocks +import wagtail.blocks +import wagtail.embeds.blocks +import wagtail.fields +import wagtail.images.blocks +import wagtailmarkdown.blocks +import wagtailmedia.blocks + + +class Migration(migrations.Migration): + + dependencies = [ + ("torchbox", "0149_add_video_block"), + ] + + operations = [ + migrations.AlterField( + model_name="standardpage", + name="body", + field=wagtail.fields.StreamField( + [ + ( + "h2", + wagtail.blocks.CharBlock( + form_classname="title", + icon="title", + template="patterns/molecules/streamfield/blocks/heading2_block.html", + ), + ), + ( + "h3", + wagtail.blocks.CharBlock( + form_classname="title", + icon="title", + template="patterns/molecules/streamfield/blocks/heading3_block.html", + ), + ), + ( + "h4", + wagtail.blocks.CharBlock( + form_classname="title", + icon="title", + template="patterns/molecules/streamfield/blocks/heading4_block.html", + ), + ), + ( + "intro", + wagtail.blocks.RichTextBlock( + icon="pilcrow", + template="patterns/molecules/streamfield/blocks/intro_block.html", + ), + ), + ( + "paragraph", + wagtail.blocks.RichTextBlock( + icon="pilcrow", + template="patterns/molecules/streamfield/blocks/paragraph_block.html", + ), + ), + ( + "aligned_image", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock()), + ("alignment", tbx.core.blocks.ImageFormatChoiceBlock()), + ("caption", wagtail.blocks.CharBlock()), + ( + "attribution", + wagtail.blocks.CharBlock(required=False), + ), + ], + label="Aligned image", + template="patterns/molecules/streamfield/blocks/aligned_image_block.html", + ), + ), + ( + "wide_image", + wagtail.blocks.StructBlock( + [("image", wagtail.images.blocks.ImageChooserBlock())], + label="Wide image", + template="patterns/molecules/streamfield/blocks/wide_image_block.html", + ), + ), + ( + "bustout", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock()), + ("text", wagtail.blocks.RichTextBlock()), + ], + template="patterns/molecules/streamfield/blocks/bustout_block.html", + ), + ), + ( + "pullquote", + wagtail.blocks.StructBlock( + [ + ( + "quote", + wagtail.blocks.CharBlock( + form_classname="quote title" + ), + ), + ("attribution", wagtail.blocks.CharBlock()), + ], + template="patterns/molecules/streamfield/blocks/pullquote_block.html", + ), + ), + ( + "raw_html", + wagtail.blocks.RawHTMLBlock( + icon="code", + label="Raw HTML", + template="patterns/molecules/streamfield/blocks/raw_html_block.html", + ), + ), + ( + "mailchimp_form", + wagtail.blocks.RawHTMLBlock( + icon="code", + label="Mailchimp embedded form", + template="patterns/molecules/streamfield/blocks/mailchimp_form_block.html", + ), + ), + ( + "markdown", + wagtailmarkdown.blocks.MarkdownBlock( + icon="code", + template="patterns/molecules/streamfield/blocks/markdown_block.html", + ), + ), + ( + "embed", + wagtail.embeds.blocks.EmbedBlock( + group="Media", + icon="code", + template="patterns/molecules/streamfield/blocks/embed_block.html", + ), + ), + ( + "video_block", + wagtail.blocks.StructBlock( + [ + ("video", wagtailmedia.blocks.VideoChooserBlock()), + ( + "autoplay", + wagtail.blocks.BooleanBlock( + default=False, + help_text="Automatically start and loop the video. Please use sparingly.", + required=False, + ), + ), + ( + "use_original_width", + wagtail.blocks.BooleanBlock( + default=False, + help_text="Use the original width of the video instead of the default content width. Note that videos wider than the content width will be limited to the content width.", + required=False, + ), + ), + ], + group="Media", + ), + ), + ( + "story_embed", + tbx.core.blocks.ExternalStoryEmbedBlock( + icon="code", + template="patterns/molecules/streamfield/blocks/external_story_block.html", + ), + ), + ], + use_json_field=True, + ), + ), + ] diff --git a/tbx/core/migrations/0150_merge_0147_add_mailchimp_block_0149_add_video_block.py b/tbx/core/migrations/0150_merge_0147_add_mailchimp_block_0149_add_video_block.py deleted file mode 100644 index e95228cf8..000000000 --- a/tbx/core/migrations/0150_merge_0147_add_mailchimp_block_0149_add_video_block.py +++ /dev/null @@ -1,14 +0,0 @@ -# Generated by Django 3.2.18 on 2023-06-27 08:21 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('torchbox', '0147_add_mailchimp_block'), - ('torchbox', '0149_add_video_block'), - ] - - operations = [ - ] diff --git a/tbx/core/migrations/0151_alter_standardpage_body.py b/tbx/core/migrations/0151_alter_standardpage_body.py deleted file mode 100644 index 2fdf59919..000000000 --- a/tbx/core/migrations/0151_alter_standardpage_body.py +++ /dev/null @@ -1,25 +0,0 @@ -# Generated by Django 3.2.18 on 2023-06-27 08:37 - -from django.db import migrations -import tbx.core.blocks -import wagtail.blocks -import wagtail.embeds.blocks -import wagtail.fields -import wagtail.images.blocks -import wagtailmarkdown.blocks -import wagtailmedia.blocks - - -class Migration(migrations.Migration): - - dependencies = [ - ('torchbox', '0150_merge_0147_add_mailchimp_block_0149_add_video_block'), - ] - - operations = [ - migrations.AlterField( - model_name='standardpage', - name='body', - field=wagtail.fields.StreamField([('h2', wagtail.blocks.CharBlock(form_classname='title', icon='title', template='patterns/molecules/streamfield/blocks/heading2_block.html')), ('h3', wagtail.blocks.CharBlock(form_classname='title', icon='title', template='patterns/molecules/streamfield/blocks/heading3_block.html')), ('h4', wagtail.blocks.CharBlock(form_classname='title', icon='title', template='patterns/molecules/streamfield/blocks/heading4_block.html')), ('intro', wagtail.blocks.RichTextBlock(icon='pilcrow', template='patterns/molecules/streamfield/blocks/intro_block.html')), ('paragraph', wagtail.blocks.RichTextBlock(icon='pilcrow', template='patterns/molecules/streamfield/blocks/paragraph_block.html')), ('aligned_image', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock()), ('alignment', tbx.core.blocks.ImageFormatChoiceBlock()), ('caption', wagtail.blocks.CharBlock()), ('attribution', wagtail.blocks.CharBlock(required=False))], label='Aligned image', template='patterns/molecules/streamfield/blocks/aligned_image_block.html')), ('wide_image', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock())], label='Wide image', template='patterns/molecules/streamfield/blocks/wide_image_block.html')), ('bustout', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock()), ('text', wagtail.blocks.RichTextBlock())], template='patterns/molecules/streamfield/blocks/bustout_block.html')), ('pullquote', wagtail.blocks.StructBlock([('quote', wagtail.blocks.CharBlock(form_classname='quote title')), ('attribution', wagtail.blocks.CharBlock())], template='patterns/molecules/streamfield/blocks/pullquote_block.html')), ('raw_html', wagtail.blocks.RawHTMLBlock(icon='code', label='Raw HTML', template='patterns/molecules/streamfield/blocks/raw_html_block.html')), ('mailchimp_form', wagtail.blocks.RawHTMLBlock(icon='code', label='Mailchimp embedded form', template='patterns/molecules/streamfield/blocks/mailchimp_form_block.html')), ('markdown', wagtailmarkdown.blocks.MarkdownBlock(icon='code', template='patterns/molecules/streamfield/blocks/markdown_block.html')), ('embed', wagtail.embeds.blocks.EmbedBlock(group='Media', icon='code', template='patterns/molecules/streamfield/blocks/embed_block.html')), ('video_block', wagtail.blocks.StructBlock([('video', wagtailmedia.blocks.VideoChooserBlock()), ('autoplay', wagtail.blocks.BooleanBlock(default=False, help_text='Automatically start and loop the video. Please use sparingly.', required=False)), ('use_original_width', wagtail.blocks.BooleanBlock(default=False, help_text='Use the original width of the video instead of the default content width. Note that videos wider than the content width will be limited to the content width.', required=False))], group='Media')), ('story_embed', tbx.core.blocks.ExternalStoryEmbedBlock(icon='code', template='patterns/molecules/streamfield/blocks/external_story_block.html'))], use_json_field=True), - ), - ] diff --git a/tbx/work/migrations/0027_add_mailchimp_block.py b/tbx/work/migrations/0027_add_mailchimp_block.py deleted file mode 100644 index 51c5d376f..000000000 --- a/tbx/work/migrations/0027_add_mailchimp_block.py +++ /dev/null @@ -1,24 +0,0 @@ -# Generated by Django 3.2.18 on 2023-06-21 14:06 - -from django.db import migrations -import tbx.core.blocks -import wagtail.blocks -import wagtail.embeds.blocks -import wagtail.fields -import wagtail.images.blocks -import wagtailmarkdown.blocks - - -class Migration(migrations.Migration): - - dependencies = [ - ('work', '0026_alter_workpage_body'), - ] - - operations = [ - migrations.AlterField( - model_name='workpage', - name='body', - field=wagtail.fields.StreamField([('h2', wagtail.blocks.CharBlock(form_classname='title', icon='title', template='patterns/molecules/streamfield/blocks/heading2_block.html')), ('h3', wagtail.blocks.CharBlock(form_classname='title', icon='title', template='patterns/molecules/streamfield/blocks/heading3_block.html')), ('h4', wagtail.blocks.CharBlock(form_classname='title', icon='title', template='patterns/molecules/streamfield/blocks/heading4_block.html')), ('intro', wagtail.blocks.RichTextBlock(icon='pilcrow', template='patterns/molecules/streamfield/blocks/intro_block.html')), ('paragraph', wagtail.blocks.RichTextBlock(icon='pilcrow', template='patterns/molecules/streamfield/blocks/paragraph_block.html')), ('aligned_image', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock()), ('alignment', tbx.core.blocks.ImageFormatChoiceBlock()), ('caption', wagtail.blocks.CharBlock()), ('attribution', wagtail.blocks.CharBlock(required=False))], label='Aligned image', template='patterns/molecules/streamfield/blocks/aligned_image_block.html')), ('wide_image', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock())], label='Wide image', template='patterns/molecules/streamfield/blocks/wide_image_block.html')), ('bustout', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock()), ('text', wagtail.blocks.RichTextBlock())], template='patterns/molecules/streamfield/blocks/bustout_block.html')), ('pullquote', wagtail.blocks.StructBlock([('quote', wagtail.blocks.CharBlock(form_classname='quote title')), ('attribution', wagtail.blocks.CharBlock())], template='patterns/molecules/streamfield/blocks/pullquote_block.html')), ('raw_html', wagtail.blocks.RawHTMLBlock(icon='code', label='Raw HTML', template='patterns/molecules/streamfield/blocks/raw_html_block.html')), ('mailchimp_form', wagtail.blocks.RawHTMLBlock(icon='code', label='Mailchimp embedded form', template='patterns/molecules/streamfield/blocks/mailchimp_form_block.html')), ('embed', wagtail.embeds.blocks.EmbedBlock(icon='code', template='patterns/molecules/streamfield/blocks/embed_block.html')), ('markdown', wagtailmarkdown.blocks.MarkdownBlock(icon='code', template='patterns/molecules/streamfield/blocks/markdown_block.html')), ('story_embed', tbx.core.blocks.ExternalStoryEmbedBlock(icon='code', template='patterns/molecules/streamfield/blocks/external_story_block.html'))], use_json_field=True), - ), - ] diff --git a/tbx/work/migrations/0029_add_mailchimp_block.py b/tbx/work/migrations/0029_add_mailchimp_block.py new file mode 100644 index 000000000..db6792eef --- /dev/null +++ b/tbx/work/migrations/0029_add_mailchimp_block.py @@ -0,0 +1,179 @@ +# Generated by Django 3.2.18 on 2023-06-28 10:39 + +from django.db import migrations +import tbx.core.blocks +import wagtail.blocks +import wagtail.embeds.blocks +import wagtail.fields +import wagtail.images.blocks +import wagtailmarkdown.blocks +import wagtailmedia.blocks + + +class Migration(migrations.Migration): + + dependencies = [ + ("work", "0028_add_video_block"), + ] + + operations = [ + migrations.AlterField( + model_name="workpage", + name="body", + field=wagtail.fields.StreamField( + [ + ( + "h2", + wagtail.blocks.CharBlock( + form_classname="title", + icon="title", + template="patterns/molecules/streamfield/blocks/heading2_block.html", + ), + ), + ( + "h3", + wagtail.blocks.CharBlock( + form_classname="title", + icon="title", + template="patterns/molecules/streamfield/blocks/heading3_block.html", + ), + ), + ( + "h4", + wagtail.blocks.CharBlock( + form_classname="title", + icon="title", + template="patterns/molecules/streamfield/blocks/heading4_block.html", + ), + ), + ( + "intro", + wagtail.blocks.RichTextBlock( + icon="pilcrow", + template="patterns/molecules/streamfield/blocks/intro_block.html", + ), + ), + ( + "paragraph", + wagtail.blocks.RichTextBlock( + icon="pilcrow", + template="patterns/molecules/streamfield/blocks/paragraph_block.html", + ), + ), + ( + "aligned_image", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock()), + ("alignment", tbx.core.blocks.ImageFormatChoiceBlock()), + ("caption", wagtail.blocks.CharBlock()), + ( + "attribution", + wagtail.blocks.CharBlock(required=False), + ), + ], + label="Aligned image", + template="patterns/molecules/streamfield/blocks/aligned_image_block.html", + ), + ), + ( + "wide_image", + wagtail.blocks.StructBlock( + [("image", wagtail.images.blocks.ImageChooserBlock())], + label="Wide image", + template="patterns/molecules/streamfield/blocks/wide_image_block.html", + ), + ), + ( + "bustout", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock()), + ("text", wagtail.blocks.RichTextBlock()), + ], + template="patterns/molecules/streamfield/blocks/bustout_block.html", + ), + ), + ( + "pullquote", + wagtail.blocks.StructBlock( + [ + ( + "quote", + wagtail.blocks.CharBlock( + form_classname="quote title" + ), + ), + ("attribution", wagtail.blocks.CharBlock()), + ], + template="patterns/molecules/streamfield/blocks/pullquote_block.html", + ), + ), + ( + "raw_html", + wagtail.blocks.RawHTMLBlock( + icon="code", + label="Raw HTML", + template="patterns/molecules/streamfield/blocks/raw_html_block.html", + ), + ), + ( + "mailchimp_form", + wagtail.blocks.RawHTMLBlock( + icon="code", + label="Mailchimp embedded form", + template="patterns/molecules/streamfield/blocks/mailchimp_form_block.html", + ), + ), + ( + "markdown", + wagtailmarkdown.blocks.MarkdownBlock( + icon="code", + template="patterns/molecules/streamfield/blocks/markdown_block.html", + ), + ), + ( + "embed", + wagtail.embeds.blocks.EmbedBlock( + group="Media", + icon="code", + template="patterns/molecules/streamfield/blocks/embed_block.html", + ), + ), + ( + "video_block", + wagtail.blocks.StructBlock( + [ + ("video", wagtailmedia.blocks.VideoChooserBlock()), + ( + "autoplay", + wagtail.blocks.BooleanBlock( + default=False, + help_text="Automatically start and loop the video. Please use sparingly.", + required=False, + ), + ), + ( + "use_original_width", + wagtail.blocks.BooleanBlock( + default=False, + help_text="Use the original width of the video instead of the default content width. Note that videos wider than the content width will be limited to the content width.", + required=False, + ), + ), + ], + group="Media", + ), + ), + ( + "story_embed", + tbx.core.blocks.ExternalStoryEmbedBlock( + icon="code", + template="patterns/molecules/streamfield/blocks/external_story_block.html", + ), + ), + ], + use_json_field=True, + ), + ), + ] diff --git a/tbx/work/migrations/0029_merge_0027_add_mailchimp_block_0028_add_video_block.py b/tbx/work/migrations/0029_merge_0027_add_mailchimp_block_0028_add_video_block.py deleted file mode 100644 index a7deb6817..000000000 --- a/tbx/work/migrations/0029_merge_0027_add_mailchimp_block_0028_add_video_block.py +++ /dev/null @@ -1,14 +0,0 @@ -# Generated by Django 3.2.18 on 2023-06-27 08:22 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('work', '0027_add_mailchimp_block'), - ('work', '0028_add_video_block'), - ] - - operations = [ - ] diff --git a/tbx/work/migrations/0030_alter_workpage_body.py b/tbx/work/migrations/0030_alter_workpage_body.py deleted file mode 100644 index 7f78966bd..000000000 --- a/tbx/work/migrations/0030_alter_workpage_body.py +++ /dev/null @@ -1,25 +0,0 @@ -# Generated by Django 3.2.18 on 2023-06-27 08:37 - -from django.db import migrations -import tbx.core.blocks -import wagtail.blocks -import wagtail.embeds.blocks -import wagtail.fields -import wagtail.images.blocks -import wagtailmarkdown.blocks -import wagtailmedia.blocks - - -class Migration(migrations.Migration): - - dependencies = [ - ('work', '0029_merge_0027_add_mailchimp_block_0028_add_video_block'), - ] - - operations = [ - migrations.AlterField( - model_name='workpage', - name='body', - field=wagtail.fields.StreamField([('h2', wagtail.blocks.CharBlock(form_classname='title', icon='title', template='patterns/molecules/streamfield/blocks/heading2_block.html')), ('h3', wagtail.blocks.CharBlock(form_classname='title', icon='title', template='patterns/molecules/streamfield/blocks/heading3_block.html')), ('h4', wagtail.blocks.CharBlock(form_classname='title', icon='title', template='patterns/molecules/streamfield/blocks/heading4_block.html')), ('intro', wagtail.blocks.RichTextBlock(icon='pilcrow', template='patterns/molecules/streamfield/blocks/intro_block.html')), ('paragraph', wagtail.blocks.RichTextBlock(icon='pilcrow', template='patterns/molecules/streamfield/blocks/paragraph_block.html')), ('aligned_image', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock()), ('alignment', tbx.core.blocks.ImageFormatChoiceBlock()), ('caption', wagtail.blocks.CharBlock()), ('attribution', wagtail.blocks.CharBlock(required=False))], label='Aligned image', template='patterns/molecules/streamfield/blocks/aligned_image_block.html')), ('wide_image', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock())], label='Wide image', template='patterns/molecules/streamfield/blocks/wide_image_block.html')), ('bustout', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock()), ('text', wagtail.blocks.RichTextBlock())], template='patterns/molecules/streamfield/blocks/bustout_block.html')), ('pullquote', wagtail.blocks.StructBlock([('quote', wagtail.blocks.CharBlock(form_classname='quote title')), ('attribution', wagtail.blocks.CharBlock())], template='patterns/molecules/streamfield/blocks/pullquote_block.html')), ('raw_html', wagtail.blocks.RawHTMLBlock(icon='code', label='Raw HTML', template='patterns/molecules/streamfield/blocks/raw_html_block.html')), ('mailchimp_form', wagtail.blocks.RawHTMLBlock(icon='code', label='Mailchimp embedded form', template='patterns/molecules/streamfield/blocks/mailchimp_form_block.html')), ('markdown', wagtailmarkdown.blocks.MarkdownBlock(icon='code', template='patterns/molecules/streamfield/blocks/markdown_block.html')), ('embed', wagtail.embeds.blocks.EmbedBlock(group='Media', icon='code', template='patterns/molecules/streamfield/blocks/embed_block.html')), ('video_block', wagtail.blocks.StructBlock([('video', wagtailmedia.blocks.VideoChooserBlock()), ('autoplay', wagtail.blocks.BooleanBlock(default=False, help_text='Automatically start and loop the video. Please use sparingly.', required=False)), ('use_original_width', wagtail.blocks.BooleanBlock(default=False, help_text='Use the original width of the video instead of the default content width. Note that videos wider than the content width will be limited to the content width.', required=False))], group='Media')), ('story_embed', tbx.core.blocks.ExternalStoryEmbedBlock(icon='code', template='patterns/molecules/streamfield/blocks/external_story_block.html'))], use_json_field=True), - ), - ]