trivial: apply pre-commit configuration
[panikweb-esperanzah.git] / panikweb_esperanzah / templates / emissions / emission_detail.html
1 {% extends "base.html" %}
2 {% load paniktags staticfiles i18n thumbnail %}
3 {% block bodyID %}Emissions{% endblock %}
4 {% block title %}{{ emission.title }}{% endblock %}
5
6 {% block head %}
7 <meta property="og:title" content="{{ emission.title }}" />
8 <meta name="twitter:title" content="{{ emission.title }}" />
9 {% if emission.image %}
10 <meta name="twitter:card" content="summary_large_image">
11 <meta property="og:image" content="{{ site_url }}{{ emission.image.url }}" />
12 <meta name="twitter:image" content="{{ site_url }}{{ emission.image.url }}" />
13 {% else %}
14 <meta name="twitter:card" content="summary">
15 <meta property="og:image" content="{{ site_url }}{% static 'img/favicon-300x300-2020-solid.png' %}" />
16 <meta name="twitter:image" content="{{ site_url }}{% static 'img/favicon-300x300-2020-solid.png' %}" />
17 {% endif %}
18 {% if emission.subtitle %}
19 <meta property="og:description" content="{{ emission.subtitle }}" />
20 <meta name="twitter:description" content="{{ emission.subtitle }}" />
21 {% else %}
22 <meta property="og:description" content="{{ emission.text|safe|striptags|truncatewords:75 }}"/>
23 <meta name="twitter:description" content="{{ emission.text|safe|striptags|truncatewords:75 }}"/>
24 {% endif %}
25 {% endblock %}
26
27 {% block podcasts-feed %}
28 <link rel="alternate" type="application/rss+xml" href="{% url 'emission-podcasts' slug=emission.slug %}" title="{{ emission.title }} Podcasts">
29 {% endblock %}
30
31 {% block toptitle %}
32 {% endblock %}
33
34 {% block main %}
35 <div class="emission emission-detail">
36         <div class="name"><h2>{{emission.title}}</h2></div>
37                 {% if schedules %}
38                         <ul class="schedule custom">
39                                 {% for schedule in schedules %}
40                                 <li>
41                                         <span class="label">{{ schedule.datetime|date:"l G:i" }}</span>
42                                         {% if schedule.weeks_string %}
43                                         <span class="weekdiff">({{ schedule.weeks_string }})</span>
44                                         {% endif %}
45                                         {% if schedule.rerun %} <span class="smooth">(rediff)</span> {% endif %}
46                                         {% if emission.archived %} ({{ emission.creation_timestamp|date:"Y" }}){% endif %}
47                                 </li>
48                                 {% endfor %}
49                         </ul>
50                 {% endif %}
51         <div class="emission-info">
52                 <div class="image">
53                         <div class="img">
54                         {% thumbnail emission.image "450x450" crop="50% 50%" as im %}
55                         <img src="{{im.url}}">
56                         {% empty %}
57                         <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8nez3HwAGugKtHMIYIwAAAABJRU5ErkJggg==" height="450" width="450">
58                         {% endthumbnail %}
59                         </div>
60                 </div>
61
62                 <div class="emission-text">
63                   <div>{{ emission.text|safe}}</div>
64                   {% if emission.slug == 'detour-vers-le-futur' %}
65                   <div id="subscribe-links">
66                     <ul>
67                       <li><a href="{{site_url}}{% url 'emission-podcasts' slug=emission.slug %}" class="rss">RSS</a></li>
68                       <li><a href="https://open.spotify.com/show/0AdCIyg24wKklByW4abBKg">Spotify</a></li>
69                       <li><a href="https://www.deezer.com/fr/show/2835952">Deezer</a></li>
70                       <li><a href="https://pca.st/eht3df8c">Pocket Casts</a></li>
71                       <li><a href="{{site_url|as_itpc}}{% url 'emission-podcasts' slug=emission.slug %}" class="itunes">iTunes</a></li>
72                     </ul>
73                   </div>
74                   {% endif %}
75                 </div>
76         </div>
77         <div class="emission-episodes">
78                 {% for episode in all_episodes %}
79                 <a href="{% url 'episode-view' emission_slug=episode.emission.slug slug=episode.slug %}">
80                         <div class="image">
81                                 <div class="img">
82                                 {% thumbnail episode.image "240x240" crop="50% 50%" as im %}
83                                 <img src="{{im.url}}">
84                                 {% empty %}
85                                 <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8nez3HwAGugKtHMIYIwAAAABJRU5ErkJggg==" height="240" width="240">
86                                 {% endthumbnail %}
87                                 </div>
88                         </div>
89                         <div class="name"><span>{{ episode.title }}</span></div>
90                         <div class="time"><span>
91                                         {% if schedules|length > 1 %}
92                                         {{ episode.first_diffusion|date:"l" }}
93                                         {% endif %}
94                                         {{ episode.first_diffusion|date:"d/m" }}</span></div>
95                 </a>
96                 {% endfor %}
97         </div>
98
99 </div>
100
101 {% if emission.slug == 'detour-vers-le-futur' %}
102 {% include "includes/detour-vers-le-footer.html" %}
103 {% endif %}
104
105 {% endblock %}