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
|
@ -229,5 +229,14 @@ disqus_commments:
|
||||||
forum_name: dennogumi
|
forum_name: dennogumi
|
||||||
limit: 5
|
limit: 5
|
||||||
|
|
||||||
|
archive:
|
||||||
|
- path: /:year
|
||||||
|
layout: archive
|
||||||
|
title: Blog archive - :year
|
||||||
|
- path: /:year/:month
|
||||||
|
layout: archive
|
||||||
|
title: Blog Archive - :month :year
|
||||||
|
|
||||||
gems:
|
gems:
|
||||||
|
- jekyll/itafroma/archive
|
||||||
- jekyll-sitemap
|
- jekyll-sitemap
|
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 -->
|
|
@ -14,7 +14,7 @@ permalink: "archive/"
|
||||||
|
|
||||||
<dl class="accordion" data-accordion>
|
<dl class="accordion" data-accordion>
|
||||||
{% assign counter = 1 %}
|
{% assign counter = 1 %}
|
||||||
{% for post in site.posts limit:1000 %}
|
{% for post in site.posts limit:1000 reversed %}
|
||||||
<dd class="accordion-navigation">
|
<dd class="accordion-navigation">
|
||||||
<a href="#panel{{ counter }}"><span class="iconfont"></span> {% if post.subheadline %}{{ post.subheadline }} › {% endif %}<strong>{{ post.title }}</strong></a>
|
<a href="#panel{{ counter }}"><span class="iconfont"></span> {% if post.subheadline %}{{ post.subheadline }} › {% endif %}<strong>{{ post.title }}</strong></a>
|
||||||
<div id="panel{{ counter }}" class="content">
|
<div id="panel{{ counter }}" class="content">
|
||||||
|
|
Reference in a new issue