Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
Frama-C Website
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pub
Frama-C Website
Commits
c388d4e2
Commit
c388d4e2
authored
4 years ago
by
Augustin Lemesle
Browse files
Options
Downloads
Patches
Plain Diff
fix pagination
parent
4c99fd73
Branches
stable/copper
Branches containing commit
Tags
0.7
Tags containing commit
No related merge requests found
Pipeline
#27077
passed
4 years ago
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
_layouts/blog.html
+14
-6
14 additions, 6 deletions
_layouts/blog.html
with
14 additions
and
6 deletions
_layouts/blog.html
+
14
−
6
View file @
c388d4e2
...
@@ -57,25 +57,33 @@ css: blog
...
@@ -57,25 +57,33 @@ css: blog
</div>
</div>
{% if paginator.total_pages > 1 %}
{% if paginator.total_pages > 1 %}
{% if page.category %}
{% assign path = "/category/:cat/page:num.html" | replace: ":cat", page.category %}
{% assign index = "/category/:cat/index.html" | replace: ":cat", page.category %}
{% else %}
{% assign path = site.paginate_path %}
{% assign index = "/blog/index.html"%}
{% endif %}
<div
class=
"pagination clearfix"
>
<div
class=
"pagination clearfix"
>
{% if paginator.previous_page %}
{% if paginator.previous_page %}
<a
class=
"prev page-numbers"
href=
"{{ paginator.previous_page_path }}"
>
« Previous
</a>
<a
class=
"prev page-numbers"
href=
"{{ paginator.previous_page_path }}"
>
« Previous
</a>
{% if paginator.previous_page != 1 %}
{% if paginator.previous_page != 1 %}
<a
class=
'page-numbers'
href=
"
/blog/index.html
"
>
{{ 1 }}
</a>
<a
class=
'page-numbers'
href=
"
{{ index }}
"
>
{{ 1 }}
</a>
...
...
{% endif %}
{% endif %}
{% if paginator.previous_page == 1%}
{% if paginator.previous_page == 1%}
<a
class=
'page-numbers'
href=
"
/blog/index.html
"
>
{{ 1 }}
</a>
<a
class=
'page-numbers'
href=
"
{{ index }}
"
>
{{ 1 }}
</a>
{% else %}
{% else %}
<a
class=
'page-numbers'
href=
"{{
site.paginate_
path | replace: ':num', paginator.previous_page }}"
>
{{ paginator.previous_page }}
</a>
<a
class=
'page-numbers'
href=
"{{ path | replace: ':num', paginator.previous_page }}"
>
{{ paginator.previous_page }}
</a>
{% endif %}
{% endif %}
{% endif %}
{% endif %}
<span
class=
'page-numbers current'
>
{{ paginator.page }}
</span>
<span
class=
'page-numbers current'
>
{{ paginator.page }}
</span>
{% if paginator.next_page %}
{% if paginator.next_page %}
<a
class=
'page-numbers'
href=
"{{
site.paginate_
path | replace: ':num', paginator.next_page }}"
>
{{ paginator.next_page }}
</a>
<a
class=
'page-numbers'
href=
"{{ path | replace: ':num', paginator.next_page }}"
>
{{ paginator.next_page }}
</a>
{% if paginator.
previous
_page != paginator.total_pages %}
{% if paginator.
next
_page != paginator.total_pages %}
...
...
<a
class=
'page-numbers'
href=
"{{
site.paginate_
path | replace: ':num', paginator.total_pages }}"
>
{{ paginator.total_pages }}
</a>
<a
class=
'page-numbers'
href=
"{{ path | replace: ':num', paginator.total_pages }}"
>
{{ paginator.total_pages }}
</a>
{% endif %}
{% endif %}
<a
class=
"next page-numbers"
href=
"{{ paginator.next_page_path }}"
>
Next »
</a>
<a
class=
"next page-numbers"
href=
"{{ paginator.next_page_path }}"
>
Next »
</a>
{% endif %}
{% endif %}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment