]> git.0d.be Git - panikweb.git/blob - panikweb_templates/templates/listen.html
switch thumbnail system from homegrown to sorl-thumbnail
[panikweb.git] / panikweb_templates / templates / listen.html
1 {% extends "base.html" %}
2 {% load paniktags staticfiles thumbnail i18n %}
3 {% block title %}{% trans 'Sounds' %}{% endblock %}
4 {% block toptitle %}
5 <h1 class="top"><a href="{% url 'listen' %}">{% trans 'Sounds' %}</a></h1>
6 {% endblock %}
7 {% block nav %}
8 {% endblock %}
9 {% block main %}
10
11 <div class="detail marged soundfiles cf">
12   <div class="wrapper navigation">
13
14 <p class="intro leftPart">
15 Émissions et fragments sonores à (ré-)écouter, à partager et à télécharger.
16 </p>
17
18     <div class="leftPart">
19       <div class="soundfiles">
20         <h5 class="sectionLabel focus-title">{% trans 'Focus' %}</h5>
21
22         <ul class="custom columns cf padded">
23         {% for soundfile in focus %}
24           <li class="soundfile frontpage">
25             <div class="content content-inline cf special">
26               <a class="block cf" href="{% url 'episode-view' emission_slug=soundfile.episode.emission.slug slug=soundfile.episode.slug %}">
27                 <div class="label labels absolute">
28                   <span class="item inBlock">{{ soundfile.format.title }}</span>
29                 </div>
30                 <div class="logo">
31                   {% if soundfile.episode.image %}
32                   {% thumbnail soundfile.episode.image "480x320" crop="50% 25%" as im %}
33                   <img class="normal" src="{{im.url}}"/>
34                   {% endthumbnail %}
35                   {% elif soundfile.episode.emission.image %}
36                   {% thumbnail soundfile.episode.emission.image "480x320" crop="50% 25%" as im %}
37                   <img class="normal" src="{{im.url}}"/>
38                   {% endthumbnail %}
39                   {% else %}
40                   <img class="normal" src="{% static "img/sound.png" %}"/>
41                   {% endif %}
42                 </div>
43                 <div class="content">
44                   {% if soundfile.fragment and soundfile.title %}
45                   <h5 class="title">{{ soundfile.title }}</h5>
46                   {% endif %}
47                   <h5 class="title">{{ soundfile.episode.title }}</h5>
48                   <h5 class="title">{{ soundfile.episode.emission.title }}</h5>
49                   <div class="description">
50                     {{ soundfile.episode.text|safe|striptags|truncatewords:75}}
51                   </div>
52                   {% if soundfile.first_diffusion %}
53                     <div class="smooth">{{ soundfile.first_diffusion|date:"d/m/Y" }}</div>
54                   {% endif %}
55                 </div>
56               </a>
57               {% audio sound=soundfile %}
58             </div>
59           </li>
60         {% endfor %}
61         </ul>
62       </div>
63     </div>
64     <div class="rightPart">
65       <div class="sub">
66         <h5 class="sectionLabel right">
67           <a href="{% url 'listenArchives' %}"><span class="iconLabel">Tous</span></a>
68         </h5>
69         <h5 class="sectionLabel">{% trans 'Latest Sounds' %}&nbsp;<a
70                         class="button icon-rss inBlock" href="{% url 'podcasts-feed' %}"></a></h5>
71
72         <form action="{% url 'listenArchives' %}" id="search-form">
73                 <input id="id_q" name="q" type="text" {% if search_query %}value="{{ search_query }}"{% endif %}>
74                 <button class="icon-search"></button>
75         </form>
76
77         <ul class="custom list soundfilesList">
78           {% for soundfile in soundfiles|slice:":20" %}
79             <li class="item">
80               {% soundfile_resume soundfile=soundfile date=soundfile.first_diffusion %}
81             </li>
82           {% endfor %}
83         </ul>
84       </div>
85     </div>
86   </div>
87 </div>
88 {% endblock %}