Skip to content

Commit 477ac0f

Browse files
committed
The paginator on the front page no longer jumps around. Fixes #46
1 parent 8df02f2 commit 477ac0f

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

custom/layouts/front.njk

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,23 +26,13 @@
2626
{% macro render_post(posts) %}
2727
{%- set current_year = '1970' %}
2828
{%- for post in posts.toArray() %}
29-
30-
{%- set year = date(post.date, 'YYYY') %}
31-
32-
{%- if year !== current_year %}
33-
{%- set current_year = year %}
34-
<div class="collection-year">
35-
<span class="collection-header">{{ current_year }}</span>
36-
</div>
37-
{%- endif %}
38-
3929
<article itemscope itemtype="http://schema.org/Article">
4030
<header class="post-header">
4131
<div class="post-meta-container">
4232
<time itemprop="dateCreated"
4333
datetime="{{ moment(post.date).format() }}"
4434
content="{{ date(post.date, config.date_format) }}">
45-
{{ date(post.date, 'MM-DD') }}
35+
{{ date(post.date, 'YYYY-MM-DD') }}
4636
</time>
4737
</div>
4838

custom/styles.styl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,18 @@ html {
2222
}
2323
}
2424

25+
// center the paginator
26+
.archive, .tag, .category {
27+
.pagination {
28+
text-align: center;
29+
}
30+
}
31+
32+
// center the footer
33+
.footer .footer-inner {
34+
text-align: center;
35+
}
36+
2537
// make empty post nonclickable
2638
.post-title-link.post-empty {
2739
pointer-events: none;

0 commit comments

Comments
 (0)