{% macro render_entry_related(entry, comment_count=true) %} {% set pipe = joiner('|') %} {%- if entry.categories %} {{ pipe() }} {{ _('Categories') }}: {% for category in entry.categories -%} {{ category.name|e }} {%- if not loop.last %}, {% endif %} {%- endfor %} {%- endif %} {%- if entry.tags %} {{ pipe() }} {{ _('Tagged as') }}: {% for tag in entry.tags -%} {{ tag.name|e }} {%- if not loop.last %}, {% endif %} {%- endfor %} {% endif %} {%- if comment_count %} {{ pipe() }} {% trans comments=entry.comment_count %}{{ comments }} comment{% pluralize %}{{ comments}} comments{% endtrans -%} {% endif %} {%- if request.user.is_manager %} {{ pipe() }} {{ _('Edit') }} {%- endif %} {% endmacro %} {% macro render_entry(entry) -%}
{{ emit_event('before-entry-rendered', entry) }}

{{ entry.title|e }}

{%- trans author='%s' % (url_for(entry.author), entry.author.display_name|e), pub_date=entry.pub_date|datetimeformat|e -%} written by {{ author }}, on {{ pub_date }}. {%- endtrans %} {%- if entry.is_scheduled %}
[ {% trans time_span=entry.pub_date|timedeltaformat %}Scheduled Post: This entry will appear in {{ time_span }}.{% endtrans %} ]{% endif -%}

{{ entry.intro or entry.body }} {% if entry.intro -%}

{{ _("Read on") }}...

{%- endif %}
{{ emit_event('after-entry-rendered', entry) }}
{%- endmacro %}