From: Jérémy Fabre Date: Fri, 12 Aug 2016 11:45:29 +0000 (+0200) Subject: Fix the page, basicpage, department and article templates. X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=92e9961f9b4a0ce02f91eb0e58dee4e2e23f7fd1;p=mezzo.git Fix the page, basicpage, department and article templates. --- diff --git a/app/static/src/sass/modules/_tag.scss b/app/static/src/sass/modules/_tag.scss index 7ea4b3b5..609608da 100644 --- a/app/static/src/sass/modules/_tag.scss +++ b/app/static/src/sass/modules/_tag.scss @@ -30,8 +30,8 @@ $module: ".tag"; @include padding-right(.5); } - & + #{$module} { + /*& + #{$module} { margin-left: -0.25em; - } + }*/ } diff --git a/app/templates/magazine/article/article_detail.html b/app/templates/magazine/article/article_detail.html index 6805f382..81572133 100644 --- a/app/templates/magazine/article/article_detail.html +++ b/app/templates/magazine/article/article_detail.html @@ -61,14 +61,29 @@ {% endblock %} {% block page_sub_content %} + {% if article.related_articles.all %} -

{% trans "Also discover" %}

- {% for article in article.related_articles.all %} - {% include 'magazine/article/includes/article_card.html' %} - {% endfor %} + +
+
+
+

{% trans "Also discover" %}

+
+
+
+ {% for article in article.related_articles.all %} +
+ {% include 'magazine/article/includes/article_card.html' %} +
+ {% endfor %} +
+
+ {% endif %} + {% endblock %} + {% block page_sidebar %}
diff --git a/app/templates/magazine/article/article_list.html b/app/templates/magazine/article/article_list.html index c9db077f..0ca5f941 100644 --- a/app/templates/magazine/article/article_list.html +++ b/app/templates/magazine/article/article_list.html @@ -90,7 +90,6 @@ {% for article in article_list %} {% with article as post %} {# {% trans "Article" %}#} - {% include 'magazine/article/includes/post_card.html' %} {% endwith %} {% endfor %}
diff --git a/app/templates/magazine/article/includes/article_card.html b/app/templates/magazine/article/includes/article_card.html index 2e5f6835..ffc868db 100644 --- a/app/templates/magazine/article/includes/article_card.html +++ b/app/templates/magazine/article/includes/article_card.html @@ -7,7 +7,7 @@
- {% trans 'Actualité' %} + {% trans 'News' %}
{% if article.keywords %}
diff --git a/app/templates/magazine/topic/topic_detail.html b/app/templates/magazine/topic/topic_detail.html index 4f387d5a..b21aaf28 100644 --- a/app/templates/magazine/topic/topic_detail.html +++ b/app/templates/magazine/topic/topic_detail.html @@ -27,7 +27,7 @@ {% block breadcrumb_menu %} {{ block.super }} - + {% endblock %} @@ -62,7 +62,7 @@
{% for article in topic.articles.all %} -
+
{% include 'magazine/article/includes/article_card.html' %}
{% endfor %} diff --git a/app/templates/pages/basicpage.html b/app/templates/pages/basicpage.html index a8e162c8..d8d30c02 100644 --- a/app/templates/pages/basicpage.html +++ b/app/templates/pages/basicpage.html @@ -60,28 +60,24 @@ {% endblock %} -{% block main %} - {{ block.super }} - +{% block page_sub_content %} {% if page.basicpage.pageblock_set.all %}
- {% block page_sub_content %} -
- {% for pageblock in page.basicpage.pageblock_set.all %} -
-
- {% if not forloop.first and pageblock.with_separator %} -
- {% endif %} -

{{ pageblock.title }}

- {{ pageblock.content|richtext_filters|safe }} -
+
+ {% for pageblock in page.basicpage.pageblock_set.all %} +
+
+ {% if not forloop.first and pageblock.with_separator %} +
+ {% endif %} +

{{ pageblock.title }}

+ {{ pageblock.content|richtext_filters|safe }}
- {% endfor %} - {% endblock %} +
+ {% endfor %}
diff --git a/app/templates/pages/department.html b/app/templates/pages/department.html index 205df53e..c7e29562 100644 --- a/app/templates/pages/department.html +++ b/app/templates/pages/department.html @@ -44,75 +44,58 @@ {{ page.department.content|richtext_filters|safe }} {% endeditable %} - {% if page.get_ascendants|length == 1 %} - {% children_pages page.id as childrens %} - {% if childrens %} -
- {% for children in childrens %} - {% with children as object %} - {% include "pages/includes/page_card.html" %} - {% endwith %} - {% endfor %} -
- {% endif %} - {% endif %} - {% comment %} Add the slider here {% endcomment %} {% endblock %} -{% block main %} - {{ block.super }} +{% block page_sub_content %} - {% if page.get_ascendants|length == 1 %} - {% children_pages page.id as childrens %} - {% if childrens %} + {% if page.department.pageblock_set.all %} +
- {% for children in childrens %} -
- {% with children as object %} - {% include "pages/includes/page_card.html" %} - {% endwith %} -
- {% endfor %} +
+
+ {% for pageblock in page.department.pageblock_set.all %} +
+
+ {% if not forloop.first and pageblock.with_separator %} +
+ {% endif %} +

{{ pageblock.title }}

+ {{ pageblock.content|richtext_filters|safe }} +
+
+ {% endfor %} +
- {% endif %} +
{% endif %} - {% if page.department.articles_related.all %} -

{% trans "Also discover" %}

- {% for article in page.department.articles_related.all %} - {% include 'magazine/article/includes/article_card.html' %} - {% endfor %} - {% endif %} +{% endblock %} +{% block page_related_content %} - {% if page.department.pageblock_set.all %} -
-
-
-
- {% block page_sub_content %} -
- {% for pageblock in page.department.pageblock_set.all %} -
-
- {% if not forloop.first and pageblock.with_separator %} -
- {% endif %} -

{{ pageblock.title }}

- {{ pageblock.content|richtext_filters|safe }} -
-
- {% endfor %} - {% endblock %} -
+ {% if page.department.articles_related.all %} + +
+
+
+

{% trans "Also discover" %}

+
+ {% for article in page.department.articles_related.all %} +
+ {% include 'magazine/article/includes/article_card.html' %} +
+ {% endfor %} +
+ {% endif %} + {% endblock %} diff --git a/app/templates/pages/page.html b/app/templates/pages/page.html index fad24f9e..5de60ccf 100644 --- a/app/templates/pages/page.html +++ b/app/templates/pages/page.html @@ -43,14 +43,12 @@ {{ page.content }} {% endblock %}
-
- {% block page_slider %} - {% endblock %} -
-
- {% block page_sub_content %} - {% endblock %} -
+ {% block page_slider %} + {% endblock %} + {% block page_sub_content %} + {% endblock %} + {% block page_related_content %} + {% endblock %}