Add reversed attribute to posts list

Without CSS, the last post will be number 1. In browsers other than IE and Edge (where it's currently under consideration), the `reversed` attribute will match the effect of the CSS counter. I like putting the attribute first so it's clear that it's a particular kind of "ordered list: reversed."
This commit is contained in:
Den McHenry 2018-09-04 12:11:40 -07:00 committed by GitHub
parent ef7783222d
commit 50ec3a7e5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,4 @@
<ol class="postlist" style="counter-reset: start-from {{ postslist.length + 1 }}"> <ol reversed class="postlist" style="counter-reset: start-from {{ postslist.length + 1 }}">
{% for post in postslist | reverse %} {% for post in postslist | reverse %}
<li class="postlist-item{% if post.url == url %} postlist-item-active{% endif %}"> <li class="postlist-item{% if post.url == url %} postlist-item-active{% endif %}">
<a href="{{ post.url | url }}" class="postlist-link">{% if post.data.title %}{{ post.data.title }}{% else %}<code>{{ post.url }}</code>{% endif %}</a> <a href="{{ post.url | url }}" class="postlist-link">{% if post.data.title %}{{ post.data.title }}{% else %}<code>{{ post.url }}</code>{% endif %}</a>