Add flowdocks for text and buttons in home page

This commit is contained in:
Gonzalo Pena-Castellanos 2017-07-24 22:46:55 -05:00
parent d72cf9d04c
commit 6107595166
4 changed files with 70 additions and 0 deletions

View 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
View 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

View 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>

View 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>