class WgoBlock(StructBlock): sgf = DocumentChooserBlock() alignment = WgoAlignmentChoiceBlock() width = IntegerBlock(default=700) class Meta: icon = "placeholder" template = "wgo/wgoblock.html"
class NColumnImageBlock(blocks.StructBlock): images = blocks.ListBlock(ImageBlock()) height = IntegerBlock(min_value=0, required=True, default=380) caption = RichTextMiniBlock(required=False) class Meta: template = 'article/blocks/columnar_image.html' label = 'Columnar Images'
class FeaturedSectionBlock(StructBlock): title = blocks.CharBlock(required=False) link_text = blocks.CharBlock(required=False) url = blocks.CharBlock() position_from_left = IntegerBlock( default=9, required=True, min_value=0, max_value=75, help_text="Value in percentage (Max: 75)") position_from_top = IntegerBlock(default=30, required=True, min_value=0, max_value=40, help_text="Value in percentage (Max: 40)") featured_image = ImageChooserBlock() featured_image_label = blocks.CharBlock(required=False)
class TwitterBlock(StructBlock): twitter_box_username = CharBlock(required=True) twitter_box_widget_id = CharBlock(required=True) twitter_box_tweet_limit = IntegerBlock(required=True) class Meta: icon = "cog" label = "Twitter Widget" template = "ctdata/blocks/twitter.html"
class WhitespaceBlock(StructBlockWithStyle): height = IntegerBlock() class Meta: template = 'common/blocks/whitespace_block.html' icon = 'placeholder' label = 'Whitespace Block' help_text = ('When you need to make sure that your next element(s) ' 'is on a new line from the previous elements, ' 'use this little helper block.')
class VideoWithQuoteBlock(blocks.StructBlock): video = EmbedBlock(help_text="YouTube video URL") video_height = IntegerBlock(required=True, default=270) video_caption = RichTextMiniBlock(required=False) quote = RichTextMiniBlock() align_quote = blocks.ChoiceBlock(choices=ALIGNMENT_CHOICES, default=ALIGNMENT_CHOICES[0][1]) class Meta: icon = 'openquote' label = 'Video with quote' template = 'article/blocks/video_with_block_quote.html'
class ParagraphWithEmbedBlock(blocks.StructBlock): embed = EmbedBlock() embed_caption = RichTextMiniBlock(required=False) embed_max_width = IntegerBlock( required=False, help_text="Optional field. Maximum width of the content in pixels to" " be requested from the content provider(e.g YouTube). " "If the requested width is not supported, provider will be" " supplying the content with nearest available width.") embed_align = blocks.ChoiceBlock(choices=ALIGNMENT_CHOICES, default=ALIGNMENT_CHOICES[0][0]) content = ParagraphBlock() class Meta: icon = 'media' label = 'Embed with text' template = 'article/blocks/paragraph_with_embed.html'
class ImageWithCaptionAndHeightBlock(ImageBlock): height = IntegerBlock(min_value=0, required=True, default=380) caption = RichTextMiniBlock(required=False)
class ProcessBlock(StructBlock): number = IntegerBlock(help_text='number of process') title = CharBlock(help_text='title for the block') subtitle = CharBlock() icon = CharBlock(help_text=pe_icon_help_text)
class CounterBlock(StructBlock): finish = IntegerBlock(help_text='finish counting at') text = CharBlock(help_text='what is it counting to') icon = CharBlock(help_text=ion_icon_help_text)