{% import "Juice/macros/base.html" as base with context %} {# Bootstrap A collection of some of Bootstrap components Most of the macros must be called in your template around the content to be wrapped in {% call collapsible('My Title') %} This is the body {% endcall %} #} {# -------------------------------------------------------------------------- #} {%- macro _format_key(val, def) -%} {{- val | default(def, true) | slug -}} {%- endmacro -%} {# Collapsible {% call collapsible('title', key, collapse, parent) %} content {% endcall %} params: - title: The title of the collapsible - key: a unique to identify this collapsible - collapse: (bool) to collapse or expend the component - parent: when using 'collapsible_accordion', pass the parent id #} {% macro collapsible(title, key=none, collapse=false, parent="accordion") %}
{{ caller() }}
{% endmacro %} {# Accordion Requires the use of collapsable {% call collapsible_accordion() %} {% call collapsible('My Acc Name') %} ... content {% endcall %} {% endcall %} params: - id: a unique identifier #} {% macro collapsible_accordion(id="accordion") %}
{{ caller() }}
{% endmacro %} {# -------------------------------------------------------------------------- #} {% macro modal() %} {% endmacro %} {# -------------------------------------------------------------------------- #} {% macro panel(title, class="panel-default") %}
{{ title }}
{{ caller() }}
{% endmacro %} #------------------------------------------------------------------------------- {% macro theme(name) %} {{ base.css_assets('Juice/bootswatch/%s.css' % name) }} {% endmacro %}