diff --git a/_jekyll/_includes/feature_row b/_jekyll/_includes/feature_row new file mode 100644 index 000000000..09de8c494 --- /dev/null +++ b/_jekyll/_includes/feature_row @@ -0,0 +1,41 @@ +{% if include.id %} + {% assign feature_row = page[include.id] %} +{% else %} + {% assign feature_row = page.feature_row %} +{% endif %} + +
+ + {% for f in feature_row %} +
+
+ {% if f.image_path %} +
+ {% if f.alt %}{{ f.alt }}{% endif %} + {% if f.image_caption %} + {{ f.image_caption | markdownify | remove: "

" | remove: "

" }}
+ {% endif %} +
+ {% endif %} + +
+ {% if f.title %} +

{{ f.title }}

+ {% endif %} + + {% if f.excerpt %} +
+ {{ f.excerpt | markdownify }} +
+ {% endif %} + + {% if f.url %} +

{{ site.data.ui-text[page.lang].more_label | default: 'Read more' }}

+ {% endif %} +
+
+
+ {% endfor %} + +
diff --git a/_jekyll/_includes/language_switcher b/_jekyll/_includes/language_switcher index 3c1769e49..2661905b5 100644 --- a/_jekyll/_includes/language_switcher +++ b/_jekyll/_includes/language_switcher @@ -8,43 +8,45 @@ {% endif %} {%- if page.lang != current_lang -%} - {% assign page_lang = page.lang | prepend: '/' | append: '/' %} + {% assign page_lang = page.lang | prepend: '/' | append: '/' %} {%- comment -%} Post {%- endcomment -%} {%- if page.is_post == true -%} - {%- assign new_lang = current_lang | prepend: '/' | append: '/' -%} - {%- assign new_url = page.url | replace_first: page_lang, new_lang -%} - {%- assign lang_page = site.posts | where: "url", new_url -%} + {%- assign new_lang = current_lang | prepend: '/' | append: '/' -%} + {%- assign new_url = page.url | replace_first: page_lang, new_lang -%} + {%- assign lang_page = site.posts | where: "url", new_url -%} {%- comment -%} Pages and Collections {%- endcomment -%} {%- else -%} - {%- assign new_url = page.url | replace: page_lang, '/' | prepend: lang[0] | prepend: '/' | replace: '//', '/' -%} - {%- assign lang_page = site.pages | where: "url", new_url -%} - {%- if lang_page.size == 0 -%} - {%- for collection in site.collections -%} + {%- assign new_url = page.url | replace: page_lang, '/' | prepend: lang[0] | prepend: '/' | replace: '//', '/' -%} + {%- assign lang_page = site.pages | where: "url", new_url -%} + {%- if lang_page.size == 0 -%} + {%- for collection in site.collections -%} {%- assign lang_page = collection.docs | where: "permalink", new_url -%} - {%- if lang_page.size > 0 -%} - {%- break -%} - {%- endif -%} - {%- endfor -%} - {%- endif -%} + {%- if lang_page.size > 0 -%} + {%- break -%} + {%- endif -%} + {%- endfor -%} + {%- endif -%} {%- endif -%} - {%- if lang_page.size > 0 -%} - {%- assign lang_sub = new_url | append: '|' | append: lang[1] | append: '|' | append: lang[0] -%} - {%- assign lang_sub_array = lang_sub | split: '|' -%} - {%- assign lang_array = lang_array | push: lang_sub_array -%} - {%- endif -%} + {%- if lang_page.size > 0 -%} + {%- assign lang_sub = new_url | append: '|' | append: lang[1] | append: '|' | append: lang[0] -%} + {%- assign lang_sub_array = lang_sub | split: '|' -%} + {%- assign lang_array = lang_array | push: lang_sub_array -%} + {%- endif -%} {%- endif -%} {%- endfor -%} {%- if lang_array.size > 0 -%} -
  • {{ site.data.ui-text[page.lang].choose_language | default: "Choose your language" }} - +
  • + + +
  • {%- endif -%} diff --git a/_jekyll/_includes/masthead.html b/_jekyll/_includes/masthead.html index 66d25bd1e..7bf0364c8 100644 --- a/_jekyll/_includes/masthead.html +++ b/_jekyll/_includes/masthead.html @@ -27,11 +27,10 @@ {% if site.search == true %} {% endif %} + {% include language_switcher %}