]> git.parisson.com Git - mezzo.git/commitdiff
Move slider content before bio on home page on mobile devices
authorJérémy Fabre <Jeremy@iMacdeJeremy2.fritz.box>
Wed, 15 Feb 2017 10:43:55 +0000 (11:43 +0100)
committerJérémy Fabre <Jeremy@iMacdeJeremy2.fritz.box>
Wed, 15 Feb 2017 10:43:55 +0000 (11:43 +0100)
app/templates/home/inc/body.html
app/templates/home/inc/slider.html

index e073d8c066129aa2a942f1268c493be99e2073ea..c9537fe8776eba218477b08cb2d58733b5f0e837 100644 (file)
@@ -6,23 +6,6 @@
                 Autres articles
             </div>
             <div class="row">
-                {% for slider in home.dynamiccontenthomeslider_set.all %}
-                    {% with slider.content_object.images.all|get_type:'slider' as images %}
-                        {% if images %}
-                            <div class="col-xs-8 hide-from-xs">
-                                {% 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 %}
-                            </div>
-                        {% endif %}
-                    {% endwith %}
-                {% endfor %}
                 {% for content in home.dynamiccontenthomebody_set.all %}
                     <div class="col-xs-8{% if forloop.counter > 3 %} hide-until-xs{% endif %}">
                         {% if content.content_type.model == "brief" %}
index 60fb9633521e67f3a3acd428fc13533f7ed6bbba..c136809d86b39e9a51cc8a7bf5dfd3aba567c0a6 100644 (file)
         </div>
     </div>
 {% endif %}
+
+{% load i18n pages_tags mezzanine_tags media_tags organization_tags %}
+<div class="container hide-from-xs">
+    <div class="row">
+        <div class="col-sm-12 col-sm-push-2 tac">
+            <div class="row">
+                {% for slider in home.dynamiccontenthomeslider_set.all %}
+                    {% with slider.content_object.images.all|get_type:'slider' as images %}
+                        {% if images %}
+                            <div class="col-xs-8">
+                                {% 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 %}
+                            </div>
+                        {% endif %}
+                    {% endwith %}
+                {% endfor %}
+            </div>
+        </div>
+    </div>
+</div>