Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support additional block types #3

Open
Morsey187 opened this issue May 9, 2024 · 1 comment
Open

Support additional block types #3

Morsey187 opened this issue May 9, 2024 · 1 comment

Comments

@Morsey187
Copy link

Add additonal blocks missing from the designs (you may need access to view).

    # additonal blocks to add to SectionBlocks
    image = ImageBlock()
    quote = QuoteBlock()
    accordion = AccordionBlock()   
    featured_article = FeaturedArticleBlock()
    cards = CardSectionBlock()
    plain_cards = PlainCardSectionBlock()

    # additonal field to add to NewsListingPage
    featured_card = StreamField(
         [("cta", FeaturedArticleBlock())],
         blank=True,
         max_num=1,
         help_text="Choose a featured article to display at the very top of the list.",   
    )

Will require adding templates and CSS, potentially javascript for accordions.

@jsma
Copy link

jsma commented Jan 10, 2025

Noting here that the AccordionBlock name is reused for both the container block as well as the list items it contains:

https://github.com/torchbox/wagtail-news-template/blob/9a4defdb95e06ab4dff464b80d320b9b83bb2191/project_name/utils/blocks.py#L14-L29

Perhaps the first should be renamed e.g., AccordionBlockItem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants