]> git.0d.be Git - panikweb-esperanzah.git/blob - panikweb_esperanzah/templates/home.html
square images on home
[panikweb-esperanzah.git] / panikweb_esperanzah / templates / home.html
1 {% extends "base.html" %}
2 {% load paniktags staticfiles i18n thumbnail %}
3 {% block bodyID %}Home{% endblock %}
4 {% block title %}{% trans 'Home' %}{% endblock %}
5
6 {% block head %}
7 {{ block.super }}
8 <script type="application/ld+json">
9 {
10   "@context": "http://schema.org",
11   "@type": "Organization",
12   "url": "https://radio.esperanzah.be",
13   "name" : "Radio Esperanzah!"
14 }
15 </script>
16 {% endblock %}
17
18 {% block main %}
19
20 <div class="" id="specialHome">
21     <div>
22
23             {% if newsitems %}
24               <div id="actu">
25                       <h2>{{newsitems.0.title}}</h2>
26                       <div>{{newsitems.0.text|safe}}</div>
27               </div>
28             {% endif %}
29
30
31             <div>
32             {% spaceless %}
33             {% for emission in emissions %}
34             <div class="emission-tile {% if emission.has_focus %}emission-focus{% endif %}">
35               <a href="{% url 'emission-view' slug=emission.slug %}">
36                     <div class="image">
37                             <div class="img">
38                         {% thumbnail emission.image "450x450" crop="50% 50%" as im %}
39                         <img src="{{im.url}}">
40                         {% empty %}
41                         <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8nez3HwAGugKtHMIYIwAAAABJRU5ErkJggg==">
42                         {% endthumbnail %}
43                             </div>
44                     </div>
45               </a>
46               <div class="name"><span>{{emission.title}}</span></div>
47               <div class="tags">
48               {% if emission.has_focus %}<span>#podcast</span>{% endif %}
49               {% for schedule in emission.schedule_set.all %}
50                 {% if forloop.first and forloop.last %}#{{schedule.datetime|date:"l"}}{% endif %}
51               {% endfor %}
52               <!-- &nbsp;<span>#espe{{emission.creation_timestamp|date:"Y"}}</span> -->
53               </div>
54             </div>
55             {% endfor %}
56
57             {% for page in extra_pages %}
58             <div class="emission-tile">
59             <a href="{{page.get_online_url}}">
60                     <div class="image">
61                             <div class="img">
62                         {% thumbnail page.picture "450x450" crop="50% 50%" as im %}
63                         <img src="{{im.url}}">
64                         {% empty %}
65                         <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8nez3HwAGugKtHMIYIwAAAABJRU5ErkJggg==" height="450" width="450">
66                         {% endthumbnail %}
67                             </div>
68                     </div>
69             </a>
70                     <div class="name"><span>{{page.title}}</span></div>
71                       <div class="tags">
72                       {% if page.slug == "interviews" %}<span>#podcast</span>{% endif %}
73                       </div>
74             </div>
75             {% endfor %}
76             {% endspaceless %}
77             </div>
78
79     </div>
80 </div>
81
82 {% endblock %}