From c2f3da4a5607c5368953cd398f0ef32623436792 Mon Sep 17 00:00:00 2001 From: Tom Teichler <tom.teichler@teckids.org> Date: Sun, 1 Mar 2020 15:55:17 +0100 Subject: [PATCH] Add content --- templates/base.html | 3 ++ templates/page_with_carousel.html | 69 ++++++++++++++++++++++++++++++- 2 files changed, 71 insertions(+), 1 deletion(-) diff --git a/templates/base.html b/templates/base.html index 7c8a764..7b11a49 100644 --- a/templates/base.html +++ b/templates/base.html @@ -96,6 +96,9 @@ <!-- Page Header --> {% block header %}{% endblock %} + <!-- Template Content --> + {% block template_content %}{% endblock %} + <!-- Main Content --> {% block content %}{% endblock %} diff --git a/templates/page_with_carousel.html b/templates/page_with_carousel.html index 353c316..f3bdb78 100644 --- a/templates/page_with_carousel.html +++ b/templates/page_with_carousel.html @@ -1,6 +1,6 @@ {% extends 'base.html' %} -{% block content %} +{% block template_content %} <div id="myCarousel" class="carousel slide" data-ride="carousel"> <div class="carousel-inner"> {% for text, image in CAROUSEL_ITEMS %} @@ -22,4 +22,71 @@ </a> </div> + +{% endblock %} + +{% block content %} + <div class="container title"> + <div class="row clearfix"> + <div class="column full"> + <h1>{{ page.title }}</h1> + {% import 'translations.html' as translations with context %} + {{ translations.translations_for(page) }} + </div> + </div> + </div> + + <section class='page_content'> + <div class='container'> + <div class='row clearfix'> + <div class='column full'> + {% block data %} + {{ page.content }} + {% endblock data %} + </div> + </div> + </div> + </section> + + {% if page.modified and PAGES_DEBUG == true %} + <p> + <small>Created: {{ page.locale_date }}</small>, + <small>Last updated: {{ page.locale_modified }}</small> + </p> + {% endif %} + + + {% if PAGES_DEBUG == true %} + <div class='page_content debug'> + + <div> + <p>Debug stuff. Ignore</p> + <p> + url: {{ page.url }} <br/> + slug: {{ page.slug }}<br/> + {% if page.parent %} + page parent: {{ page.parent }}<br/> + page parent url: {{ page.parent.url }} <br/> + page parent title: {{ page.parent.title }} + {% endif %} + </p> + + <p>page parents</p> + <ul> + <li>page.parents.length: {{ page.parents|length }}</li> + {% for parent in page.parents %} + <li>url: {{ parent.url }} - title: {{ parent.title }}<br/> + <a href="/{{ parent.url }}">{{ parent.title }}</a></li> + {% endfor %} + </ul> + <p>page children</p> + <ul> + {% for child in page.children %} + <li>url: {{ child.url }} - title: {{ child.title }}<br/> + <a href="/{{ child.url }}">{{ child.title }}</a></li> + {% endfor %} + </ul> + </div> + </div> + {% endif %} {% endblock %} -- GitLab