{% for chapter in chapters %}
      <div class="story-item">
        <h3><a href="{{ url_for('chapter.view', story_id=chapter.story.id, chapter_order=chapter.order) }}">{{ chapter.autotitle }}</a></h3>
        <p>{{ chapter.text_preview }}</p>
           <p><a href="{{ url_for('story.view', pk=chapter.story.id) }}">{{ chapter.story.title }}</a> от <a class="authorlink" href="{{ url_for('author.info', user_id=chapter.story.authors[0].id) }}">{{ chapter.story.authors[0].username }}</a>
           {%- if chapter.first_published_at %} <time datetime="{{ chapter.first_published_at.strftime('%Y-%m-%dT%H:%M:%SZ') }}" title="{{ chapter.first_published_at|datetimeformat('d MMMM Y, HH:mm') }}">{{ chapter.first_published_at|timedeltaformat }} назад</time>
           {%- endif -%}
           </p>
    </div>
{% endfor %}
