Skip to content

Commit

Permalink
Revert "Fix #202. Change code to conform to Jinaj 2.10 API (#207)"
Browse files Browse the repository at this point in the history
This reverts commit c0624f9.

Fix #223

 Conflicts:
	templates/archives.html
  • Loading branch information
talha131 committed Feb 10, 2019
1 parent 3650d68 commit e541ba3
Showing 1 changed file with 20 additions and 25 deletions.
45 changes: 20 additions & 25 deletions templates/archives.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,32 +34,27 @@ <h1><a href="{{ SITEURL }}/{{ ARCHIVES_URL|default('archives') }}">All Posts</a>
<div class="row-fluid">
<div class="span10 offset2">
<div class="blog-archives">
{% set last_year = 0 %}
{% for article in dates %}
{% set year = article.date.strftime('%Y') %}
{% if loop.first %}
<h2 id="{{year }}"><a href="#{{year}}">{{ year }}</a></h2>
{% else %}
{% set prevyear = loop.previtem.date.strftime('%Y') %}
{%if prevyear != year %}
<h2 id="{{year }}"><a href="#{{year}}">{{ year }}</a></h2>
{% endif %}
{% endif %}

{% if loop.last %}
<article itemscope class="last-entry-of-year">
{% else %}
{% set next_year = loop.nextitem.date.strftime('%Y') %}

{% if next_year != year %}
<article itemscope class="last-entry-of-year">
{% else %}
<article itemscope>
{% endif %}
{% endif %}

<a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }} {%if article.subtitle %} <small> {{ article.subtitle }} </small> {% endif %} </a>
<time itemprop="dateCreated" datetime="{{ article.date.isoformat() }}">{{ article.locale_date }}</time>
</article>
{% set year = article.date.strftime('%Y') %}
{%if last_year != year %}
<h2 id="{{year }}"><a href="#{{year}}">{{ year }}</a></h2>
{% set last_year = year %}
{% endif %}
{% set next_year = 0 %}
{% if not loop.last %}
{% set next = loop.index0 + 1 %}
{% set next_article = dates[next] %}
{% set next_year = next_article.date.strftime('%Y') %}
{% endif %}
{% if next_year != year %}
<article class="last-entry-of-year">
{% else %}
<article>
{% endif %}
<a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }} {%if article.subtitle %} <small> {{ article.subtitle }} </small> {% endif %} </a>
<time pubdate="pubdate" datetime="{{ article.date.isoformat() }}">{{ article.locale_date }}</time>
</article>
{% endfor %}
</div>
</div>
Expand Down

0 comments on commit e541ba3

Please sign in to comment.