From 6d92a88cdeffa966ce479fae82d9600dde10eae9 Mon Sep 17 00:00:00 2001 From: undoingtech <33106062+undoingtech@users.noreply.github.com> Date: Fri, 10 Nov 2017 20:26:12 -0500 Subject: [PATCH] removed whitespace also added empty comments for readability. --- _layouts/tutorial.html | 156 +++++++++++++++++++++-------------------- 1 file changed, 81 insertions(+), 75 deletions(-) diff --git a/_layouts/tutorial.html b/_layouts/tutorial.html index 95b82f7..393ae71 100644 --- a/_layouts/tutorial.html +++ b/_layouts/tutorial.html @@ -18,120 +18,126 @@ - {{ page.title | escape }} - {{ site.data.localization.title[page.lang] }} + {{- page.title | escape -}} - {{- site.data.localization.title[page.lang] -}}
- {% assign same_topic_started = false %} - {% assign should_assign_next = false %} - {% assign has_next_page = false %} - {% assign step_index = 0 %} - {% assign next_page = nil %} - {% for p in site.pages %} - {% assign file_name = page.path | split: "/" %} - {% assign file_name = file_name[1] %} - - {% assign p_file_name = p.path | split: "/" %} - {% assign p_file_name = p_file_name[1] %} - - {% assign topic = file_name | split: "-" | first %} - {% assign p_topic = p_file_name | split: "-" | first %} - - {% if p.lang == page.lang %} - {% assign step_index = step_index | plus: 1 %} - {% if p_topic == topic and same_topic_started == false %} + {% comment %}{% endcomment %} + {%- assign same_topic_started = false -%} + {%- assign should_assign_next = false -%} + {%- assign has_next_page = false -%} + {%- assign step_index = 0 -%} + {%- assign next_page = nil -%} + {%- for p in site.pages -%} + {%- assign file_name = page.path | split: "/" -%} + {%- assign file_name = file_name[1] -%} + + {%- assign p_file_name = p.path | split: "/" -%} + {%- assign p_file_name = p_file_name[1] -%} + + {%- assign topic = file_name | split: "-" | first -%} + {%- assign p_topic = p_file_name | split: "-" | first -%} + + {%- if p.lang == page.lang -%} + {%- assign step_index = step_index | plus: 1 -%} + {%- if p_topic == topic and same_topic_started == false -%}
- {% assign same_topic_started = true %} - {% endif %} - {% if p_topic != topic and same_topic_started == true %} + {% comment %}{% endcomment %} + {%- assign same_topic_started = true -%} + {%- endif -%} + {%- if p_topic != topic and same_topic_started == true -%}
- {% assign same_topic_started = false %} - {% endif %} - {% if page == p %}{{ step_index }}{% endif %} - {% if should_assign_next %} - {% assign should_assign_next = false %} - {% assign has_next_page = true %} - {% assign next_page = p %} - {% endif %} - {% if page == p %} - {% assign should_assign_next = true %} - {% endif %} - {% endif %} - {% endfor %} - {% if same_topic_started %} + {% comment %}{% endcomment %} + {%- assign same_topic_started = false -%} + {%- endif -%} + {%- if page == p -%}{{- step_index -}}{%- endif -%} + {% comment %}{% endcomment %} + {%- if should_assign_next -%} + {%- assign should_assign_next = false -%} + {%- assign has_next_page = true -%} + {%- assign next_page = p -%} + {%- endif -%} + {%- if page == p -%} + {%- assign should_assign_next = true -%} + {%- endif -%} + {%- endif -%} + {%- endfor -%} + {%- if same_topic_started -%}
- {% endif %} + {% comment %}{% endcomment %} + {%- endif -%} -

{{ page.title | escape }}

+ {% comment %}{% endcomment %} +

{{- page.title | escape -}}

- {{ content }} - {% if has_next_page %} - {{ site.data.localization.footer.nextStep[page.lang] }} - {% endif %} + {{- content -}} + {%- if has_next_page -%} + {{- site.data.localization.footer.nextStep[page.lang] -}} + {%- endif -%}