Skip to content

Commit

Permalink
Post Pagination
Browse files Browse the repository at this point in the history
  • Loading branch information
mkiser committed Feb 18, 2017
1 parent 97307c3 commit be70533
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ PLATFORMS
DEPENDENCIES
algoliasearch-jekyll (~> 0.8.0)
github-pages (= 123)
jekyll-paginate
jekyll-sitemap
jekyll_pages_api

Expand Down
11 changes: 11 additions & 0 deletions _layouts/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,15 @@ <h1 class="post-title">
<small><strong>Subscribe:</strong> <a href="http://eepurl.com/cAiR-b" target="_blank">Get the Daily WTF in your inbox for free</a>
</small>
</p>


<div class="next-prev">
{% if page.previous.url %}
<a class="prev" href="{{page.previous.url}}">&laquo; {{page.previous.title}}</a>
{% endif %}
{% if page.next.url %}
<a class="next" href="{{page.next.url}}">{{page.next.title}} &raquo;</a>
{% endif %}
</div>

</article>
11 changes: 11 additions & 0 deletions _sass/_pagination.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,14 @@
}
}

.next-prev {
text-align: center;
padding: 1em 0em 0em 0em;
font-size: 1.25em;

a {
padding: 0 .25em;
color: #0093f0;
}
}

0 comments on commit be70533

Please sign in to comment.