index.html 732 B

12345678910111213141516171819202122232425
  1. {% include 'parts/header.html' %}
  2. <main class="container">
  3. {% include 'parts/author_list.html' %}
  4. <h1>New posts</h1>
  5. {% for post in posts %}
  6. <div class="posts">
  7. <div class="card mycard">
  8. <h5 class="card-header">{{ post.title }}</h5>
  9. <div class="card-body">
  10. <h5 class="card-title">
  11. By {{ users.get_user_by_id(post.user_id).username }}
  12. </h5>
  13. <h5 class="card-title">POST ID: {{ post.id }}</h5>
  14. <p class="card-text">{{ post.body }}</p>
  15. <a href="{{ url_for('get_post', post_id=post.id) }}" class=""
  16. >Read post >></a
  17. >
  18. </div>
  19. </div>
  20. </div>
  21. {% endfor %} {% include 'parts/pagination.html' %}
  22. </main>
  23. {% include 'parts/footer.html' %}