88< script type ="text/javascript "async =""src ="../js/requirements.js "> </ script >
99< script type ="text/javascript "async =""src ="../js/compatibility.js "> </ script >
1010< script type ="text/javascript "async =""src ="../js/languages.js "> </ script >
11+ < script type ="text/javascript "async =""src ="../js/switch-language.js "> </ script >
1112< link type ="text/css "rel ="stylesheet "href ="../css/tutorial.css "media ="screen "/>
1213< link type ="text/css "rel ="stylesheet "href ="../css/playfield.css "media ="screen "/>
1314< link type ="text/css "rel ="stylesheet "href ="../css/quiz.css "media ="screen "/>
6768< body >
6869< header >
6970< div class ="progress ">
70- {% assign same_topic_started = false %}
71- {% assign should_assign_next = false %}
72- {% assign has_next_page = false %}
73- {% assign step_index = 0 %}
74- {% assign next_page = nil %}
75- {% for p in site.pages %}
76- {% assign file_name = page.path | split: "/" %}
77- {% assign file_name = file_name[1] %}
78-
79- {% assign p_file_name = p.path | split: "/" %}
80- {% assign p_file_name = p_file_name[1] %}
81-
82- {% assign topic = file_name | split: "-" | first %}
83- {% assign p_topic = p_file_name | split: "-" | first %}
84-
85- {% if p.lang == page.lang %}
86- {% assign step_index = step_index | plus: 1 %}
87- {% if p_topic == topic and same_topic_started == false %}
71+ {%- assign same_topic_started = false %}
72+ {%- assign should_assign_next = false %}
73+ {%- assign has_next_page = false %}
74+ {%- assign step_index = 0 %}
75+ {%- assign next_page = nil %}
76+ {%- for p in site.pages %}
77+ {%- assign file_name = page.path | split: "/" %}
78+ {%- assign file_name = file_name[1] %}
79+
80+ {%- assign p_file_name = p.path | split: "/" %}
81+ {%- assign p_file_name = p_file_name[1] %}
82+
83+ {%- assign topic = file_name | split: "-" | first %}
84+ {%- assign p_topic = p_file_name | split: "-" | first %}
85+
86+ {%- if p.lang == page.lang %}
87+ {%- assign step_index = step_index | plus: 1 %}
88+ {%- if p_topic == topic and same_topic_started == false %}
8889< div class ="same-topic ">
89- {% assign same_topic_started = true %}
90- {% endif %}
91- {% if p_topic != topic and same_topic_started == true %}
90+ {%- assign same_topic_started = true %}
91+ {%- endif %}
92+ {%- if p_topic != topic and same_topic_started == true %}
9293</ div >
93- {% assign same_topic_started = false %}
94- {% endif %}
95- < a id ="page-{{ p.path }} "class ="step {% if page == p %}current{% endif %} "href ="..{{ p.url }} "> {% if page == p %}{{ step_index }}{% endif %}</ a >
96- {% if should_assign_next %}
97- {% assign should_assign_next = false %}
98- {% assign has_next_page = true %}
99- {% assign next_page = p %}
100- {% endif %}
101- {% if page == p %}
102- {% assign should_assign_next = true %}
103- {% endif %}
104- {% endif %}
105- {% endfor %}
106- {% if same_topic_started %}
94+ {%- assign same_topic_started = false %}
95+ {%- endif %}
96+ < a id ="page-{{ p.path }} "class ="step {% if page == p %}current{% endif %} "href ="..{{ p.url }} "> {%- if page == p %}{{ step_index }}{% endif %}</ a >
97+ {%- if should_assign_next %}
98+ {%- assign should_assign_next = false %}
99+ {%- assign has_next_page = true %}
100+ {%- assign next_page = p %}
101+ {%- endif %}
102+ {%- if page == p %}
103+ {%- assign should_assign_next = true %}
104+ {%- endif %}
105+ {%- endif %}
106+ {%- endfor %}
107+ {%- if same_topic_started %}
107108</ div >
108- {% endif %}
109+ {%- endif %}
109110</ div >
110111< h2 > {{ page.title | escape }}</ h2 >
111112</ header >
112113< div class ="main ">
113114 {{ content }}
114- {% if has_next_page %}
115+ {%- if has_next_page %}
115116< a href ="..{{ next_page.url }} "class ="next-page "> {{ site.data.localization.footer.nextStep[page.lang] }}</ a >
116- {% endif %}
117+ {%- endif %}
117118</ div >
118119< footer >
119- < div class = "languageFooterMenu ">
120+ < div class = "languageFooterMenu ">
120121< select id ="languageMenu "onchange ="changeLanguage() ">
121-
122- {% assign languagesArray = 'English,Deutsch,Svenska' | split: ',' %}
123-
124- {% for language in languagesArray %}
125- {% assign lang = language | slice: 0, 2 | downcase %}
126- {{ lang }}
127- {{ page.lang }}
128- {% if lang == page.lang %}
129- < option id =page.lang selected href ="..{{page.url}} "value ="{{ page.url | remove: ".html "}}"> {{language}}</ option >
130- {% endif %}
131- {% if lang != page.lang %}
132- < option id = "{{lang}} "href ="..{{page.url | replace: page.lang, lang}} "value ="{{ page.url | remove: ".html " | replace: page.lang, lang}}"> {{language}}</ option >
133- {% endif %}
134- {% endfor %}
122+ {%- assign languagesArray = 'English,Deutsch,Svenska' | split: ',' %}
123+ {%- for language in languagesArray %}
124+ {%- assign lang = language | slice: 0, 2 | downcase %}
125+ {%- if lang == page.lang %}
126+ < option id ="{{lang}} "selected href ="..{{page.url}} "> {{language}}</ option >
127+ {%- endif %}
128+ {%- if lang != page.lang %}
129+ < option id ="{{lang}} "href ="..{{page.url | replace: page.lang, lang}} "> {{language}}</ option >
130+ {%- endif %}
131+ {%- endfor %}
135132</ select >
136-
137133< script >
138- function changeLanguage ( ) {
139- var getLanguageMenu = document . getElementById ( 'languageMenu' ) ;
140- var getLanguageHref = getLanguageMenu . options [ getLanguageMenu . selectedIndex ] . getAttribute ( 'href' ) ;
141- window . location . assign ( getLanguageHref ) ;
142134
143- }
144- </ script >
145- < script src ="http://code.jquery.com/jquery-3.2.1.min.js "> </ script >
146- < script >
147- $ ( document ) . ready ( function ( ) {
148- $ ( "select" ) . each ( function ( ) {
149- $ ( this ) . val ( $ ( this ) . find ( 'option[selected]' ) . val ( ) ) ;
150- } ) ;
151- } ) ;
152135</ script >
153136</ div >
154137< div class ="links ">
@@ -162,10 +145,10 @@ <h2>{{ page.title | escape }}</h2>
162145< img alt ="Creative Commons Lizenzvertrag "style ="border-width:0 "src ="../img/cc-by-sa.png "/>
163146</ a >
164147 {{ site.data.localization.license[page.lang] }}
165- {% assign lowercase_content = content | downcase %}
166- {% if lowercase_content contains "< img " %}
148+ {%- assign lowercase_content = content | downcase %}
149+ {%- if lowercase_content contains "< img " %}
167150 {{ site.data.localization.licenseImage[page.lang] }}
168- {% endif %}
151+ {%- endif %}
169152</ div >
170153</ footer >
171154</ body >