示例#1
0
class WgoBlock(StructBlock):
    sgf = DocumentChooserBlock()
    alignment = WgoAlignmentChoiceBlock()
    width = IntegerBlock(default=700)
    class Meta:
        icon = "placeholder"
        template = "wgo/wgoblock.html"
示例#2
0
文件: blocks.py 项目: enkaynitin/pari
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'
示例#3
0
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)
示例#4
0
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"
示例#5
0
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.')
示例#6
0
文件: blocks.py 项目: enkaynitin/pari
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'
示例#7
0
文件: blocks.py 项目: enkaynitin/pari
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'
示例#8
0
文件: blocks.py 项目: enkaynitin/pari
class ImageWithCaptionAndHeightBlock(ImageBlock):
    height = IntegerBlock(min_value=0, required=True, default=380)
    caption = RichTextMiniBlock(required=False)
示例#9
0
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)
示例#10
0
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)