nasg/templates/Year.j2.html
Peter Molnar 67f2978aeb Reverting layout back to divs, because the "semantic" structuring of HTML5 is a mess and only complicates my life.
It's also for more backwards compatibility, though <figure> and <figcaption> is going to stay, because those make a lot of sense.

Coming up next: out with JSON-LD. It was an interesting experiment which didn't bring any good at all, even in the long run.
2020-05-17 18:14:43 +01:00

57 lines
1.8 KiB
HTML

{% extends "base.j2.html" %}
{% block lang %}{% endblock %}
{% block title %}{{ category.title }}{% endblock %}
{% block meta %}
<link rel="canonical" href="{{ category.url }}" />
<link rel="alternate" type="application/rss+xml" title="{{ category.title }} RSS feed" href="{{ category.feed }}{{ fnames.rss }}" />
<link rel="alternate" type="application/atom+xml" title="{{ category.title }} ATOM feed" href="{{ category.feed }}{{ fnames.atom }}" />
<link rel="alternate" type="application/json" title="{{ category.title }} JSON feed" href="{{ category.feed }}{{ fnames.json }}" />
<link rel="feed" title="{{ category.title}} feed" href="http://www.unmung.com/feed?feed={{ category.feed|urlencode }}" />
{% endblock %}
{% block pagination %}
{% if category.paginated %}
<div id="pagination">
<ol>
{% for y, url in category.years.items() %}
{% if (y == category.year) or (not category.year and loop.first) %}
<li>
<span>
{{ y }}
</span>
</li>
{% else %}
<li>
<a href="{{ url|relurl(baseurl) }}">
<strong>{{ y }}</strong>
</a>
</li>
{% endif %}
{% endfor %}
</ol>
</div>
{% endif %}
{% endblock %}
{% block content %}
<div id="main" class="h-feed hatom {{ category.name }}">
{% set year = [0] %}
{% for post in posts %}
{% set _year = year.pop() %}
{% if not category.paginated and _year != post.copyrightYear %}
{% if not loop.first %}
</div>
{% endif %}
<div class="year">
<h2>{{ post.copyrightYear }}</h2>
{% endif %}
{% set _ = year.append(post.copyrightYear)%}
{% include 'meta-article.j2.html' %}
{% if not category.paginated and loop.last %}
</div>
{% endif %}
{% endfor %}
</div>
{% endblock %}