{%- macro nds_back_to_top(content) -%} {%- do kwargs.setdefault("_extra_class", "nsw-back-to-top js-back-to-top") -%} {{ ui.button(**kwargs) }} {%- endmacro %} {%- macro nds_callout(content) -%}
{{ content }}
{%- endmacro %} {%- macro nds_card(content, title, img, href, variant, tag, date, horizontal, icon="east") -%} {%- set class = "nsw-card" ~ (" nsw-card--" ~ variant if variant else "") -%} {%- if horizontal -%} {%- set class = class ~ " nsw-card--horizontal" -%} {%- endif %}
{%- if img -%}
{{ title }}
{%- endif %}
{%- if tag -%}
{{ tag }}
{%- endif %} {%- if date -%}
{{ date }}
{%- endif %}
{{ content }}
{{ ui.icon(icon) }}
{%- endmacro %} {%- macro nds_card_carousel(content, title, drag, loop, navigation, pagination) -%} {%- set defaults = { "class": "nsw-carousel js-carousel", "data-description": title, "data-drag": "on" if drag else "off", "data-loop": "on" if loop else "off", "data-navigation": "on" if navigation or pagination else "off", "data-navigation-pagination": "on" if pagination else "off", } -%}

{{ _("Carousel items") }}

{%- endmacro %} {%- macro nds_card_carousel_item(content) -%} {%- endmacro -%} {%- macro nds_content_block(content, title, image_content, list_items, link_content) -%} NOT IMPLEMENTED {%- endmacro %} {%- macro nds_date_input_group(content, name, label, id, required, errors, value, datepicker) -%} {%- set value = value or [] -%} {%- set id = id or (name and "field-" ~ name) or ui.util.id() -%}
{%- if label or content -%} {%- if label -%} {{ label }} {%- endif %} {%- if content -%} {{ content }} {%- endif %} {%- endif %}
{%- if datepicker -%}
{%- endif %}
{%- if errors -%} {{ errors|join(", ") }} {%- endif %}
{%- endmacro %} {%- macro nds_date_input(content, name, label, id, value, required, errors, datepicker) -%} {%- set id = id or (name and "field-" ~ name) or ui.util.id() -%}
{%- if label or content -%} {%- if label -%} {%- endif %} {%- if content -%} {{ content }} {%- endif %} {%- endif %}
{%- if errors -%} {{ errors|join(", ") }} {%- endif %}
{%- endmacro %} {%- macro nds_global_alert(content, title, cookie_name, variant, dismissible=true) -%} {%- set class = "nsw-global-alert js-global-alert" -%} {%- if variant -%} {%- set class = class ~ " nsw-global-alert--" ~ variant -%} {%- endif %}
{%- if title -%}
{{ title }}
{%- endif %} {{ content }}
{%- if dismissible -%} {%- endif %}
{%- endmacro %} {%- macro nds_hero_banner(content, color, img, lines, subtitle, extra_content) -%} {%- set class = "nsw-hero-banner nsw-hero-banner--wide" -%} {%- if color -%} {%- set class = class ~ " nsw-hero-banner--" ~ color -%} {%- endif %}
{{ content }}
{%- if subtitle or extra_content -%} {%- endif %}
{%- if img -%} {%- elif lines -%}
{%- endif %}
{%- endmacro %} {%- macro nds_hero_search(content, title, intro, img, html_img, href=h.url_for("dataset.search"), search_name="q") -%} {%- set class = "nsw-section" -%} {%- if img -%} {%- set class = class ~ " nsw-section--image" ~ ("-html" if html_img else "")-%} {%- endif %} {%- set defaults = {"class": class} -%} {%- if img and not html_img -%} {%- do defaults.update({"style": "background-image: url({});".format(img)}) -%} {%- endif %}
{%- if img and html_img -%} Background image {%- endif %}
{%- endmacro %} {%- macro nds_in_page_nav(content, title) -%} {%- endmacro %} {%- macro nds_in_page_nav_item(content, href) -%}
  • {{ ui.link(content, href=href, **kwargs) }}
  • {%- endmacro %} {%- macro nds_link_list(content) -%}
    {%- endmacro %} {%- macro nds_link_list_item(content, href) -%}
  • {%- call ui.util.call(ui.link, href=href, **kwargs) -%} {{ content }} {{ ui.icon("east") }} {%- endcall %}
  • {%- endmacro %} {%- macro nds_sidebar_nav_item_with_subnav(content, title, href, active) -%}
  • {{ title }}
  • {%- endmacro %} {%- macro nds_progress_indicator(content, step=0, total=0) -%}
    {%- if content -%}
    {{ content }}
    {%- endif %} {%- if total -%}
    {%- for i in range(total) -%}
    {%- endfor %}
    {%- endif %}
    {%- endmacro %} {%- macro nds_steps(content, variant, counter, size) -%} {#supplementary,light,dark#} {%- set class = "nsw-steps" -%} {%- if variant -%} {%- set class = class ~ " nsw-steps--" ~ variant -%} {%- endif %} {%- if counter -%} {%- set class = class ~ " nsw-steps--counters" ~ variant -%} {%- endif %} {%- if size -%} {%- set _size_map = {"sm": "small", "md": "medium"} -%} {%- set class = class ~ " nsw-steps--" ~ _size_map.get(size, size) -%} {%- endif %}
    {{- content -}}
    {%- endmacro %} {%- macro nds_step_item(content, title, fill, level=2) -%} {%- set class = "nsw-steps__item" ~ (" nsw-steps__item--fill" if fill else "") -%}
    {{ ui.heading(title, level=level) if title }} {{ content }}
    {%- endmacro %} {%- macro nds_footer_section(content, title, href) -%}
    {%- if title -%} {%- endif %}
    {%- endmacro %}