From 0ca88839cdb947878220223c3a7571a8c407d788 Mon Sep 17 00:00:00 2001 From: Merlin Buczek Date: Tue, 11 Jun 2019 12:57:55 +0200 Subject: [PATCH] Styling, content preview --- mpicms/static/css/custom.css | 5 ++-- mpicms/templates/base/category_page.html | 13 +--------- .../base/components/content_preview.html | 23 +++++++++++++++++ mpicms/templates/base/home_page.html | 25 ++----------------- mpicms/templates/base/page.html | 8 +++--- 5 files changed, 33 insertions(+), 41 deletions(-) create mode 100644 mpicms/templates/base/components/content_preview.html diff --git a/mpicms/static/css/custom.css b/mpicms/static/css/custom.css index 22ffe32..795adb5 100644 --- a/mpicms/static/css/custom.css +++ b/mpicms/static/css/custom.css @@ -57,9 +57,9 @@ select, input { height: 5rem !important; } -.contains-breadcrumb { +/* .contains-breadcrumb { padding-top: 1rem; -} +} */ .title { color: #006c66; @@ -182,6 +182,7 @@ select, input { } .breadcrumb { + padding-top: 1rem; margin: 0.5rem; font-size: 80%; font-family: "Merriweather Sans", sans-serif; diff --git a/mpicms/templates/base/category_page.html b/mpicms/templates/base/category_page.html index bb20ff9..ade4a4a 100644 --- a/mpicms/templates/base/category_page.html +++ b/mpicms/templates/base/category_page.html @@ -12,17 +12,6 @@

{{ page.title }}

{% include 'news/components/news_preview.html' with news=page.news %} -

Content

- {% for child in page.get_children.live %} - -
-
-

- {{ child.title }} -

-
-
-
- {% endfor %} + {% include 'base/components/content_preview.html' with pages=page.get_children.in_menu.live %} {% endblock %} \ No newline at end of file diff --git a/mpicms/templates/base/components/content_preview.html b/mpicms/templates/base/components/content_preview.html new file mode 100644 index 0000000..18cf796 --- /dev/null +++ b/mpicms/templates/base/components/content_preview.html @@ -0,0 +1,23 @@ +{% load wagtailcore_tags %} + +
+ {% for item in pages %} +
+
+ {{ item.title }} +
+ {{ item.specific.preview|richtext }} + +
+
+
+ {% endfor %} +
\ No newline at end of file diff --git a/mpicms/templates/base/home_page.html b/mpicms/templates/base/home_page.html index 119f118..296848a 100644 --- a/mpicms/templates/base/home_page.html +++ b/mpicms/templates/base/home_page.html @@ -1,7 +1,6 @@ {% extends 'base/page_wide.html' %} -{% load i18n %} -{% load wagtailcore_tags %} +{% load i18n wagtailcore_tags %} {% block page_content %} @@ -34,27 +33,7 @@

{% trans 'Upcoming events' %}

{% trans 'Content' %}

-
- {% for item in page.categories %} -
-
- {{ item.title }} -
- {{ item.specific.preview|richtext }} - -
-
-
- {% endfor %} -
+ {% include 'base/components/content_preview.html' with pages=page.categories %} {% endblock %} \ No newline at end of file diff --git a/mpicms/templates/base/page.html b/mpicms/templates/base/page.html index a5780fa..3f02a84 100644 --- a/mpicms/templates/base/page.html +++ b/mpicms/templates/base/page.html @@ -3,12 +3,12 @@ {% block content %}
-
+
{% include 'base/components/breadcrumb.html' %} - {% block page_content %} - {% endblock %} -
+ {% block page_content %} + {% endblock %} +