Labels for blog post info

This commit is contained in:
str4d
2013-06-09 23:23:15 +00:00
parent c6adccacad
commit effb6f2521
2 changed files with 4 additions and 5 deletions

View File

@@ -3,8 +3,8 @@
{% block title %}{{ title }} - {{ _('Blog') }}{% endblock %}
{% block content %}
<ul id="post-info" class="lastupdated">
<li class="date">{{ meta.date }}</li>
<li class="author">{{ meta.author }}</li>
<li class="date">Posted: {{ meta.date }}</li>
<li class="author">Author: {{ meta.author }}</li>
<li class="category">{{ render_categories(meta.category)|safe }}</li>
</ul>
{% autoescape false %}

View File

@@ -37,8 +37,7 @@
{%- endmacro -%}
{%- macro render_categories(categories) -%}
{%- if categories and categories|length %}
{%- for category in categories %}<a href="{{ get_url('blog_index', category=category) }}">{{ category }}</a>{% if not loop.last %}, {% endif %}{% endfor %}
{%- else %}{{ _('None') }}
{%- if categories and categories|length -%}
{{ _('Posted in') }} {% for category in categories %}<a href="{{ get_url('blog_index', category=category) }}">{{ category }}</a>{% if not loop.last %}, {% endif %}{% endfor %}
{%- endif %}
{%- endmacro %}