]> git.0d.be Git - panikweb.git/commitdiff
add custom template for alimentation topik
authorFrédéric Péters <fpeters@0d.be>
Sun, 15 Oct 2017 09:20:34 +0000 (11:20 +0200)
committerFrédéric Péters <fpeters@0d.be>
Sun, 15 Oct 2017 09:20:34 +0000 (11:20 +0200)
panikweb_templates/templates/combo/cells/alimentation/episode_auto_selection.html [new file with mode: 0644]

diff --git a/panikweb_templates/templates/combo/cells/alimentation/episode_auto_selection.html b/panikweb_templates/templates/combo/cells/alimentation/episode_auto_selection.html
new file mode 100644 (file)
index 0000000..d66216c
--- /dev/null
@@ -0,0 +1,34 @@
+{% load paniktags thumbnail staticfiles %}
+{% if title and episodes %}<h3>{{title}}</h3>{% endif %}
+{% for episode in episodes %}
+<div class="episode inline episode-inline">
+       <div class="logo">
+               {% if episode.image %}
+                       {% thumbnail episode.image "60x60" crop="50% 25%" as im %}
+                       <img src="{{im.url}}"/>
+                       {% endthumbnail %}
+               {% elif episode.emission.image %}
+                       {% thumbnail episode.emission.image "60x60" crop="50% 25%" as im %}
+                       <img src="{{im.url}}"/>
+                       {% endthumbnail %}
+               {% else %}
+                       <img class="smooth"  style="width:60px;" src="{% static "img/emission.png" %}"/>
+               {% endif %}
+       </div>
+       <div class="content">
+               {% if episode.main_sound %}
+                       <div class="sound right">{% audio sound=episode.main_sound %}</div>
+               {% endif %}
+               <div class="title">
+                       <h5 class="title">
+                               <a href="{% url 'episode-view' emission_slug=episode.emission.slug slug=episode.slug %}">{{ episode.title }}</a>
+                       </h5>
+               </div>
+               {% if episode.text %}
+               <div class="description">
+                       {{ episode.text|safe|striptags|truncatewords:35 }}
+               </div>
+               {% endif %}
+       </div>
+</div>
+{% endfor %}