From 0acb711df59eaa8c8a8b2c4fbb419543d27f0052 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Je=CC=81re=CC=81my=20Fabre?= Date: Wed, 15 Feb 2017 11:43:55 +0100 Subject: [PATCH] Move slider content before bio on home page on mobile devices --- app/templates/home/inc/body.html | 17 ----------------- app/templates/home/inc/slider.html | 27 +++++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 17 deletions(-) diff --git a/app/templates/home/inc/body.html b/app/templates/home/inc/body.html index e073d8c0..c9537fe8 100644 --- a/app/templates/home/inc/body.html +++ b/app/templates/home/inc/body.html @@ -6,23 +6,6 @@ Autres articles
- {% for slider in home.dynamiccontenthomeslider_set.all %} - {% with slider.content_object.images.all|get_type:'slider' as images %} - {% if images %} -
- {% if slider.content_type.model == "brief" %} - {% include "magazine/brief/inc/brief_card.html" %} - {% elif slider.content_type.model == "article" %} - {% include "magazine/article/includes/article_card.html" with object=slider.content_object %} - {% elif slider.content_type.model == "event" %} - {% include "agenda/event/includes/event_card.html" with object=slider.content_object %} - {% elif slider.content_type.model == "custompage" %} - {% include "pages/page/includes/page_card.html" with object=slider.content_object %} - {% endif %} -
- {% endif %} - {% endwith %} - {% endfor %} {% for content in home.dynamiccontenthomebody_set.all %}
{% if content.content_type.model == "brief" %} diff --git a/app/templates/home/inc/slider.html b/app/templates/home/inc/slider.html index 60fb9633..c136809d 100644 --- a/app/templates/home/inc/slider.html +++ b/app/templates/home/inc/slider.html @@ -86,3 +86,30 @@
{% endif %} + +{% load i18n pages_tags mezzanine_tags media_tags organization_tags %} +
+
+
+
+ {% for slider in home.dynamiccontenthomeslider_set.all %} + {% with slider.content_object.images.all|get_type:'slider' as images %} + {% if images %} +
+ {% if slider.content_type.model == "brief" %} + {% include "magazine/brief/inc/brief_card.html" %} + {% elif slider.content_type.model == "article" %} + {% include "magazine/article/includes/article_card.html" with object=slider.content_object %} + {% elif slider.content_type.model == "event" %} + {% include "agenda/event/includes/event_card.html" with object=slider.content_object %} + {% elif slider.content_type.model == "custompage" %} + {% include "pages/page/includes/page_card.html" with object=slider.content_object %} + {% endif %} +
+ {% endif %} + {% endwith %} + {% endfor %} +
+
+
+
-- 2.39.5