From 0d705a8f5a661f9f3658728291a0cba96477d8b8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Je=CC=81re=CC=81my=20Fabre?= Date: Mon, 10 Oct 2016 10:03:55 +0200 Subject: [PATCH] Various fixes --- app/static/src/sass/modules/_page.scss | 9 +++++++++ app/static/src/sass/modules/_share-links.scss | 1 + .../core/inc/generic_card_variable_height.html | 6 ++++++ .../magazine/article/article_detail.html | 18 ++++++++++-------- app/templates/magazine/topic/topic_detail.html | 2 +- app/templates/network/organization_list.html | 10 ++++++---- app/templates/pages/custompage.html | 16 +++++++++------- .../includes/product_list_square_style.html | 2 +- 8 files changed, 43 insertions(+), 21 deletions(-) create mode 100644 app/templates/core/inc/generic_card_variable_height.html diff --git a/app/static/src/sass/modules/_page.scss b/app/static/src/sass/modules/_page.scss index 60971247..471673b3 100644 --- a/app/static/src/sass/modules/_page.scss +++ b/app/static/src/sass/modules/_page.scss @@ -64,6 +64,15 @@ $module: ".page"; } + &__meta-text { + + font-size: 13px; + margin-top: 2px; + font-weight: weight(regular); + display: block; + + } + &__filters { @include margin(0 0 6 0); diff --git a/app/static/src/sass/modules/_share-links.scss b/app/static/src/sass/modules/_share-links.scss index 5df9ec5a..bd7a6ccc 100644 --- a/app/static/src/sass/modules/_share-links.scss +++ b/app/static/src/sass/modules/_share-links.scss @@ -5,6 +5,7 @@ $module: ".share-links"; list-style-type: none; padding: 0; margin: 0; + @include margin-top(2); &__item { diff --git a/app/templates/core/inc/generic_card_variable_height.html b/app/templates/core/inc/generic_card_variable_height.html new file mode 100644 index 00000000..e9253312 --- /dev/null +++ b/app/templates/core/inc/generic_card_variable_height.html @@ -0,0 +1,6 @@ +{% extends "core/inc/generic_card.html" %} +{% load i18n pages_tags mezzanine_tags media_tags organization_tags %} + +{% block image %} + +{% endblock %} diff --git a/app/templates/magazine/article/article_detail.html b/app/templates/magazine/article/article_detail.html index ac5b2ad4..d2b08876 100644 --- a/app/templates/magazine/article/article_detail.html +++ b/app/templates/magazine/article/article_detail.html @@ -101,7 +101,7 @@
-

{% trans "Also discover" %}

+

{% trans "Go further" %}

@@ -111,10 +111,10 @@ {% include 'magazine/article/includes/article_card.html' %}
{% else %} -
- {% include "core/inc/generic_card.html" %} -
- {%endif%} +
+ {% include "core/inc/generic_card.html" %} +
+ {% endif %} {% endfor %}
@@ -130,18 +130,20 @@ {{ article.publish_date|date:"DATE_FORMAT" }} {% endeditable %} +
- {% if article.categories.all.length > 0 %} -
+ + {% if article.categories.all|length > 0 %} +
{% for category in article.categories.all %} - {% if forloop.first %} | {% endif %} {% if not forloop.first %}, {% endif %} {{ category }} {% endfor %}
{% endif %} + {% with article as object %} {% include "includes/share_buttons.html" %} {% endwith %} diff --git a/app/templates/magazine/topic/topic_detail.html b/app/templates/magazine/topic/topic_detail.html index b9f48504..c3a96b4b 100644 --- a/app/templates/magazine/topic/topic_detail.html +++ b/app/templates/magazine/topic/topic_detail.html @@ -63,7 +63,7 @@
{% for article in articles %}
- {% include 'magazine/article/includes/article_card.html' %} + {% include 'core/inc/generic_card.html' %}
{% endfor %}
diff --git a/app/templates/network/organization_list.html b/app/templates/network/organization_list.html index 528a28dd..552bde7b 100644 --- a/app/templates/network/organization_list.html +++ b/app/templates/network/organization_list.html @@ -12,11 +12,15 @@ {% endblock %} {% block page_title %} -

{% trans "Network" %}

+

{% trans "Network" %}

{% endblock %} -{% block page_content %} +{% block breadcrumb_menu %} + {{ block.super }} + +{% endblock %} +{% block page_content %} {% for organization in organizations %} @@ -43,6 +47,4 @@ {% endfor %} - - {% endblock %} diff --git a/app/templates/pages/custompage.html b/app/templates/pages/custompage.html index 56a5b6d5..f3dc328f 100644 --- a/app/templates/pages/custompage.html +++ b/app/templates/pages/custompage.html @@ -115,13 +115,15 @@ {% endblock %} {% block products %} - {% for page_product_list in page.custompage.product_lists.all %} - {% with page_product_list.list as list %} - {% with "shop/includes/product_list_"|add:list.style|add:"_style.html" as template %} - {% include template %} - {% endwith %} - {% endwith %} - {% endfor %} + {% if page.custompage.product_lists.all|length > 0 %} + {% for page_product_list in page.custompage.product_lists.all %} + {% with page_product_list.list as list %} + {% with "shop/includes/product_list_"|add:list.style|add:"_style.html" as template %} + {% include template %} + {% endwith %} + {% endwith %} + {% endfor %} + {% endif %} {% endblock %} {% block logo %} diff --git a/app/templates/shop/includes/product_list_square_style.html b/app/templates/shop/includes/product_list_square_style.html index d0e75d6f..45697021 100644 --- a/app/templates/shop/includes/product_list_square_style.html +++ b/app/templates/shop/includes/product_list_square_style.html @@ -17,7 +17,7 @@
{% for product_inline in list.products.all %} {% with product_inline.product as product %} -
+
{% if product.images.all %}
-- 2.39.5