Skip to content

Commit

Permalink
add jekyll-paginate - fixxed
Browse files Browse the repository at this point in the history
  • Loading branch information
Miro0o committed Feb 6, 2024
1 parent fa81ab8 commit 91a4531
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
4 changes: 3 additions & 1 deletion _data/text.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,17 @@ en: &DEFAULT_EN
share: "Share"
tweet: "x-tweet"
next: "Next"
next_homepage: "Next"
# previous: "Previous"
previous: "Past posts"
previous_homepage: "Previous"
newer: "Newer"
older: "Older"
back_to_top: "Back to Top"
# search_placeholder_text: "Enter your search term..."
search_placeholder_text: "What do you have in mind today?"
# powered_by: "Powered by"
powered_by: "πŸ’› πŸ’™ πŸ’œ Proudly powered by"
powered_by: "πŸ’› πŸ’™ πŸ’œ Powered by"

en-US:
<<: *DEFAULT_EN
Expand Down
11 changes: 6 additions & 5 deletions _includes/posts-paginated.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@
{% comment %} Link for previous page {% endcomment %}
{% if paginator.previous_page %}
{% if paginator.previous_page == 1 %}
<li><a href="{{ first_page_path }}">{{ site.data.text[site.locale].previous | default: "Previous" }}</a></li>
<li><a href="{{ first_page_path }}">{{ site.data.text[site.locale].previous_homepage | default: "Previous" }}</a></li>
{% else %}
<li><a href="{{ site.paginate_path | replace: ':num', paginator.previous_page | replace: '//', '/' | relative_url }}">{{ site.data.text[site.locale].previous | default: "Previous" }}</a></li>
<li><a href="{{ site.paginate_path | replace: ':num', paginator.previous_page | replace: '//', '/' | relative_url }}">{{ site.data.text[site.locale].previous_homepage | default: "Previous" }}</a></li>
{% endif %}
{% else %}
<li><a href="#" class="disabled"><span aria-hidden="true">{{ site.data.text[site.locale].previous | default: "Previous" }}</span></a></li>
<!-- <li><a href="#" class="disabled"><span aria-hidden="true">{{ site.data.text[site.locale].previous | default: "Previous" }}</span></a></li> -->
<li><a href="#" class="disabled"><span aria-hidden="true">{{ site.data.text[site.locale].previous_homepage | default: "Previous" }}</span></a></li>
{% endif %}

{% comment %} First page {% endcomment %}
Expand Down Expand Up @@ -65,9 +66,9 @@

{% comment %} Link next page {% endcomment %}
{% if paginator.next_page %}
<li><a href="{{ site.paginate_path | replace: ':num', paginator.next_page | replace: '//', '/' | relative_url }}">{{ site.data.text[site.locale].next | default: "Next" }}</a></li>
<li><a href="{{ site.paginate_path | replace: ':num', paginator.next_page | replace: '//', '/' | relative_url }}">{{ site.data.text[site.locale].next_homepage | default: "Next" }}</a></li>
{% else %}
<li><a href="#" class="disabled"><span aria-hidden="true">{{ site.data.text[site.locale].next | default: "Next" }}</span></a></li>
<li><a href="#" class="disabled"><span aria-hidden="true">{{ site.data.text[site.locale].next_homepage | default: "Next" }}</span></a></li>
{% endif %}
</ul>
</nav>
Expand Down

0 comments on commit 91a4531

Please sign in to comment.