Skip to content

Commit

Permalink
hero fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mwvolo committed Jul 15, 2024
1 parent 6ab2a08 commit 6c4d003
Show file tree
Hide file tree
Showing 3 changed files with 366 additions and 14 deletions.
165 changes: 165 additions & 0 deletions pages/migrations/0106_alter_rootpage_body.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
# Generated by Django 5.0.7 on 2024-07-12 21:02

import pages.custom_blocks
import wagtail.blocks
import wagtail.documents.blocks
import wagtail.fields
from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
("pages", "0105_alter_rootpage_body"),
]

operations = [
migrations.AlterField(
model_name="rootpage",
name="body",
field=wagtail.fields.StreamField(
[
(
"hero",
wagtail.blocks.StructBlock(
[
("text", pages.custom_blocks.APIRichTextBlock()),
("image", pages.custom_blocks.APIImageChooserBlock(required=False)),
(
"cta",
wagtail.blocks.ListBlock(
wagtail.blocks.StructBlock(
[
("text", wagtail.blocks.CharBlock(required=False)),
("aria_label", wagtail.blocks.CharBlock(required=False)),
(
"target",
wagtail.blocks.StreamBlock(
[
("external", wagtail.blocks.URLBlock(required=False)),
(
"internal",
wagtail.blocks.PageChooserBlock(required=False),
),
(
"document",
wagtail.documents.blocks.DocumentChooserBlock(
required=False
),
),
],
required=False,
),
),
],
required=False,
),
label="Calls to Action",
max_num=2,
),
),
(
"config",
wagtail.blocks.StreamBlock(
[
(
"alignment",
wagtail.blocks.ChoiceBlock(
choices=[
("left", "Left"),
("right", "Right"),
("topLeft", "Top Left"),
("topRight", "Top Right"),
("bottomLeft", "Bottom Left"),
("bottomRight", "Bottom Right"),
]
),
),
(
"size",
wagtail.blocks.ChoiceBlock(
choices=[
("auto", "Auto"),
("curtain", "Curtain"),
("cover", "Cover"),
]
),
),
],
max_num=2,
),
),
]
),
),
(
"section",
wagtail.blocks.StreamBlock(
[
(
"cards",
wagtail.blocks.StructBlock(
[
("text", pages.custom_blocks.APIRichTextBlock()),
(
"cta",
wagtail.blocks.StructBlock(
[
("text", wagtail.blocks.CharBlock(required=False)),
("aria_label", wagtail.blocks.CharBlock(required=False)),
(
"target",
wagtail.blocks.StreamBlock(
[
(
"external",
wagtail.blocks.URLBlock(required=False),
),
(
"internal",
wagtail.blocks.PageChooserBlock(required=False),
),
(
"document",
wagtail.documents.blocks.DocumentChooserBlock(
required=False
),
),
],
required=False,
),
),
],
label="CTA",
required=False,
),
),
(
"config",
wagtail.blocks.StreamBlock(
[
(
"corner_style",
wagtail.blocks.ChoiceBlock(
choices=[("rounded", "Rounded"), ("square", "Square")]
),
)
],
max_num=1,
),
),
]
),
),
("text", pages.custom_blocks.APIRichTextBlock()),
("html", wagtail.blocks.RawHTMLBlock()),
],
icon="form",
),
),
("html", wagtail.blocks.RawHTMLBlock()),
],
use_json_field=True,
),
),
]
181 changes: 181 additions & 0 deletions pages/migrations/0107_alter_rootpage_body.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,181 @@
# Generated by Django 5.0.7 on 2024-07-15 14:25

import pages.custom_blocks
import wagtail.blocks
import wagtail.documents.blocks
import wagtail.fields
from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
("pages", "0106_alter_rootpage_body"),
]

operations = [
migrations.AlterField(
model_name="rootpage",
name="body",
field=wagtail.fields.StreamField(
[
(
"hero",
wagtail.blocks.StructBlock(
[
("text", pages.custom_blocks.APIRichTextBlock()),
("image", pages.custom_blocks.APIImageChooserBlock(required=False)),
(
"cta",
wagtail.blocks.ListBlock(
wagtail.blocks.StructBlock(
[
("text", wagtail.blocks.CharBlock(required=False)),
("aria_label", wagtail.blocks.CharBlock(required=False)),
(
"target",
wagtail.blocks.StreamBlock(
[
("external", wagtail.blocks.URLBlock(required=False)),
(
"internal",
wagtail.blocks.PageChooserBlock(required=False),
),
(
"document",
wagtail.documents.blocks.DocumentChooserBlock(
required=False
),
),
],
required=False,
),
),
],
required=False,
),
label="Calls to Action",
max_num=2,
),
),
(
"config",
wagtail.blocks.StreamBlock(
[
(
"image_alignment",
wagtail.blocks.ChoiceBlock(
choices=[
("left", "Left"),
("right", "Right"),
("topLeft", "Top Left"),
("topRight", "Top Right"),
("bottomLeft", "Bottom Left"),
("bottomRight", "Bottom Right"),
]
),
),
(
"image_size",
wagtail.blocks.ChoiceBlock(
choices=[
("auto", "Auto"),
("contain", "Contain"),
("cover", "Cover"),
]
),
),
],
max_num=2,
required=False,
),
),
]
),
),
(
"section",
wagtail.blocks.StreamBlock(
[
(
"cards",
wagtail.blocks.StreamBlock(
[
(
"card",
wagtail.blocks.StructBlock(
[
("text", pages.custom_blocks.APIRichTextBlock()),
(
"cta",
wagtail.blocks.StructBlock(
[
("text", wagtail.blocks.CharBlock(required=False)),
(
"aria_label",
wagtail.blocks.CharBlock(required=False),
),
(
"target",
wagtail.blocks.StreamBlock(
[
(
"external",
wagtail.blocks.URLBlock(
required=False
),
),
(
"internal",
wagtail.blocks.PageChooserBlock(
required=False
),
),
(
"document",
wagtail.documents.blocks.DocumentChooserBlock(
required=False
),
),
],
required=False,
),
),
],
label="Calls to Action",
required=False,
),
),
]
),
),
(
"config",
wagtail.blocks.StreamBlock(
[
(
"corner_style",
wagtail.blocks.ChoiceBlock(
choices=[("rounded", "Rounded"), ("square", "Square")]
),
)
],
max_num=1,
required=False,
),
),
]
),
),
("text", pages.custom_blocks.APIRichTextBlock()),
("html", wagtail.blocks.RawHTMLBlock()),
],
icon="form",
),
),
("html", wagtail.blocks.RawHTMLBlock()),
],
use_json_field=True,
),
),
]
Loading

0 comments on commit 6c4d003

Please sign in to comment.