Skip to content

Commit

Permalink
Add a heading_tag parameter to the callout block to resolve an access…
Browse files Browse the repository at this point in the history
…ibility issue
  • Loading branch information
Ash-Crow committed Nov 27, 2023
1 parent 16bd14c commit 289cbae
Show file tree
Hide file tree
Showing 5 changed files with 459 additions and 7 deletions.
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ repos:
rev: 6.1.0
hooks:
- id: flake8
exclude: /migrations/
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
Expand Down
11 changes: 11 additions & 0 deletions content_manager/blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,20 @@ class BadgesListBlock(blocks.StreamBlock):
badge = BadgeBlock(label="Badge")


heading_choices = [
("h2", "En-tête 2"),
("h3", "En-tête 3"),
("h4", "En-tête 4"),
("h5", "En-tête 5"),
("h6", "En-tête 6"),
("p", "Paragraphe"),
]


class CalloutBlock(blocks.StructBlock):
title = blocks.CharBlock(label="Titre de la mise en vant", required=False)
text = blocks.TextBlock(label="Texte mis en avant", required=False)
heading_tag = blocks.ChoiceBlock(label="Niveau de titre", choices=heading_choices, default="h3")


class CardBlock(blocks.StructBlock):
Expand Down
Loading

0 comments on commit 289cbae

Please sign in to comment.