]> git.0d.be Git - panikweb.git/blobdiff - panikweb_templates/templates/soundfiles/resume.html
misc: run manage.py with python3
[panikweb.git] / panikweb_templates / templates / soundfiles / resume.html
index 9295932027e4b295e0d123ec4d8217bb8a154829..7347e5ed154d5a0cc3f4a6862659d94e1d0a5643 100644 (file)
@@ -1,43 +1,42 @@
-{% load thumbnails %}
-{% load paniktags %}
-{% load staticfiles %}
-<div class="episode inline cf">
+{% load thumbnail paniktags staticfiles %}
+<div class="episode soundfile inline cf">
        <div class="logo">
                {% if soundfile.episode.image %}
-                       <img src="{{ soundfile.episode.image|thumbnail:'50x50' }}"/>
-               {% elif episode.emission.image %}
-                       <img src="{{ soundfile.episode.emission.image|thumbnail:'50x50' }}"/>
+                       {% thumbnail soundfile.episode.image "60x60" crop="50% 25%" as im %}
+                       <img alt="" width="60" height="60" src="{{im.url}}"/>
+                       {% endthumbnail %}
+               {% elif soundfile.episode.emission.image %}
+                       {% thumbnail soundfile.episode.emission.image "60x60" crop="50% 25%" as im %}
+                       <img alt="" width="60" height="60" src="{{im.url}}"/>
+                       {% endthumbnail %}
                {% else %}
-                       <img class="smooth"  style="width:50px;" src="{% static "img/defaultLogo.png" %}"/>
+                       <img alt="" width="60" height="60" src="{% static "img/sound.png" %}"/>
                {% endif %}
                <p class="date">
-               {{date|date:"d M"}}<br/>
-               {{date|date:"y"}}
+               {{date|date:"d/m/y"}}
                </p>
 
        </div>
        <div class="content">
                <div class="sound right">{% audio sound=soundfile %}</div>
-               <div class="title ellipsis">
+               <div class="title">
                        {% if soundfile.fragment %}
-                       <h5 class="title ellipsis">
-                               {{ soundfile.title }}
+                       <h5 class="title">
+                               <a href="{% url 'episode-view' emission_slug=soundfile.episode.emission.slug slug=soundfile.episode.slug %}">{{ soundfile.title }}</a>
                        </h5>
                        {% endif %}
-                       <h5 class=" inBlock title {% if model = "inline" %}ellipsis{% endif %}">
+                       <h5 class="title {% if model == "inline" %}ellipsis{% endif %}">
                                <a href="{% url 'episode-view' emission_slug=soundfile.episode.emission.slug slug=soundfile.episode.slug %}">{{ soundfile.episode.title }}</a>
                        </h5>
                        <div class="smooth metas">
-                               <h5 class="title inBlock">
-                                       <a href="{% url 'emission-view' slug=soundfile.episode.emission.slug %}">{{ soundfile.episode.emission.title }}</a>
-                               </h5>
-                               {% if soundfile.episode.emission.categories %}
+                               {% if soundfile.format %}
                                        <span class="categories">
-                                       {% for category in soundfile.episode.emission.categories.all %}
-                                               {% if forloop.counter > 1 %} - {% endif %}<span class="category"><span class="inBlock icon-{{category|slugify}}">&nbsp;</span>{{category}}</span>
-                                       {% endfor%}
+                                       <span class="category">{{ soundfile.format.title }}</span>
                                        </span>
                                {% endif %}
+                               <h5 class="title inBlock">
+                                       <a href="{% url 'emission-view' slug=soundfile.episode.emission.slug %}">{{ soundfile.episode.emission.title }}</a>
+                               </h5>
                        </div>
                </div>
 
                <div class="description ellipsis">
                        {{ soundfile.episode.subtitle|truncatewords:20}}
                </div>
-               {% elif soundfile.episode.text %}
-               <div class="description ellipsis">
-                       {{ soundfile.episode.text|safe|striptags|truncatewords:20}}
-               </div>
                {% endif %}
        </div>
 </div>