]> git.0d.be Git - panikweb.git/commitdiff
Focus on right with normal navigation for home (up this week)
authorlaron <simon@surlaterre.org>
Fri, 27 Sep 2013 16:59:44 +0000 (18:59 +0200)
committerlaron <simon@surlaterre.org>
Fri, 27 Sep 2013 16:59:44 +0000 (18:59 +0200)
panikweb/views.py
panikweb_templates/static/css/specifics.css
panikweb_templates/templates/home.html
panikweb_templates/templates/news/roll.html

index 3730c443bda17570b083ad183a171b150df62493..68bbf7e7ee6318cf8bee5b1abd0a93645cc27ac0 100644 (file)
@@ -417,7 +417,7 @@ class Home(TemplateView):
                     where=['''datetime = (SELECT MIN(datetime)
                                             FROM emissions_diffusion
                                         WHERE episode_id = emissions_episode.id)'''],
-                    tables=['emissions_diffusion'],).order_by('-first_diffusion').distinct() [:6]
+                    tables=['emissions_diffusion'],).order_by('-first_diffusion').distinct() [:3]
 
         context['newsletter_form'] = SubscribeForm()
 
index be48164786068970d8c46932d601fe70d64ed9a7..6ffa9c6af53f4c3f21a59540ded7140bb9cf9ad1 100644 (file)
@@ -91,7 +91,7 @@
                width:60%;
        }
        .wrapper.navigation .rightPart{
-               width:38%;
+               width:35%;
        }
        .wrapper .leftPart{
                float:left;
        .wrapper .rightPart{
                float:right;
        }
-
+    /*
        #specialHome .leftPart,
        #specialHome .rightPart {
                width: 100%;
        }
+    */
 }
 
 
 @media screen and (min-width: 1280px) {
+       /*
        #specialHome .leftPart {
                width: 60%;
        }
        #specialHome .rightPart {
                width: 30%;
        }
+    */
        #recent-emissions ul.columns,
        #recent-sounds ul.columns {
                column-count: 1;
index a4a31dd07af54b3e12391af8ad2bc52993bdf52f..329121dbccaece1a6a14940cc558d7ef41b59522 100644 (file)
 {% endblock %}
 {% block main %}
 <div class="marged">
-       {% with focus as news %}
-               {% newsroll %}
-       {% endwith %}
 </div>
 
 
-<div class="sided wrapper" id="specialHome">
+<div class="sided wrapper navigation" id="specialHome">
     <div class="marged">
            <div class="leftPart">
                    <h2><a href="{% url 'program' %}">Cette semaine sur Panik</a></h2>
                    {% weeknav %}
                    {% weekview %}
 
+             <form method="post" action="{% url 'newsletter-subscribe' %}"
+                     class="big center padded marged" id="subscribe-form">
+             <p>Tous les lundis, l'actualité de la semaine de Panik :</p>
+               {% csrf_token %}
+               {{ newsletter_form.as_table }}
+               <button>M'inscrire</button>
+             </form>
            </div>
 
            <div class="rightPart">
+               {% with focus as news %}
+                       {% newsroll %}
+               {% endwith %}
+            {% if soundfiles %}
+
+                   <div id="recent-sounds">
+                   <h3 class="sectionLabel right"><a href="{% url 'listen' %}">Tous</a></h3>
+                   <h3 class="sectionLabel">Derniers sons</h3>
+                   <ul class="custom columns list">
+                   {% for soundfile in soundfiles %}
+                           <li class="item {% if soundfile.episode.emission.categories.all.count = 0 %}nocat{% endif %} {% for category in soundfile.episode.emission.categories.all %} {{ category|slugify }}{% endfor %}">
+                             {% soundfile_resume soundfile=soundfile date=soundfile.first_diffusion %}
+                           </li>
+                   {% endfor %}
+                   </ul>
+                   </div>
+                   {% endif %}
+
             {% if emissions %}
                    <div id="recent-emissions">
                    <h3 class="sectionLabel"><a href="{% url 'emissions' %}">Nouveau dans la grille</a></h3>
                    </ul>
                    </div>
                    {% endif %}
-            {% if soundfiles %}
-
-                   <div id="recent-sounds">
-                   <h3 class="sectionLabel right"><a href="{% url 'listen' %}">Tous</a></h3>
-                   <h3 class="sectionLabel">Derniers sons</h3>
-                   <ul class="custom columns list">
-                   {% for soundfile in soundfiles %}
-                           <li class="item {% if soundfile.episode.emission.categories.all.count = 0 %}nocat{% endif %} {% for category in soundfile.episode.emission.categories.all %} {{ category|slugify }}{% endfor %}">
-                             {% soundfile_resume soundfile=soundfile date=soundfile.first_diffusion %}
-                           </li>
-                   {% endfor %}
-                   </ul>
-                   </div>
-                   {% endif %}
-
            </div>
     </div>
 </div>
 {% endblock %}
 {% block related %}
 
-             <form method="post" action="{% url 'newsletter-subscribe' %}"
-                     class="big center padded" id="subscribe-form">
-             <p>Tous les lundis, l'actualité de la semaine de Panik :</p>
-               {% csrf_token %}
-               {{ newsletter_form.as_table }}
-               <button>M'inscrire</button>
-             </form>
 {% endblock %}
index 31af65c2e1236ddd6b50b6ed45998c7694734864..965f5e4cfd60e0632e7ced7e59ec02c39ce9d6e7 100644 (file)
@@ -1,13 +1,13 @@
 {% load thumbnails %}{% load i18n %}
 <div id="newsRoll">
-       <div class="newsRoll center wrapper navigation cf">
-               <ul id="ticker" class="custom bigNews leftPart" style="height:360px;overflow:hidden;">
+       <div class="newsRoll center cf">
+               <ul id="ticker" class="custom bigNews marged" style="height:300px;overflow:hidden;">
                        {% for content in news %}
                                <li 
                     id="newsRollId-{{ content.slug }}"
                     class="">
                                        <a 
-                        style="max-width:100%;height:360px;background: no-repeat 50% 50% url('{{ content.image|thumbnail:'800x600' }}');" 
+                        style="max-width:100%;height:300px;background: no-repeat 50% 50% url('{{ content.image|thumbnail:'800x600' }}');" 
                         class="block news relative" 
                         href="{% url 'newsitem-view' slug=content.slug %}">
                                                {% if content.category %}
                                </li>
                        {% endfor %}
                </ul>
-               <ul class="custom inline rightPart" id="roller">
-                       {% for content in news %}
-                               <li class="num-{{ forloop.counter }}">
-                                       <button class="inBlock" data-about="#newsRollId-{{ content.slug }}">
-                                               <img src="{{ content.image|thumbnail:'80x60' }}" />
-                                       </button>
-                               </li>
-                       {% endfor %}
-               </ul>
-        <style>
-        </style>
+        <div class="marged">
+                   <ul class="custom distributed by3 padded" id="roller">
+                           {% for content in news|slice:'0:3' %}
+                                   <li style="width:30%;" class="num-{{ forloop.counter }} padded">
+                                           <button class="inBlock" data-about="#newsRollId-{{ content.slug }}">
+                                                   <img style="width:98%;" src="{{ content.image|thumbnail:'160x120' }}" />
+                                           </button>
+                                   </li>
+                           {% endfor %}
+                   </ul>
+        </div>
        </div>
 </div>