FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
codebaragi23.github.io/_includes/post_pagination.html at master · codebaragi23/codebaragi23.github.io · GitHub
codebaragi23
codebaragi23.github.io
Repository navigation
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
codebaragi23.github.io
/
_includes
/
post_pagination.html
Copy path
More file actions
More file actions
Latest commit
History
History
History
47 lines (45 loc) · 2.29 KB
Breadcrumbs
codebaragi23.github.io
/
_includes
/
post_pagination.html
Copy path
File metadata and controls
47 lines (45 loc) · 2.29 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
{% if page.categories[0] %}
{% assign category = page.categories[0] %}
{% assign posts = site.categories[category] %}
{% for post in posts %}
{% if post.url == page.url %}
{% assign post_index0 = forloop.index0 %}
{% assign post_index1 = forloop.index %}
{% endif %}
{% endfor %}
{% for post in posts %}
{% if post_index0 == forloop.index %}
{% assign next_post = post %}
{% endif %}
{% if post_index1 == forloop.index0 %}
{% assign prev_post = post %}
{% endif %}
{% endfor %}
{% if prev_post or next_post %}
<
nav
class
="
pagination
"
>
{% if prev_post %}
<
a
href
="
{{ prev_post.url | relative_url }}
"
class
="
pagination--pager
"
title
="
{{ prev_post.title | markdownify | strip_html }}
"
>
{{ site.data.ui-text[site.locale].pagination_previous | default: "Previous" }}
</
a
>
{% else %}
<
a
href
="
#
"
class
="
pagination--pager disabled
"
>
{{ site.data.ui-text[site.locale].pagination_previous | default: "Previous" }}
</
a
>
{% endif %}
{% if next_post %}
<
a
href
="
{{ next_post.url | relative_url }}
"
class
="
pagination--pager
"
title
="
{{ next_post.title | markdownify | strip_html }}
"
>
{{ site.data.ui-text[site.locale].pagination_next | default: "Next" }}
</
a
>
{% else %}
<
a
href
="
#
"
class
="
pagination--pager disabled
"
>
{{ site.data.ui-text[site.locale].pagination_next | default: "Next" }}
</
a
>
{% endif %}
</
nav
>
{% endif %}
{% elsif page.previous or page.next %}
<
nav
class
="
pagination
"
>
{% if page.previous %}
<
a
href
="
{{ page.previous.url | relative_url }}
"
class
="
pagination--pager
"
title
="
{{ page.previous.title | markdownify | strip_html }}
"
>
{{ site.data.ui-text[site.locale].pagination_previous | default: "Previous" }}
</
a
>
{% else %}
<
a
href
="
#
"
class
="
pagination--pager disabled
"
>
{{ site.data.ui-text[site.locale].pagination_previous | default: "Previous" }}
</
a
>
{% endif %}
{% if page.next %}
<
a
href
="
{{ page.next.url | relative_url }}
"
class
="
pagination--pager
"
title
="
{{ page.next.title | markdownify | strip_html }}
"
>
{{ site.data.ui-text[site.locale].pagination_next | default: "Next" }}
</
a
>
{% else %}
<
a
href
="
#
"
class
="
pagination--pager disabled
"
>
{{ site.data.ui-text[site.locale].pagination_next | default: "Next" }}
</
a
>
{% endif %}
</
nav
>
{% endif %}
Back
|
FazBrowse Home
|
New Git URL