Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
blog-memopol
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Political Memory
blog-memopol
Commits
ad2cb881
Commit
ad2cb881
authored
Dec 04, 2016
by
Jamesie Pic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bootstrap4: pagination
parent
bd13d4c7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
22 deletions
+34
-22
theme/templates/category.html
theme/templates/category.html
+34
-22
No files found.
theme/templates/category.html
View file @
ad2cb881
...
...
@@ -20,28 +20,40 @@
{# deal with pagination #}
{% if articles_page and articles_paginator.num_pages > 1 %}
<div
class=
"row"
style=
"margin-bottom: -1.25em;"
>
<div
class=
"small-12 columns text-center"
>
<div
class=
"pagination-centered"
>
<ul
class=
"pagination"
>
{% if articles_page.has_previous() %}
{% set num = articles_page.previous_page_number() %}
<li
class=
"arrow"
><a
href=
"{{ SITEURL }}/{{ page_name }}{{ num if num > 1 else '' }}.html"
>
←
Previous
</a></li>
{% else %}
<li
class=
"arrow unavailable"
><a
href=
"#"
>
←
Previous
</a></li>
{% endif %}
{% for num in range( 1, 1 + articles_paginator.num_pages ) %}
<li
class=
"{{ 'current' if num == articles_page.number else '' }}"
><a
href=
"{{ SITEURL }}/{{ page_name }}{{ num if num > 1 else '' }}.html"
>
{{ num }}
</a></li>
{% endfor %}
{% if articles_page.has_next() %}
<li
class=
"arrow"
><a
href=
"{{ SITEURL }}/{{ page_name }}{{ articles_page.next_page_number() }}.html"
>
Next
→
</a></li>
{% else %}
<li
class=
"arrow unavailable"
><a
href=
"#"
>
→
Next
</a></li>
{% endif %}
</ul>
</div>
</div>
</div>
<nav
aria-label=
"Page navigation"
>
<ul
class=
"pagination"
>
{% if articles_page.has_previous() %}
{% set num = articles_page.previous_page_number() %}
<li
class=
"page-item"
>
<a
class=
"page-link"
href=
"{{ SITEURL }}/{{ page_name }}{{ num if num > 1 else '' }}.html"
>
←
Previous
</a>
</li>
{% else %}
<li
class=
"page-item disabled"
>
<a
href=
"#"
class=
"page-link"
>
<span
aria-hidden=
"true"
>
«
</span>
<span
class=
"sr-only"
>
Previous
</span>
</a>
</li>
{% endif %}
{% for num in range( 1, 1 + articles_paginator.num_pages ) %}
<li
class=
"page-item {{ 'active' if num == articles_page.number else '' }}"
>
<a
class=
"page-link"
href=
"{{ SITEURL }}/{{ page_name }}{{ num if num > 1 else '' }}.html"
>
{{ num }}
</a>
</li>
{% endfor %}
{% if articles_page.has_next() %}
<li
class=
"page-item"
>
<a
class=
"page-link"
href=
"{{ SITEURL }}/{{ page_name }}{{ articles_page.next_page_number() }}.html"
>
Next
→
</a>
</li>
{% else %}
<li
class=
"page-item disabled"
>
<a
class=
"page-link"
href=
"#"
>
<span
aria-hidden=
"true"
>
»
</span>
<span
class=
"sr-only"
>
Next
</span>
</a>
</li>
{% endif %}
</ul>
</nav>
{% endif %}
{% endblock %}
...
...
Write
Preview
Markdown
is supported
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