{%- macro accordion_wrapper(content) -%}
{{ content }}
{%- endmacro %} {%- macro account_nav(content) -%}{{ ui.nav(content, **kwargs) }}{%- endmacro %} {%- macro breadcrumb_wrapper(content) -%} {%- endmacro %} {%- macro content_action_wrapper(content) -%}{{ ui.nav(content, **kwargs) }}{%- endmacro %} {%- macro content_nav(content) -%}{{ ui.tab_wrapper(content, **kwargs) }}{%- endmacro %} {%- macro footer_main_nav(content) -%} {{ ui.nav(content, **kwargs) }} {%- endmacro %} {%- macro footer_secondary_nav(content) -%} {{ ui.nav(content, **kwargs) }} {%- endmacro %} {%- macro main_nav(content) -%}{{ ui.nav(content, _extra_class="main-nav", **kwargs) }}{%- endmacro %} {%- macro sidebar_nav(content, title=None) -%} {%- set item_kwargs = kwargs -%} {%- if title -%} {%- call ui.util.call(ui.sidebar_section, title=title) -%} {{ ui.nav(content, _extra_class="sidebar-nav nav-vertical", **item_kwargs) }} {%- endcall %} {%- else -%} {{ ui.nav(content, _extra_class="sidebar-nav nav-vertical", **item_kwargs) }} {%- endif -%} {%- endmacro %} {%- macro nav(content) -%} {%- endmacro %} {%- macro page_action_wrapper(content) -%}{{ ui.nav(content, _extra_class="page-actions", **kwargs) }}{%- endmacro %} {%- macro tab_wrapper(content) -%} {%- endmacro %} {%- macro pagination_wrapper(content) -%} {%- endmacro %} {%- macro breadcrumb(content, href=None, initial=false, active=false) -%} {{ " > " if not initial }} {%- if active -%} {{ content }} {%- else -%} {{ ui.link(content, href, **kwargs) }} {%- endif -%} {%- endmacro %} {%- macro nav_item(content, href=None, active=false) -%} {%- if active %} {{ ui.link(content, href, **kwargs) }} {%- else -%} {{ ui.link(content, href, **kwargs) }} {%- endif %} {%- endmacro %} {%- macro main_nav_item(content, href=None, active=false) -%}{{ ui.nav_item(content, href, active, **kwargs) }}{%- endmacro %} {%- macro sidebar_nav_item(content, href=None, active=false) -%}{{ ui.nav_item(content, href, active, **kwargs) }}{%- endmacro %} {%- macro account_nav_item(content, href=None, active=false) -%}{{ ui.nav_item(content, href, active, **kwargs) }}{%- endmacro %} {%- macro footer_main_nav_item(content, href=None, active=false) -%}{{ ui.nav_item(content, href, active, **kwargs) }}{%- endmacro %} {%- macro footer_secondary_nav_item(content, href=None, active=false) -%}{{ ui.nav_item(content, href, active, **kwargs) }}{%- endmacro %} {%- macro content_nav_item(content, href=None, active=false) -%}{{ ui.tab(content, href, active, **kwargs) }}{%- endmacro %} {%- macro page_action(content, href=None) -%}{{ ui.button(content, href=href, **kwargs) }}{%- endmacro %} {%- macro content_action(content, href=None) -%}{{ ui.button(content, href=href, **kwargs) }}{%- endmacro %} {%- macro pagination(page=1, total=1, url_generator=h.pager_url, padding=2, hide_edges=false, hide_siblings=false, start_label=null, end_label=null, previous_label=_("Previous"), next_label=_("Next"), padding_label="...", url_params={}) -%} {%- if total > 1 %} {%- call ui.util.call(ui.pagination_wrapper, **kwargs) -%} {%- if page > 1 and not hide_siblings %} {{ ui.link(previous_label, href=url_generator(page=page - 1, **url_params), aria={"label": _("Go to previous page")}) }} {%- endif %} {%- if page - 1 > padding %} {%- if not hide_edges -%} {{ ui.link((start_label or 1), href=url_generator(page=1, **url_params), aria={"label": _("Go to first page")}) }} {%- endif %} {%- endif %} {%- for i in range([page - padding, 1]|max, [page + padding, total]|min + 1) %} {%- if i == page %} {{ i }} {%- else %} {{ ui.link(i, href=url_generator(page=i, **url_params), aria={"label": _("Go to page {num}".format(num=i))}) }} {%- endif %} {%- endfor %} {%- if total - page > padding %} {%- if not hide_edges -%} {{ ui.link((end_label or total), href=url_generator(page=total, **url_params), aria={"label": _("Go to last page")}) }} {%- endif %} {%- endif %} {%- if page < total and not hide_siblings %} {{ ui.link(next_label, href=url_generator(page=page + 1, **url_params), aria={"label": _("Go to next page")}) }} {%- endif %} {%- endcall %} {%- endif %} {%- endmacro %} {%- macro pagination_item(content, href=None, active=false) -%} {%- if active -%} {{ content }} {%- else -%} {{ ui.link(content, href=href, aria={"label": kwargs.label or "Go to page {}".format(content) }, **kwargs) }} {%- endif -%} {%- endmacro %} {%- macro dropdown_item(content, href=None) -%}
  • {{ ui.link(content, href=href, role="menuitem", **kwargs) }}
  • {%- endmacro %} {%- macro tabbed_content(content) -%}
    {{ content }}
    {%- endmacro %} {%- macro tab_pane(content, active=false, id=None) -%}
    {{ content }}
    {%- endmacro %} {%- macro tab_pane_wrapper(content) -%}
    {{ content }}
    {%- endmacro %}