From 8ba283d31c01a989164e857c7e99fe5418e41c56 Mon Sep 17 00:00:00 2001 From: magicfelix <felix@felix-zauberer.de> Date: Sat, 29 Aug 2020 13:26:06 +0200 Subject: [PATCH] Add page_with_button (without carousel) --- templates/page_with_button.html | 78 +++++++++++++++++++++++ templates/page_with_carousel_button.html | 79 +----------------------- 2 files changed, 79 insertions(+), 78 deletions(-) create mode 100644 templates/page_with_button.html diff --git a/templates/page_with_button.html b/templates/page_with_button.html new file mode 100644 index 0000000..c2e0a85 --- /dev/null +++ b/templates/page_with_button.html @@ -0,0 +1,78 @@ +{% extends 'base.html' %} + +{% block content %} + + <div class="container title"> + <div class="row clearfix"> + <div class="column full"> + {% 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 %} + +{% block template_content_footer %} + +<div class="button-wrapper"> + <button type="button" class="btn btn-default btn-lg"> + {% set button = page.button.split('|') %} + <a href="{{ button[0] }}">{{ button[1] }}</a> + </button> +</div> + +{% endblock %} diff --git a/templates/page_with_carousel_button.html b/templates/page_with_carousel_button.html index ac68d74..4ac9796 100644 --- a/templates/page_with_carousel_button.html +++ b/templates/page_with_carousel_button.html @@ -1,4 +1,4 @@ -{% extends 'base.html' %} +{% extends 'page_with_button.html' %} {% block template_content_head %} <div id="myCarousel" class="carousel slide" data-ride="carousel"> @@ -25,80 +25,3 @@ </div> {% endblock %} - -{% block content %} - - <div class="container title"> - <div class="row clearfix"> - <div class="column full"> - {% 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 %} - -{% block template_content_footer %} - -<div class="button-wrapper"> - <button type="button" class="btn btn-default btn-lg"> - {% set button = page.button.split('|') %} - <a href="{{ button[0] }}">{{ button[1] }}</a> - </button> -</div> - -{% endblock %} -- GitLab