Get a basic blog up and running
[styx.blog] / core / templates / core / post_list.html
diff --git a/core/templates/core/post_list.html b/core/templates/core/post_list.html
new file mode 100644 (file)
index 0000000..8d6561c
--- /dev/null
@@ -0,0 +1,27 @@
+{% extends 'core/base.html' %}
+
+{% block content %}
+
+{% include 'core/page_nav.html' %}
+
+{% for post in page_obj %}
+<article>
+  <h1>
+    <a href='{% url "post-detail" post.slug %}'>
+      {{ post.title }}
+    </a>
+  </h1>
+
+  <div class='teaser'>
+    {{ post.teaser_html }}
+  </div>
+
+  <a class='read-more' href='{% url "post-detail" post.slug %}'>
+    Read more
+  </a>
+</article>
+{% endfor %}
+
+{% include 'core/page_nav.html' %}
+
+{% endblock %}