File tree Expand file tree Collapse file tree 1 file changed +14
-5
lines changed
Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Original file line number Diff line number Diff line change 11{% assign locale = include.locale | default: page.locale | default: layout.locale | default: site.locale %}
2- {% if page.previous or page.next %}
2+ {%- assign next = page.next -%}
3+ {%- assign previous = page.previous -%}
4+ {%- assign collection = site.collections | where: "label", page.collection | first -%}
5+ {%- for document in collection.docs -%}
6+ {%- if page.locale == next.locale and page.locale == previous.locale %}{% break %}{% endif -%}
7+ {%- if page.locale != next.locale %}{% assign next = next.next %}{% endif -%}
8+ {%- if page.locale != previous.locale %}{% assign previous = previous.previous %}{% endif -%}
9+ {%- endfor -%}
10+
11+ {% if previous or next %}
312 < nav class ="pagination ">
4- {% if page. previous %}
5- < a href ="{{ page. previous.url | relative_url }} " class ="pagination--pager " title ="{{ page. previous.title | markdownify | strip_html | strip}} "> {{ site.data.ui-text[locale].pagination_previous | default: "Previous" }}</ a >
13+ {% if previous %}
14+ < a href ="{{ previous.url | relative_url }} " class ="pagination--pager " title ="{{ previous.title | markdownify | strip_html | strip}} "> {{ site.data.ui-text[locale].pagination_previous | default: "Previous" }}</ a >
615 {% else %}
716 < a href ="# " class ="pagination--pager disabled "> {{ site.data.ui-text[locale].pagination_previous | default: "Previous" }}</ a >
817 {% endif %}
9- {% if page. next %}
10- < a href ="{{ page. next.url | relative_url }} " class ="pagination--pager " title ="{{ page. next.title | markdownify | strip_html | strip}} "> {{ site.data.ui-text[locale].pagination_next | default: "Next" }}</ a >
18+ {% if next %}
19+ < a href ="{{ next.url | relative_url }} " class ="pagination--pager " title ="{{ next.title | markdownify | strip_html | strip}} "> {{ site.data.ui-text[locale].pagination_next | default: "Next" }}</ a >
1120 {% else %}
1221 < a href ="# " class ="pagination--pager disabled "> {{ site.data.ui-text[locale].pagination_next | default: "Next" }}</ a >
1322 {% endif %}
You can’t perform that action at this time.
0 commit comments