Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Jeffrey Phillips Freeman
agusmakmun-github-io
Commits
b0f3b54d
Commit
b0f3b54d
authored
Apr 20, 2016
by
agusmakmun
Browse files
update paginator
parent
0f501f8f
Changes
2
Hide whitespace changes
Inline
Side-by-side
_config.yml
View file @
b0f3b54d
...
...
@@ -12,7 +12,7 @@ urls:
url
:
/feed.xml
url
:
"
https://agusmakmun.github.io"
baseurl
:
"
"
paginate
:
20
per_page
:
20
paginate
:
3
per_page
:
3
paginate_path
:
"
/page:num/"
markdown
:
kramdown
\ No newline at end of file
index.html
View file @
b0f3b54d
...
...
@@ -13,28 +13,40 @@ layout: default
<!-- Pagination links -->
{% if paginator.total_pages > 1 %}
<
div
class=
"pagination"
>
<
ul
class=
"pagination"
>
{% if paginator.previous_page %}
<a
href=
"{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/' }}"
>
«
Prev
</a>
<li>
<a
href=
"{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/' }}"
>
«
</a>
</li>
{% else %}
<
span
>
«
Prev
</span>
<
li
class=
"disabled"
><span
aria-hidden=
"true"
>
«
</span>
</li>
{% endif %}
<li><a
href=
"/"
>
First
</a></li>
{% for page in (1..paginator.total_pages) %}
{% if page == paginator.page %}
<em>
{{ page }}
</em>
<li
class=
"active"
>
<a>
{{ page }}
<span
class=
"sr-only"
>
(current)
</span></a>
</li>
{% elsif page == 1 %}
<a
href=
"
{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/' }}
"
>
{{ page }}
</a>
<li>
<a
href=
"
/
"
>
{{ page }}
</a>
</li>
{% else %}
<a
href=
"{{ site.paginate_path | prepend: site.baseurl | replace: '//', '/' | replace: ':num', page }}"
>
{{ page }}
</a>
<li>
<a
href=
"{{ site.paginate_path | prepend: site.baseurl | replace: '//', '/' | replace: ':num', page }}"
>
{{ page }}
</a>
</li>
{% endif %}
{% endfor %}
<li><a
href=
"/page{{ paginator.total_pages }}/"
>
Last
</a></li>
{% if paginator.next_page %}
<a
href=
"{{ paginator.next_page_path | prepend: site.baseurl | replace: '//', '/' }}"
>
Next
»
</a>
<li>
<a
href=
"{{ paginator.next_page_path | prepend: site.baseurl | replace: '//', '/' }}"
>
»
</a>
</li>
{% else %}
<span>
Next
»
</span>
<
li
class=
"disabled"
><
span>
»
</span>
</li>
{% endif %}
</
div
>
</
ul
>
{% endif %}
</div>
<!-- end #home -->
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment