Example #1
0
class VideoPlayerBlock(blocks.StructBlock):
    source = CharBlock()
    poster = CharBlock(required=False)

    class Meta:
        template = 'blocks/video_player.html'
        icon = 'media'
Example #2
0
class ContactTab(blocks.StructBlock):
    name = CharBlock()
    subject_prefix = CharBlock()

    class Meta:
        template = 'blog/blocks/contact_block.html'
        label = 'Contact Us Tab. A Tab for Contact including the name of the tab'
        'And the subject prefixed before the contact\'s subject'
Example #3
0
class TabBlock(blocks.StructBlock):
    title = CharBlock(required=True)
    href = CharBlock(required=True)
    body = StreamBlock([
        ('paragraph', RichTextBlock()),
        ('image', ImageChooserBlock()),
        ('document', DocumentViewerBlock()),
        ('html', RawHTMLBlock()),
        ('audio', AudioBlock()),
        ('video', VideoPlayerBlock()),
        ('topic', TopicBlock()),
        ('post', PostBlock()),
    ])
class DocumentViewerBlock(blocks.StructBlock):
    url = CharBlock()
    page = IntegerBlock(required=False)

    class Meta:
        template = 'blocks/document.html'
        icon = 'doc-full'
class AudioBlock(blocks.StructBlock):
    url = CharBlock()
    downloadable = BooleanBlock(required=False)

    class Meta:
        template = 'blocks/audio_player.html'
        icon = 'media'
Example #6
0
class TeamTab(blocks.StructBlock):
    name = CharBlock()
    children = blocks.ListBlock(
        blocks.StructBlock([
            ('name', CharBlock()),
            ('role', CharBlock()),
            ('project_description', CharBlock()),
            ('personal_description', CharBlock()),
            ('image', ImageChooserBlock()),
            ('twitter', URLBlock(required=False)),
            ('linkedin', URLBlock(required=False)),
            ('instagram', URLBlock(required=False)),
            ('github', URLBlock(required=False)),
            ('youtube', URLBlock(required=False))
        ]),

    )

    class Meta:
        template = 'blog/blocks/team_block.html'
        label = 'Team Tab. A tab to show the team members and contributors '
Example #7
0
class LegalTab(blocks.StructBlock):
    name = CharBlock()
    body = RichTextBlock()

    class Meta:
        label = 'Legal Info Tab. Tab for legal Information such as Privacy Policy and Terms and Conditions'
        template = 'blog/blocks/legal_block.html'

# Tab / Wagtail StructBlock for Clients Carousel

    class Meta:
        label = 'Client Tab. Tab to show the clients'
Example #8
0
class AppointmentTab(blocks.StructBlock):
    name = CharBlock()

    class Meta:
        template = 'blog/blocks/appointment_block.html'
        label = 'Appointment Tab. A tab for iframe such as calendly for Appointments, The Iframe can only be changed in code for security reasons.'