Example #1
0
class StoryBlock(StreamBlock):
    h2 = CharBlock(icon="title", classname="title")
    h3 = CharBlock(icon="title", classname="title")
    h4 = CharBlock(icon="title", classname="title")
    intro = RichTextBlock(icon="pilcrow")
    paragraph = RichTextBlock(icon="pilcrow")
    aligned_image = ImageBlock(label="Aligned image")
    bustout = BustoutBlock()
    pullquote = PullQuoteBlock()
    raw_html = RawHTMLBlock(label='Raw HTML', icon="code")
    embed = EmbedBlock(icon="code")
Example #2
0
class ImageBlock(StructBlock):
    image = ImageChooserBlock()
    alignment = ImageFormatChoiceBlock()
    caption = CharBlock(required=False)
    overlay_text = RichTextBlock(required=False)
    attribution = CharBlock(required=False)
    extra_classes = CharBlock(required=False)

    class Meta:
        icon = "image"
Example #3
0
class GridBlocks(StreamBlock):
    text_block = RichTextBlock(icon="pilcrow")
    aligned_image = ImageBlock(label="Aligned image",
                               template="blocks/aligned_image_block.html")
    image_collection = ImageCollection(
        label="Image collection",
        template="blocks/image_collection_block.html")
    pullquote = PullQuoteBlock(template="blocks/pullquote_block.html")
    raw_html = RawHTMLBlock(label='Raw HTML',
                            icon="code",
                            template="blocks/raw_html_block.html")
    embed = EmbedBlock(icon="code", template="blocks/embed_block.html")
    chart_block = ChartBlock(template="blocks/chart_block.html", icon="image")
    table_block = TableBlock(template="blocks/table_block.html",
                             icon="list-ol")
Example #4
0
class StoryBlock(StreamBlock):
    intro = RichTextBlock(template="blocks/intro_block.html", icon="pilcrow")
    paragraph = ParagraphBlock(template="blocks/paragraph_block.html",
                               icon="pilcrow")
    aligned_image = ImageBlock(label="Aligned image",
                               template="blocks/aligned_image_block.html")
    image_collection = ImageCollection(
        label="Image collection",
        template="blocks/image_collection_block.html")
    pullquote = PullQuoteBlock(template="blocks/pullquote_block.html")
    raw_html = RawHTMLBlock(label='Raw HTML',
                            icon="code",
                            template="blocks/raw_html_block.html")
    embed = EmbedBlock(icon="code", template="blocks/embed_block.html")
    grid_block = GridBlock(template="blocks/grid_block.html")
    chart_block = ChartBlock(template="blocks/chart_block.html")
    table_block = TableBlock(template="blocks/table_block.html")
Example #5
0
class BustoutBlock(StructBlock):
    image = ImageChooserBlock()
    text = RichTextBlock()

    class Meta:
        icon = "pick"
Example #6
0
class ParagraphBlock(StructBlock):
    paragraph = RichTextBlock()
    extra_classes = CharBlock(required=False)