From 9386fe8c132944d001884630ed4e931e37c828c4 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Fri, 5 Jun 2020 11:25:07 +0200 Subject: Add section template. Also move most content to the section templates, leave only section descriptions and the latest posts in each for the index page. --- templates/index.html | 78 ++++++++++++++++++++-------------------------------- 1 file changed, 30 insertions(+), 48 deletions(-) (limited to 'templates/index.html') diff --git a/templates/index.html b/templates/index.html index a712ac4..08beb0a 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,53 +1,35 @@ {% extends "base.html" %} {% block content %} -
-
- {{ section.content | safe }} -
+
+ {{ section.content | safe }} +
- -
+
+ {% for sub in section.subsections %} + {% set s = get_section(path=sub) %} +
+
+

{{ s.title }}

+
+ {{ s.description | markdown | safe }} +
+
+
+

Siste innlegg:

+
    + {% for post in s.pages | reverse %} +
  • + {{ post.date }}: + + {{ post.title }} + +
  • + {% if loop.index == 5 %}{% break %}{% endif %} + {% endfor %} +
+
+
+ {% endfor %} +
{% endblock content %} -- cgit v1.2.3