New archive handling, and an adjustment to the existing archive
This commit is contained in:
parent
897a130e29
commit
4c4d9c5696
3 changed files with 44 additions and 1 deletions
34
_layouts/archive.html
Normal file
34
_layouts/archive.html
Normal file
|
@ -0,0 +1,34 @@
|
|||
---
|
||||
license: MIT
|
||||
layout: default
|
||||
format: page
|
||||
comments: false
|
||||
show_meta: false
|
||||
---
|
||||
<div id="blog-index" class="row">
|
||||
<div class="small-12 columns t30">
|
||||
<h1>{{ page.title }}</h1>
|
||||
<ul class="side-nav">
|
||||
{% for post in page.archive.posts reversed %}
|
||||
<li><a href="{{post.url}}">{{ post.title }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<!-- Pagination links -->
|
||||
<div class="medium-8 columns t30">
|
||||
<nav id="pagination">
|
||||
{% if page.archive.paginator.previous_page %}
|
||||
<a class="radius button small" href="{{ page.archive.paginator.previous_page_path }}" class="previous">Previous</a>
|
||||
{% else %}
|
||||
<span class="radius button disabled small" class="previous">Previous</span>
|
||||
{% endif %}
|
||||
<span class="page_number">Page: {{ page.archive.paginator.page }} of {{ page.archive.paginator.total_pages }}</span>
|
||||
{% if page.archive.paginator.next_page %}
|
||||
<a class="radius button small" href="{{ page.archive.paginator.next_page_path }}" class="next">Next</a>
|
||||
{% else %}
|
||||
<span class="radius button disabled small" class="next">Next</span>
|
||||
{% endif %}
|
||||
</nav>
|
||||
</div> <!-- medium-8 columns t30 -->
|
||||
</div> <!-- row -->
|
Reference in a new issue