From 7265ad24cafc2e4dbd51927a488aeb7826ae1cab Mon Sep 17 00:00:00 2001 From: Nicco Kunzmann Date: Sun, 12 Nov 2017 17:09:13 +0100 Subject: [PATCH] Revert "removed whitespace" --- _layouts/tutorial.html | 156 ++++++++++++++++++++--------------------- 1 file changed, 75 insertions(+), 81 deletions(-) diff --git a/_layouts/tutorial.html b/_layouts/tutorial.html index 393ae71..95b82f7 100644 --- a/_layouts/tutorial.html +++ b/_layouts/tutorial.html @@ -18,126 +18,120 @@ - {{- page.title | escape -}} - {{- site.data.localization.title[page.lang] -}} + {{ page.title | escape }} - {{ site.data.localization.title[page.lang] }}
- {% 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 = 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 = true -%} - {%- endif -%} - {%- if p_topic != topic and same_topic_started == true -%} + {% assign same_topic_started = true %} + {% endif %} + {% if p_topic != topic and same_topic_started == true %}
- {% 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 -%} + {% 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 %} - {%- endif -%} + {% endif %} - {% comment %}{% endcomment %} -

{{- page.title | escape -}}

+

{{ 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 %}