10126a6cdd488d84b4555bba8ecbb55496e91df9
[wolnelektury.git] / src / social / templates / social / cite_promo.html
1 {% spaceless %}
2   {% load i18n %}
3   {% load embed_video from social_tags %}
4
5   {% if main %}
6     <section class="big-cite"{% if cite.image or cite.background_plain %}{% if not cite.banner %} style="{% if cite.image %}background-image: url('{{ cite.image.url }}'); background-position: 50% {{ cite.image_shift|default_if_none:50 }}%;{% else %}background-image: none; background-color: {{ cite.background_color|default:"#000000" }};{% endif %}"{% endif %}{% endif %} {% if cite.banner %}class="banner"{% endif %}>
7   {% endif %}
8
9   {% if cite %}
10   <a href="{{ cite.link }}" class="cite-{{ cite.layout }}">
11       {% if cite.banner %}
12         {# Obsolete #}
13         <img src="{{ cite.image.url }}" width="100%"/>
14       {% else %}
15         {% if cite.video %}
16           <div class="box-c">
17             {% embed_video cite.video %}
18           </div>
19         {% endif %}
20         {% if cite.picture %}
21           <div class="box-c">
22             <img class="picture" src="{{ cite.picture.url }}" alt="{{ cite.picture_alt }}">
23           </div>
24         {% endif %}
25         <div class="{% if cite.small %}cite-text-small{% endif %}">
26         {% if cite.vip %}
27           <p class='vip mono'><span>{{ cite.vip }} {% trans "recommends" %}:</span></p>
28         {% endif %}
29         {% if cite.text %}
30           <blockquote class="cite-body">
31             <span>{{ cite.text|linebreaksbr|safe }}</span>
32           </blockquote>
33         {% endif %}
34         {% if cite.book %}
35           <p class="source mono"><span>{{ cite.book.pretty_title }}</span></p>
36         {% endif %}
37         </div>
38       {% endif %}
39     </a>
40   {% endif %}
41
42   {% if main %}
43     </section>
44   {% endif %}
45 {% endspaceless %}