{% import "components/nothing.html" as nothing with context %} {% import "components/user.html" as user with context %} {% import "components/paginator.html" as paginator with context %} {% extends "layout/basic.html" %} {% block content %}
{% if not ddocs.length %} {{ nothing.render('no blog yet...') }} {% else %}
    {%- for ddoc in ddocs -%}
  1. {{ datetimeSpan(ddoc._id, false, 'D')|safe }}
    {{ datetimeSpan(ddoc._id, false, 'YYYY-M')|safe }}

    {{ ddoc['title'] }}

    • {{ _('{0} views').format(ddoc.views) }}
    • {{ datetimeSpan(ddoc.updateAt)|safe }}
  2. {%- endfor -%}
{% if page and dpcount %}{{ paginator.render(page, dpcount) }}{% endif %} {% endif %}
{% if udoc.blogpic %}
{% endif %}

{{ _("{0}'s blog").format(udoc.uname) }}

{% if handler.user._id == udoc._id %}

{{ _('Create a Post') }}

{% endif %}
{% endblock %}