From 2d27e9e621baca4a32379a3c4dc918151aa73064 Mon Sep 17 00:00:00 2001 From: Bartek Szopka Date: Fri, 9 Aug 2024 11:17:29 +0200 Subject: [PATCH] Remove unnecessary new lines generated by macros --- .../navigation/_full-width-dropdown.jinja | 46 +++++++++---------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/templates/docs/examples/patterns/navigation/_full-width-dropdown.jinja b/templates/docs/examples/patterns/navigation/_full-width-dropdown.jinja index e084c7568..7b9af45ba 100644 --- a/templates/docs/examples/patterns/navigation/_full-width-dropdown.jinja +++ b/templates/docs/examples/patterns/navigation/_full-width-dropdown.jinja @@ -1,5 +1,5 @@ -{% macro _build_fake_link_list(n, group_name) %} -{% for i in range(n) %} +{%- macro _build_fake_link_list(n, group_name) -%} +{%- for i in range(n) -%}
  • {{ group_name }} item {{ i + 1 }} @@ -7,25 +7,25 @@ Description for {{ group_name }} item {{ i + 1 }}
  • -{% endfor %} -{% endmacro %} +{%- endfor -%} +{%- endmacro -%} -{% macro _build_fake_quick_links(n, group_name) %} +{%- macro _build_fake_quick_links(n, group_name) -%}
  • -{% endmacro %} +{%- endmacro -%} -{% macro _build_fake_button_link(group_name) %} +{%- macro _build_fake_button_link(group_name) -%}
  • {{ group_name }} @@ -35,12 +35,12 @@
    {{ group_name }}
  • -{% endmacro %} +{%- endmacro -%} -{% macro _build_fake_dropdown_items(group_name, links_count, has_cta_button=False, sub_links_count=15, quick_links_count=0) %} -{% for i in range(1, links_count + 1) %} -{% set subgroup_id = group_name ~ '-group-' ~ i %} -{% set subgroup_name = group_name ~ ' ' ~ i %} +{%- macro _build_fake_dropdown_items(group_name, links_count, has_cta_button=False, sub_links_count=15, quick_links_count=0) -%} +{%- for i in range(1, links_count + 1) -%} +{%- set subgroup_id = group_name ~ '-group-' ~ i -%} +{%- set subgroup_name = group_name ~ ' ' ~ i -%}
  • - {% if has_cta_button %} + {%- if has_cta_button -%} {{ _build_fake_button_link(subgroup_name) }} - {% endif %} + {%- endif -%} {{ _build_fake_link_list(sub_links_count, subgroup_name) }} - {% if quick_links_count > 0 %} + {%- if quick_links_count > 0 -%} {{ _build_fake_quick_links(quick_links_count, subgroup_name) }} - {% endif %} + {%- endif -%} -{% endfor %} -{% endmacro %} +{%- endfor -%} +{%- endmacro -%} -{% macro build_fake_dropdown(id, title, is_open=False, links_count=3, has_cta_button=False, sub_links_count=16, quick_links_count=0) %} -
    +{%- macro build_fake_dropdown(id, title, is_open=False, links_count=3, has_cta_button=False, sub_links_count=16, quick_links_count=0) -%} +
      {# TODO: use p-list temporarly, we will later have more specific styling class name for it #}
    • @@ -144,4 +144,4 @@
    -{% endmacro %} +{%- endmacro -%}