{# Responsive Menu Jinja template file. NOT Safe to Copy Do Not Copy #} {% macro select(name, value, choices, class='') %} {% endmacro %} {% macro selectize(name, value, class='') %} {% endmacro %} {% macro input(name, value, class='') %} {% endmacro %} {% macro font_icon(name, value, type) %} {% endmacro %} {% macro colour(name, value) %} {% endmacro %} {% macro label(for, title) %} {% endmacro %} {% macro checkbox(name, value) %} {% endmacro %} {% macro image(name, value) %}
{% endmacro %} {% macro textarea(name, value) %} {% endmacro %} {% macro row(name, title, type, options, errors, class='', pro='', select_type='', unit_type='', sub_title='', unit='', choices=[], sub_sub_title='') %} {% import _self as macros %} {{ macros.label(name, title) }} {% if sub_title %}
{{ sub_title|raw }}
{% endif %} {% if sub_sub_title %}

{{ sub_sub_title|raw }}
{% endif %} {% if type == 'checkbox' %} {{ macros.checkbox(name, options[name]) }} {% elseif type == 'colour' %} {{ macros.colour(name, options[name]) }} {% elseif type == 'input' %} {{ macros.input(name, options[name], class) }} {% if class == 'has-unit' %} {% if unit_type == 'pixel' %} {% set choices = { 'px': 'px', '%': '%', 'em': 'em', 'rem': 'rem', 'vw': 'vw', 'vh': 'vh' } %} {{ macros.select(name ~ '_unit', options[name ~ '_unit'], choices, 'is-unit') }} {% elseif unit_type == 'pixel_auto' %} {% set choices = { 'auto': 'auto', 'px': 'px', '%': '%', 'em': 'em', 'rem': 'rem', 'vw': 'vw', 'vh': 'vh' } %} {{ macros.select(name ~ '_unit', options[name ~ '_unit'], choices, 'is-unit') }} {% elseif unit_type == 'percentage' %} {% set choices = { '%': '%', 'px': 'px', 'em': 'em', 'rem': 'rem', 'vw': 'vw', 'vh': 'vh' } %} {{ macros.select(name ~ '_unit', options[name ~ '_unit'], choices, 'is-unit') }} {% endif %} {% endif %} {% elseif type == 'textarea' %} {{ macros.textarea(name, options[name], class) }} {% elseif type == 'selectize' %} {{ macros.selectize(name, options[name], class) }} {% elseif type == 'select' %} {% if select_type == 'side' %} {% set choices = { 'top': 'Top', 'left': 'Left', 'right': 'Right', 'bottom': 'Bottom' } %} {{ macros.select(name, options[name], choices) }} {% elseif select_type == 'left_right' %} {% set choices = { 'left': 'Left', 'right': 'Right' } %} {{ macros.select(name, options[name], choices) }} {% elseif select_type == 'left_right_with_none' %} {% set choices = { '': 'None', 'left': 'Left', 'right': 'Right' } %} {{ macros.select(name, options[name], choices) }} {% elseif select_type == 'mega_standard_menu_animation' %} {% set choices = { 'none': 'None', 'fade': 'Fade', 'fadeUp': 'FadeUp', 'slideDown': 'SlideDown', 'slideUp': 'SlideUp' } %} {{ macros.select(name, options[name], choices, 'is-animation-input') }} {% set choices = { '100ms': '100ms', '200ms': '200ms', '300ms': '300ms', '400ms': '400ms', '500ms': '500ms', '600ms': '600ms', '700ms': '700ms', '800ms': '800ms', '900ms': '900ms', '1000ms': '1000ms', } %} {{ macros.select(name ~ '_speed', options[name ~ '_speed'], choices, 'is-animation-input') }} {% elseif select_type == 'left_right_centre_with_none' %} {% set choices = { '': 'None', 'left': 'Left', 'right': 'Right', 'centre': 'Centre' } %} {{ macros.select(name, options[name], choices) }} {% elseif select_type == 'position' %} {% elseif select_type == 'animation' %} {% set choices = { 'slide': 'Slide', 'push': 'Push', 'fade': 'Fade' } %} {{ macros.select(name, options[name], choices) }} {% elseif select_type == 'depth' %} {% set choices = { '1': '1', '2': '2', '3': '3', '4': '4', '5': '5' } %} {{ macros.select(name, options[name], choices) }} {% elseif select_type == 'alignment' %} {% set choices = { 'left': 'Left', 'right': 'Right', 'center': 'Centered', 'justify': 'Justified' } %} {{ macros.select(name, options[name], choices) }} {% elseif select_type == 'link_locations' %} {% set choices = { '_blank': 'New Tab', '_self': 'Same Page', '_parent': 'Parent Page', '_top': 'Full Window Body' } %} {{ macros.select(name, options[name], choices) }} {% elseif select_type == 'custom' %} {{ macros.select(name, options[name], choices) }} {% elseif select_type == 'button_animation' %} {% set choices = { 'off': 'Off', 'boring': 'Boring', '3dx': '3DX', '3dx-r': '3DX Reverse', '3dy': '3DY', '3dy-r': '3DY Reverse', 'arrow': 'Arrow', 'arrow-r': 'Arrow Reverse', 'arrowalt': 'Arrow Alt', 'arrowalt-r': 'Arrow Alt Reverse', 'collapse': 'Collapse', 'collapse-r': 'Collapse Reverse', 'elastic': 'Elastic', 'elastic-r': 'Elastic Reverse', 'emphatic': 'Emphatic', 'emphatic-r': 'Emphatic Reverse', 'minus': 'Minus', 'slider': 'Slider', 'slider-r': 'Slider Reverse', 'spin': 'Spin', 'spin-r': 'Spin Reverse', 'spring': 'Spring', 'spring-r': 'Spring Reverse', 'stand': 'Stand', 'stand-r': 'Stand Reverse', 'squeeze': 'Squeeze', 'vortex': 'Vortex', 'vortex-r': 'Vortex Reverse' } %} {{ macros.select(name, options[name], choices) }} {% elseif select_type == 'theme' %} {% set choices = { 'dark': 'Dark', 'light': 'Light' } %} {{ macros.select(name, options[name], choices) }} {% elseif select_type == 'menu_theme' %} {% set themes = get_available_themes() %} {% set choices = [] %} {% for theme, config in themes %} {% set choices = choices|merge({(theme): config.name ~ ' (' ~ theme ~ ')'}) %} {% endfor %} {{ macros.select(name, options[name], choices) }} {% endif %} {% elseif type == 'image' %} {{ macros.image(name, options[name]) }} {% elseif type == 'font-icon' %} {{ macros.font_icon(name, options[name], options[name ~ '_type']) }} {% endif %} {% if unit %} {{ unit }} {% endif %} {% endmacro %} {% macro header(title, section) %}
{{ title }} {{ section }}
{% endmacro %}