Skip to content

Commit eec5a0b

Browse files
authored
Improve rendering of pagination pagers (#893)
Merge pull request 893
1 parent 871678f commit eec5a0b

File tree

2 files changed

+28
-9
lines changed

2 files changed

+28
-9
lines changed

_layouts/home.html

+10-4
Original file line numberDiff line numberDiff line change
@@ -42,20 +42,26 @@ <h3>
4242
<div class="pager">
4343
<ul class="pagination">
4444
{%- if paginator.previous_page %}
45-
<li><a href="{{ paginator.previous_page_path | relative_url }}" class="previous-page">{{ paginator.previous_page }}</a></li>
45+
<li>
46+
<a href="{{ paginator.previous_page_path | relative_url }}" class="previous-page" title="Go to Page {{ paginator.previous_page }}">
47+
{{ paginator.previous_page }}
48+
</a>
49+
</li>
4650
{%- else %}
4751
<li><div class="pager-edge"></div></li>
4852
{%- endif %}
4953
<li><div class="current-page">{{ paginator.page }}</div></li>
5054
{%- if paginator.next_page %}
51-
<li><a href="{{ paginator.next_page_path | relative_url }}" class="next-page">{{ paginator.next_page }}</a></li>
55+
<li>
56+
<a href="{{ paginator.next_page_path | relative_url }}" class="next-page" title="Go to Page {{ paginator.next_page }}">
57+
{{ paginator.next_page }}
58+
</a>
59+
</li>
5260
{%- else %}
5361
<li><div class="pager-edge"></div></li>
5462
{%- endif %}
5563
</ul>
5664
</div>
5765
{%- endif %}
58-
5966
{%- endif -%}
60-
6167
</div>

_sass/minima/_layout.scss

+18-5
Original file line numberDiff line numberDiff line change
@@ -335,23 +335,36 @@
335335
* Pagination navbar
336336
*/
337337
.pagination {
338-
margin-bottom: $spacing-unit;
339-
@extend .social-media-list;
338+
display: table;
339+
margin: 0 auto;
340+
list-style-type: none;
340341
li {
342+
float: left;
343+
margin: 0 3px;
344+
min-width: 45px;
345+
min-height: 45px;
346+
text-align: center;
347+
a {
348+
display: block;
349+
text-decoration: none;
350+
border: 1px solid $border-color-01;
351+
&:hover { border-color: $border-color-02 }
352+
}
341353
a, div {
342354
min-width: 41px;
355+
padding: 10px 12px;
343356
text-align: center;
344357
box-sizing: border-box;
345358
}
346359
div {
347-
display: block;
348-
padding: $spacing-unit * .25;
349360
border: 1px solid transparent;
350-
351361
&.pager-edge {
352362
color: $border-color-01;
353363
border: 1px dashed;
354364
}
365+
&.current-page {
366+
font-weight: bold;
367+
}
355368
}
356369
}
357370
}

0 commit comments

Comments
 (0)