Skip to content

Commit 3b4280f

Browse files
authored
Well Layout/Heading Style + Cards Layout configs; wire up Accordion block (#1740)
* Add Layout config (stack/wrap) to the Well block Companion to flex-pages #(well-wrap-layout branch). Lets editors lay a well's content out as a wrapping row (e.g. a line of Big Numbers) instead of only ever stacking it, without a page-specific CSS hack. * Add accordion StructBlock — flex-page renderer has no CMS wiring yet flex-page-renderer's Accordion component (type 'accordion') expects {items: [{header, content, id}], config: [...]}. The only block registered here under a similar name is the legacy 'faq' StreamBlock (FAQBlock: question/slug/answer/document/content, no config at all), which was the renderer's block before it was renamed to 'accordion' on 2026-06-09 (flex-pages 2d29829) — that rename never got a matching CMS-side change, so there has been no way to author a working Accordion block through the CMS since. This adds a new 'accordion' StructBlock alongside the existing (now stale) 'faq' entry, matching the renderer's current item shape and full config set (heading_level, allow_multiple, accent_color, accent_colors, top_border_color — the last two new in this batch). Left 'faq' in place rather than removing it: existing pages may still have content authored in that shape, and auditing/migrating it is a separate decision from adding accordion support. * Add Heading Style config (normal/display) to the Well block Companion to flex-pages "Add Well Heading Style config". Lets editors render a nested Text block's h6 as a large testimonial-style pull-quote instead of adding page-specific custom CSS for it. * Add Layout config (grid/masonry) to the Cards Block Companion to flex-pages "Add Cards Layout config: grid or masonry". Lets editors pick a Pinterest-style masonry layout for decorative card walls (e.g. a wall of quotes) instead of a page-specific CSS override.
1 parent 83fda6c commit 3b4280f

6 files changed

Lines changed: 6768 additions & 0 deletions

File tree

pages/custom_blocks.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,21 @@
3333
('impact', 'Impact'),
3434
]
3535

36+
CARDS_LAYOUT_CHOICES = [
37+
('grid', 'Grid'),
38+
('masonry', 'Masonry (Pinterest-style columns, packed by height)'),
39+
]
40+
41+
WELL_LAYOUT_CHOICES = [
42+
('stack', 'Stack'),
43+
('wrap', 'Wrap (side by side, reflowing to fewer per row on narrow screens)'),
44+
]
45+
46+
WELL_HEADING_STYLE_CHOICES = [
47+
('normal', 'Normal'),
48+
('display', 'Display Quote'),
49+
]
50+
3651

3752
class LinksGroupBlock(blocks.StructBlock):
3853
links = blocks.ListBlock(

0 commit comments

Comments
 (0)