]> git.0d.be Git - panikweb.git/commitdiff
add "main column" style for sounds cell
authorFrédéric Péters <fpeters@0d.be>
Sat, 21 Nov 2020 13:54:57 +0000 (14:54 +0100)
committerFrédéric Péters <fpeters@0d.be>
Sat, 21 Nov 2020 13:54:57 +0000 (14:54 +0100)
panikweb/static/css/_specifics.scss
panikweb/templates/combo/soundscell.html
panikweb/templates/home.html
panikweb/templates/listen.html

index 40bacb89e2e2ae0a53b4fa633414056de9d6b49f..6b3a79eef7e02ef68b23e8ca2b98f0ee08c9aa7d 100644 (file)
@@ -62,6 +62,7 @@ $secondary: #0062CB;
        padding-bottom: 3px;
 }
 
+.focus-title h3,
 h5.focus-title {
        color: $secondary;
 }
@@ -1290,7 +1291,7 @@ ul.newsSpecial{
        padding:0.5em;
 }
 
-#fiber-content a {
+.textcell a {
        text-decoration: underline;
 }
 
index 4bf72d51f2bd3c81765fd0e7669b3dc1c67ecb12..0c658484352b3364882189f7d1c6b4c294e911a3 100644 (file)
@@ -1,9 +1,10 @@
-{% load i18n paniktags %}
+{% load i18n paniktags static thumbnail %}
+{% if cell.placeholder == 'sidebar' or sidebar %}
   <h3 class="sectionLabel right">
     <a href="{% url 'listenArchives' %}"><span class="iconLabel">Tous</span></a>
   </h3>
-  <h3 class="sectionLabel">{% trans 'Latest Sounds' %}&nbsp;<a
-                  class="button icon-rss inBlock" href="{% url 'podcasts-feed' %}"></a></h3>
+  <h3 class="sectionLabel">{% if cell.title %}{{ cell.title }}{% else %}{% trans 'Latest Sounds' %}{% endif %}
+          <a class="button icon-rss inBlock" href="{% url 'podcasts-feed' %}"></a></h3>
 
   {% if include_search_input %}
   <form action="{% url 'listenArchives' %}" id="search-form">
     {% endwith %}
     {% endwith %}
   </ul>
+{% else %}
+  <h3 class="sectionLabel">{% firstof title cell.title %}</h3>
+
+  <ul class="custom columns cf padded">
+  {% for soundfile in soundfiles %}
+    <li class="soundfile frontpage">
+      <div class="content content-inline cf special">
+        <a class="block cf" href="{% url 'episode-view' emission_slug=soundfile.episode.emission.slug slug=soundfile.episode.slug %}">
+          <div class="label labels absolute">
+            <span class="item inBlock">{{ soundfile.format.title }}</span>
+          </div>
+          <div class="logo">
+            {% if soundfile.episode.image %}
+            {% thumbnail soundfile.episode.image "480x320" crop="50% 25%" as im %}
+            <img class="normal" src="{{im.url}}"/>
+            {% endthumbnail %}
+            {% elif soundfile.episode.emission.image %}
+            {% thumbnail soundfile.episode.emission.image "480x320" crop="50% 25%" as im %}
+            <img class="normal" src="{{im.url}}"/>
+            {% endthumbnail %}
+            {% else %}
+            <img class="normal" src="{% static "img/sound.png" %}"/>
+            {% endif %}
+          </div>
+          <div class="content">
+            {% if soundfile.fragment and soundfile.title %}
+            <h5 class="title">{{ soundfile.title }}</h5>
+            {% endif %}
+            <h5 class="title">{{ soundfile.episode.title }}</h5>
+            <h5 class="title">{{ soundfile.episode.emission.title }}</h5>
+            <div class="description">
+              {{ soundfile.episode.text|safe|striptags|truncatewords:75}}
+            </div>
+            {% if soundfile.first_diffusion %}
+              <div class="smooth">{{ soundfile.first_diffusion|date:"d/m/Y" }}</div>
+            {% endif %}
+          </div>
+        </a>
+        {% audio sound=soundfile %}
+      </div>
+    </li>
+  {% endfor %}
+  </ul>
+
+{% endif %}
index 3d35d90f150d96713b5a4e17601b74b48d49bc69..dd87a1533367b823e74ced9ea4b9b72c7d76c925 100644 (file)
@@ -62,7 +62,7 @@
             {% if soundfiles %}
 
                    <div id="recent-sounds">
-                    {% include "combo/soundscell.html" with include_search_input=False count=3 %}
+                    {% include "combo/soundscell.html" with include_search_input=False count=3 sidebar=True %}
                    </div>
                    {% endif %}
 
index 14af0cc296c8effbfb7618e4ea166f888814eb6e..fa22fcffa1e27c47a070eb8391f054d6b7974065 100644 (file)
 </p>
 
     <div class="leftPart">
-      <div class="soundfiles">
-        <h5 class="sectionLabel focus-title">{% trans 'Focus' %}</h5>
-
-        <ul class="custom columns cf padded">
-        {% for soundfile in focus %}
-          <li class="soundfile frontpage">
-            <div class="content content-inline cf special">
-              <a class="block cf" href="{% url 'episode-view' emission_slug=soundfile.episode.emission.slug slug=soundfile.episode.slug %}">
-                <div class="label labels absolute">
-                  <span class="item inBlock">{{ soundfile.format.title }}</span>
-                </div>
-                <div class="logo">
-                  {% if soundfile.episode.image %}
-                  {% thumbnail soundfile.episode.image "480x320" crop="50% 25%" as im %}
-                  <img class="normal" src="{{im.url}}"/>
-                  {% endthumbnail %}
-                  {% elif soundfile.episode.emission.image %}
-                  {% thumbnail soundfile.episode.emission.image "480x320" crop="50% 25%" as im %}
-                  <img class="normal" src="{{im.url}}"/>
-                  {% endthumbnail %}
-                  {% else %}
-                  <img class="normal" src="{% static "img/sound.png" %}"/>
-                  {% endif %}
-                </div>
-                <div class="content">
-                  {% if soundfile.fragment and soundfile.title %}
-                  <h5 class="title">{{ soundfile.title }}</h5>
-                  {% endif %}
-                  <h5 class="title">{{ soundfile.episode.title }}</h5>
-                  <h5 class="title">{{ soundfile.episode.emission.title }}</h5>
-                  <div class="description">
-                    {{ soundfile.episode.text|safe|striptags|truncatewords:75}}
-                  </div>
-                  {% if soundfile.first_diffusion %}
-                    <div class="smooth">{{ soundfile.first_diffusion|date:"d/m/Y" }}</div>
-                  {% endif %}
-                </div>
-              </a>
-              {% audio sound=soundfile %}
-            </div>
-          </li>
-        {% endfor %}
-        </ul>
+      <div class="soundfiles focus-title">
+        {% include "combo/soundscell.html" with include_search_input=True count=10 title="Focus" soundfiles=focus %}
       </div>
     </div>
     <div class="rightPart">
       <div class="sub">
-        {% include "combo/soundscell.html" with include_search_input=True count=20 %}
+        {% include "combo/soundscell.html" with include_search_input=True count=20 sidebar=True %}
       </div>
     </div>
   </div>