From 7c6167d915145198e2c25f0925949cada1cfbd71 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Wed, 11 Oct 2017 21:39:58 +0200 Subject: [PATCH] theme: make the index page equivalent to archives if not overriden. --- pelican-theme/templates/index.html | 42 +++++++++++++++++++++++++++--- 1 file changed, 39 insertions(+), 3 deletions(-) diff --git a/pelican-theme/templates/index.html b/pelican-theme/templates/index.html index ee6776e8..08589117 100644 --- a/pelican-theme/templates/index.html +++ b/pelican-theme/templates/index.html @@ -1,3 +1,39 @@ -{% extends "base.html" %} -{% block main %} -{% endblock %} +{% extends "base_blog.html" %} + +{% block head %} + {{- super() -}} + {% if articles_page.has_previous() %} + + {% endif %} + {% if articles_page.has_next() %} + + {% endif %} +{% endblock head %} + +{% block content %} +
+ {% block content_title %} + {% endblock content_title %} + {% for article in articles_page.object_list %} +
+ {% macro header() %}{% include "article_header.html" %}{% endmacro %} + {{ header()|indent(8) }} + {% if loop.first and articles_page.number == 1 %} +
+ +{{ article.content }} + + {% endif %} + {% macro footer() %}{% include "article_footer.html" %}{% endmacro %} + {{ footer()|indent(8) }} + {% if not loop.first or articles_page.number != 1 %} +
+ {% endif %} +
+ {% endfor %} + {% if articles_page.has_other_pages() %} + {% macro pagination() %}{% include 'pagination.html' %}{% endmacro %} + {{ pagination()|indent(6) }} + {% endif %} +
+{% endblock content %} -- 2.30.2