]> git.0d.be Git - panikweb-esperanzah.git/blob - panikweb_esperanzah/templates/episodes/resume.html
sync a bit of player with panik
[panikweb-esperanzah.git] / panikweb_esperanzah / templates / episodes / resume.html
1 {% load thumbnail paniktags static %}
2 <div class="episode {% if model %}{{ model }}{% else %}resume{% endif %} cf {{ class }}">
3   {% if date != False %}
4     <div class="dateBloc">
5       <div class="date">
6         <div class="day">
7           {{ episode.first_diffusion|date:"D"|slice:":2"}}
8         </div>
9         <div class="number">
10           {{ episode.first_diffusion|date:"d" }}
11         </div>
12         {% if date != "daytime" %}
13           <div class="month">
14             {{ episode.first_diffusion|date:"M y" }}
15           </div>
16         {% endif %}
17         <div class="time">
18           {{ episode.first_diffusion|date:"H:i" }}
19         </div>
20       </div>
21     </div>
22   {% endif %}
23   <div class="logo">
24     <a href="{% url 'episode-view' emission_slug=episode.emission.slug slug=episode.slug %}">
25       {% if model == "inline" and episode.image %}
26         {% thumbnail episode.image "60x60" crop="50% 25%" as im %}
27           <img width="60" height="60" src="{{im.url}}"/>
28         {% endthumbnail %}
29       {% elif model == "inline" and episode.emission.image %}
30         {% thumbnail episode.emission.image "60x60" crop="50% 25%" as im %}
31           <img width="60" height="60" src="{{im.url}}"/>
32         {% endthumbnail %}
33       {% elif model == "inline" %}
34         <img class="smooth"  style="width:60px;" src="{% static "img/emission.png" %}"/>
35       {% elif episode.image %}
36         {% thumbnail episode.image "150x150" crop="50% 25%" as im %}
37           <img width="150" height="150" src="{{im.url}}"/>
38         {% endthumbnail %}
39       {% elif episode.emission.image %}
40         {% thumbnail episode.emission.image "150x150" crop="50% 25%" as im %}
41           <img width="150" height="150" src="{{im.url}}"/>
42         {% endthumbnail %}
43       {% else %}
44         <img class="smooth" style="width:150px;" src="{% static "img/emission.png" %}"/>
45       {% endif %}
46     </a>
47   </div>
48   <div class="content">
49
50     {% if episode.main_sound %}
51       <div class="sound right">{% audio sound=episode.main_sound %}</div>
52     {% endif %}
53     <div class="title">
54       <h5 class=" title">
55         <a href="{% url 'episode-view' emission_slug=episode.emission.slug slug=episode.slug %}">{{ episode.title }}</a>
56       </h5>
57       <div class="smooth metas">
58         {% if class == "standalone" %}
59           <h5 class="title inBlock">
60             <a href="{% url 'emission-view' slug=episode.emission.slug %}">{{ episode.emission.title }}</a>
61           </h5>
62           {% if episode.emission.categories %}
63             <span class="categories">
64               {% for category in episode.emission.categories.all %}
65                 {% if forloop.counter > 1 %} - {% endif %}<span class="category">{{category}}</span>
66               {% endfor%}
67             </span>
68           {% endif %}
69         {% endif %}
70       </div>
71     </div>
72
73     {% if model == "inline" %}
74       <div class="description">
75         <a href="{% url 'episode-view' emission_slug=episode.emission.slug slug=episode.slug %}">
76           {% if episode.subtitle %}
77             {{ episode.subtitle|truncatewords:20}}
78           {% elif episode.text %}
79             {{ episode.text|safe|striptags|truncatewords:20}}
80           {% endif %}
81         </a>
82       </div>
83     {% else %}
84       {% if episode.subtitle %}
85         <article class="text userContent">
86           {{ episode.subtitle|truncatewords:50 }}
87         </article>
88       {% elif episode.text %}
89         <article class="text userContent">
90           {{ episode.text|safe|truncatewords:50}}
91         </article>
92       {% endif %}
93     {% endif %}
94   </div>
95 </div>