Add flowdocks for text and buttons in home page
This commit is contained in:
parent
d72cf9d04c
commit
6107595166
4 changed files with 70 additions and 0 deletions
39
flowblocks/button-block.ini
Normal file
39
flowblocks/button-block.ini
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
[block]
|
||||
name = Button Block
|
||||
button_label = Button Block
|
||||
|
||||
[fields.label]
|
||||
label = Button Label
|
||||
type = string
|
||||
|
||||
[fields.link]
|
||||
label = Button link
|
||||
type = string
|
||||
|
||||
[fields.icon]
|
||||
label = Button icon
|
||||
type = select
|
||||
choices = code-fork, envelope
|
||||
choice_labels = Code fork, Envelope
|
||||
width = 1/4
|
||||
|
||||
[fields.type]
|
||||
label = Button type
|
||||
type = select
|
||||
choices = default, primary, success, info, warning, danger, link
|
||||
choice_labels = Default, Primary, Success, Info, Warning, Danger, Link
|
||||
default = Default
|
||||
width = 1/4
|
||||
|
||||
[fields.size]
|
||||
label = Button size
|
||||
type = select
|
||||
choices = lg, md, sm, xs
|
||||
choice_labels = Large, Medium, Small, Extra small
|
||||
default = Large
|
||||
width = 1/4
|
||||
|
||||
[fields.block]
|
||||
label = Is a block button?
|
||||
type = boolean
|
||||
width = 1/4
|
||||
26
flowblocks/text-block.ini
Normal file
26
flowblocks/text-block.ini
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
[block]
|
||||
name = Text Block
|
||||
button_label = Rich Text
|
||||
|
||||
[fields.title]
|
||||
label = Title
|
||||
description = Markdown
|
||||
type = markdown
|
||||
|
||||
[fields.text]
|
||||
label = Text
|
||||
description = reStructuredText
|
||||
type = rst
|
||||
|
||||
[fields.image]
|
||||
label = Image
|
||||
type = select
|
||||
source = record.attachments.images
|
||||
width = 1/4
|
||||
|
||||
[fields.image_alignment]
|
||||
label = Image Alignment
|
||||
type = select
|
||||
choices = left, right
|
||||
choice_labels = Left, Right
|
||||
width = 1/4
|
||||
3
templates/blocks/button-block.html
Normal file
3
templates/blocks/button-block.html
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
<a class="btn btn-{{ this.type }} btn-{{ this.size }} {% if this.block %}btn-block{% endif %}" href="{{ this.link }}" role="button">
|
||||
<i class="fa fa-{{ this.icon }}" aria-hidden="true"></i> {{ this.label }}
|
||||
</a>
|
||||
2
templates/blocks/text-block.html
Normal file
2
templates/blocks/text-block.html
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
{% if this.title %}<h3>{{ this.title }}</h3>{% endif %}
|
||||
<p>{% if this.image %}<p><img src="{{ this.image }}" class="hidden-sm-down pull-sm-{{ this.image_alignment }}"></p>{% endif %} {{ this.text }}</p>
|
||||
Loading…
Reference in a new issue