From: Jérémy Fabre Date: Sat, 13 Aug 2016 09:32:13 +0000 (+0200) Subject: Fix a lot of templates X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=6a7dd35a207240ee3492f1319da4e844276a5f6b;p=mezzo.git Fix a lot of templates --- diff --git a/app/static/src/sass/global/_helpers.scss b/app/static/src/sass/global/_helpers.scss index 130269d6..d4b9e5f4 100755 --- a/app/static/src/sass/global/_helpers.scss +++ b/app/static/src/sass/global/_helpers.scss @@ -52,6 +52,21 @@ .pl1 { @include padding-left(1); } +.p2 { + @include padding(2); +} +.pt2 { + @include padding-top(2); +} +.pb2 { + @include padding-bottom(2); +} +.pr2 { + @include padding-right(2); +} +.pl2 { + @include padding-left(2); +} .bg { background-color: $color-main; } diff --git a/app/templates/magazine/article/article_detail.html b/app/templates/magazine/article/article_detail.html index 81572133..ec2e817f 100644 --- a/app/templates/magazine/article/article_detail.html +++ b/app/templates/magazine/article/article_detail.html @@ -16,30 +16,48 @@ article {% endblock %} +{% block body_class %} + {% if department_parent %} + pattern pattern-bg {{ department_parent.weaving_css_class }} + {% endif %} +{% endblock %} + {% block breadcrumb_menu %} {{ block.super }} {% if topic_parent %} - + + {% endif %} {% if department_parent %} - + {% endif %} {% endblock %} -{% block page_title %} +{% block page_tags %} +
+ {% trans 'News' %} +
{% if article.keywords %} - {{ article.keywords.first }} | {{ article.model_name }} +
+ {{ article.keywords.first }} +
{% endif %} +{% endblock %} + +{% block page_title %} + {% editable article.title %} -

{{ article.title }}

+

{{ article.title }}

{% endeditable %} {% editable article.sub_title %} -

{{ article.sub_title }}

+
+ {{ article.sub_title }} +
{% endeditable %} {% endblock %} @@ -60,22 +78,24 @@ {% endif %} {% endblock %} -{% block page_sub_content %} +{% block page_related_content %} {% if article.related_articles.all %} -
-
-
-

{% trans "Also discover" %}

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

{% trans "Also discover" %}

- {% endfor %} +
+
+ {% for article in article.related_articles.all %} +
+ {% include 'magazine/article/includes/article_card.html' %} +
+ {% endfor %} +
@@ -83,7 +103,6 @@ {% endblock %} - {% block page_sidebar %}
diff --git a/app/templates/magazine/topic/topic_detail.html b/app/templates/magazine/topic/topic_detail.html index b21aaf28..3a4a3f61 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 %} diff --git a/app/templates/pages/basicpage.html b/app/templates/pages/basicpage.html index d8d30c02..674de2cd 100644 --- a/app/templates/pages/basicpage.html +++ b/app/templates/pages/basicpage.html @@ -54,10 +54,6 @@ {% endif %} {% endif %} - {% comment %} - Add the slider here - {% endcomment %} - {% endblock %} {% block page_sub_content %} diff --git a/app/templates/pages/department.html b/app/templates/pages/department.html index f0887c97..66ddbe61 100644 --- a/app/templates/pages/department.html +++ b/app/templates/pages/department.html @@ -44,10 +44,6 @@ {{ page.department.content|richtext_filters|safe }} {% endeditable %} - {% comment %} - Add the slider here - {% endcomment %} - {% endblock %} {% block page_slider %} @@ -61,17 +57,17 @@ {% block page_sub_content %} {% if page.department.pageblock_set.all %} -
+

{% for pageblock in page.department.pageblock_set.all %} + {% if not forloop.first and pageblock.with_separator %} +
+ {% endif %}
- {% if not forloop.first and pageblock.with_separator %} -
- {% endif %}

{{ pageblock.title }}

{{ pageblock.content|richtext_filters|safe }}
@@ -88,19 +84,21 @@ {% block page_related_content %} {% if page.department.articles_related.all %} - -
-
-
-

{% trans "Also discover" %}

-
-
-
- {% for article in page.department.articles_related.all %} -
- {% include 'magazine/article/includes/article_card.html' %} + +
+
+
+
+

{% trans "Also discover" %}

- {% endfor %} +
+
+ {% for article in page.department.articles_related.all %} +
+ {% include 'magazine/article/includes/article_card.html' %} +
+ {% endfor %} +
diff --git a/app/templates/pages/page.html b/app/templates/pages/page.html index 5de60ccf..7391fe47 100644 --- a/app/templates/pages/page.html +++ b/app/templates/pages/page.html @@ -16,18 +16,30 @@ {% endmetablock %}{% endblock %} {% block main %} -
+
+ +
+ {% block page_tags %} + {% endblock %} +
+ +
+ +
+
{% block page_title %} {{ page.title }} {% endblock %}
+
+
{% block page_sidebar %} {% if page.get_ascendants|length < 2 %} @@ -38,20 +50,22 @@ {% endif %} {% endblock %}
-
+
{% block page_content %} {{ page.content }} {% endblock %}
- {% block page_slider %} - {% endblock %} - {% block page_sub_content %} - {% endblock %} - {% block page_related_content %} - {% endblock %} +
+ {% block page_slider %} + {% endblock %} + {% block page_sub_content %} + {% endblock %} + {% block page_related_content %} + {% endblock %} +
{% endblock %} diff --git a/app/templates/pages/team.html b/app/templates/pages/team.html index 5dbf4890..e848fb2e 100644 --- a/app/templates/pages/team.html +++ b/app/templates/pages/team.html @@ -27,6 +27,14 @@ {% endblock %} +{% block page_slider %} + {% if page.team.pageimage_set.all %} + {% with page.team.pageimage_set.all as slider_images %} + {% include 'core/inc/slider.html' %} + {% endwith %} + {% endif %} +{% endblock %} + {% block page_content %} {% if page.team.sub_title %} @@ -54,54 +62,31 @@ {% endif %} {% endif %} - {% comment %} - Add the slider here - {% endcomment %} - {% endblock %} -{% block main %} - {{ block.super }} - - {% 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 %} +{% block page_sub_content %} {% if page.team.pageblock_set.all %} -
+
- {% block page_sub_content %} -
- {% for pageblock in page.team.pageblock_set.all %} -
-
- {% if not forloop.first and pageblock.with_separator %} -
- {% endif %} -

{{ pageblock.title }}

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

{{ pageblock.title }}

+ {{ pageblock.content|richtext_filters|safe }}
- {% endfor %} - {% endblock %} +
+ {% endfor %}
{% endif %} + {% endblock %}