{% extends 'layouts/index.html' %} {% from 'macros.html' import render_field %} {% block content %} {% if current_user.is_authenticated %}
{{ form.csrf_token }} {{ render_field(form.text, show_label=False) }}
{% endif %}
{% for post in posts %}
{{ post.text }}
{% with comment_count = post.comments|length %} Posted by {{ post.author.name }} {{ post.get_time_ago() }} ago. | {{ comment_count }} comment{{ comment_count|pluralize }} {% endwith %}
{% endfor %} {% endblock content %}