{%- macro subtitle_item(content, initial) -%} {%- do kwargs -%} {{ content }} {%- if not initial %} {{ g.template_title_delimiter }} {% endif %} {%- endmacro %} {%- macro account(content, title, subtitle, logo) -%}
{{ ui.container(content) }}
{%- endmacro %} {%- macro header_logo(href, logo, title, subtitle) -%} {% if logo -%} {{ ui.link(ui.image(h.url_for_static_or_external(logo), alt=title, aria={"label": _('Navigate to Home - {site_title}').format(site_title=title)}), href=href, attrs={"class": "logo"}) }} {%- else -%} {{ ui.link(title, href=href, **kwargs) }} {%- if subtitle -%}

{{ subtitle }}

{%- endif %} {%- endif %} {%- endmacro %} {%- macro header(content, title, subtitle, logo, href) -%}
{%- call ui.util.call(ui.container) -%} {% if g.debug and not g.debug_supress_header %}
Blueprint : {{ g.blueprint }}
View : {{ g.view }}
{% endif %} {%- endcall %}
{%- endmacro %} {%- macro footer(content) -%} {%- endmacro %} {%- macro footer_main(content) -%}
{{ content }}
{%- endmacro %} {%- macro footer_secondary(content) -%}
{{ content }}
{%- endmacro %} {%- macro language_selector() -%} {% set current_lang = request.environ.CKAN_LANG %} {%- set data_attrs = {"module": "autocomplete", "module-dropdown-class": "lang-dropdown", "module-container-class": "lang-container"} -%} {%- set label = ui.icon("globe", style="solid") ~ ui.util.tag(_('Language'), "span", attrs={"class": "sr-only"}) -%}
{%- call ui.util.call(ui.form, method="POST", action=h.url_for('util.internal_redirect'), data={"module": "select-switch"}) -%} {%- call ui.util.call(ui.select_box, name="url", id=ui.util.id(), data=data_attrs, label=label, **kwargs) -%} {% for locale in h.get_available_locales() %} {{ ui.select_option(locale.display_name or locale.english_name, value=h.url_for(h.current_url(), locale=locale.short_name), selected=locale.short_name == current_lang) }} {% endfor %} {%- endcall %} {%- endcall %}
{%- endmacro %}