Skip to content

Commit

Permalink
global navigation and homepage hero
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahframe committed May 8, 2024
1 parent 36d11e5 commit 01cd435
Show file tree
Hide file tree
Showing 15 changed files with 2,293 additions and 83 deletions.
216 changes: 216 additions & 0 deletions cdhweb/blog/migrations/0004_alter_blogpost_body.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,216 @@
# Generated by Django 5.0.5 on 2024-05-07 21:20

import wagtail.blocks
import wagtail.documents.blocks
import wagtail.embeds.blocks
import wagtail.fields
import wagtail.images.blocks
from django.db import migrations


class Migration(migrations.Migration):
dependencies = [
("blog", "0003_alter_blogpost_body"),
]

operations = [
migrations.AlterField(
model_name="blogpost",
name="body",
field=wagtail.fields.StreamField(
[
(
"paragraph",
wagtail.blocks.RichTextBlock(
features=[
"h2",
"h3",
"h4",
"bold",
"italic",
"link",
"ol",
"ul",
"hr",
"blockquote",
"superscript",
"subscript",
"strikethrough",
"code",
]
),
),
(
"image",
wagtail.blocks.StructBlock(
[
("image", wagtail.images.blocks.ImageChooserBlock()),
(
"alternative_text",
wagtail.blocks.TextBlock(
help_text="Alternative text for visually impaired users to\nbriefly communicate the intended message of the image in this context.",
required=True,
),
),
(
"caption",
wagtail.blocks.RichTextBlock(
features=[
"bold",
"italic",
"link",
"superscript",
],
required=False,
),
),
]
),
),
(
"svg_image",
wagtail.blocks.StructBlock(
[
(
"image",
wagtail.documents.blocks.DocumentChooserBlock(),
),
(
"alternative_text",
wagtail.blocks.TextBlock(
help_text="Alternative text for visually impaired users to\nbriefly communicate the intended message of the image in this context.",
required=True,
),
),
(
"caption",
wagtail.blocks.RichTextBlock(
features=[
"bold",
"italic",
"link",
"superscript",
],
required=False,
),
),
(
"extended_description",
wagtail.blocks.RichTextBlock(
features=["p"],
help_text="This text will only be read to non-sighted users and should describe the major insights or takeaways from the graphic. Multiple paragraphs are allowed.",
required=False,
),
),
]
),
),
(
"embed",
wagtail.embeds.blocks.EmbedBlock(
help_text='For e.g. videos on YouTube, use the value in the URL bar.\n For other content, look for an "oEmbed URL" option. For videos from\n Princeton\'s Media Central, "oEmbed URL" is in the "Share" menu.'
),
),
(
"migrated",
wagtail.blocks.RichTextBlock(
features=[
"h3",
"h4",
"bold",
"italic",
"link",
"ol",
"ul",
"hr",
"blockquote",
"superscript",
"subscript",
"strikethrough",
"code",
"image",
"embed",
],
icon="warning",
),
),
(
"code",
wagtail.blocks.StructBlock(
[
(
"language",
wagtail.blocks.ChoiceBlock(
choices=[
("bash", "Bash/Shell"),
("css", "CSS"),
("diff", "diff"),
("html", "HTML"),
("javascript", "Javascript"),
("json", "JSON"),
("python", "Python"),
("scss", "SCSS"),
("yaml", "YAML"),
("django", "Django/Jinja2"),
("git", "Git"),
("go", "Go"),
(
"markup",
"Markup + HTML + XML + SVG + MathML",
),
("r", "R"),
],
help_text="Coding language",
identifier="language",
label="Language",
),
),
(
"code",
wagtail.blocks.TextBlock(
identifier="code", label="Code"
),
),
],
label="Code",
),
),
(
"cta",
wagtail.blocks.StructBlock(
[
(
"heading",
wagtail.blocks.CharBlock(
max_length=80, required=True
),
),
(
"introduction",
wagtail.blocks.TextBlock(
help_text="Max 150 characters",
max_length=150,
required=False,
),
),
(
"primary_link_text",
wagtail.blocks.CharBlock(
max_length=40, required=True
),
),
(
"secondary_link_text",
wagtail.blocks.CharBlock(
max_length=40, required=False
),
),
]
),
),
],
blank=True,
use_json_field=True,
),
),
]
Loading

0 comments on commit 01cd435

Please sign in to comment.