Locatizations.
[wolnelektury.git] / src / social / templates / social / cite_promo.html
old mode 100755 (executable)
new mode 100644 (file)
index 8c0bdde..1c3753c
@@ -1,29 +1,39 @@
 {% spaceless %}
-  {% load i18n %}
+  {% load embed_video from social_tags %}
 
   {% if main %}
-    <section id="big-cite"{% if cite.image and not cite.banner %} style="background-image: url('{{ cite.image.url }}'); background-position: 50% {{ cite.image_shift|default_if_none:50 }}%;"{% endif %} {% if cite.banner %}class="banner"{% endif %}>
+    <section class="big-cite"{% if cite.image or cite.background_plain %} style="{% if cite.image %}background-image: url('{{ cite.image.url }}');{% else %}background-image: none; background-color: {{ cite.background_color|default:"#000000" }};{% endif %}"{% endif %}>
   {% endif %}
 
   {% if cite %}
-    <a href="{{ cite.link }}" {% if not cite.banner %}class="cite{% if cite.small %} cite-small{% endif %}{% endif %}">
-      {% if cite.banner %}
-        <img src="{{ cite.image.url }}" width="100%"/>
-      {% else %}
+  <a href="{{ cite.link }}" class="cite-{{ cite.layout }}">
+        {% if cite.video %}
+          <div class="box-c">
+           {% embed_video cite.video %}
+         </div>
+       {% endif %}
+       {% if cite.picture %}
+         <div class="box-c">
+           <img class="picture" src="{{ cite.picture.url }}" alt="{{ cite.picture_alt }}">
+         </div>
+       {% endif %}
+       <div class="{% if cite.small %}cite-text-small{% endif %}">
         {% if cite.vip %}
-          <p class='vip mono'><span>{{ cite.vip }} {% trans "recommends" %}:</span></p>
+          <p class='vip mono'><span>{{ cite.vip }} poleca:</span></p>
         {% endif %}
-        <blockquote class="cite-body">
-          <span>{{ cite.text|linebreaksbr|safe }}</span>
-        </blockquote>
+       {% if cite.text %}
+          <blockquote class="cite-body">
+            <span>{{ cite.text|linebreaksbr|safe }}</span>
+          </blockquote>
+       {% endif %}
         {% if cite.book %}
           <p class="source mono"><span>{{ cite.book.pretty_title }}</span></p>
         {% endif %}
-      {% endif %}
+       </div>
     </a>
   {% endif %}
 
   {% if main %}
     </section>
   {% endif %}
-{% endspaceless %}
\ No newline at end of file
+{% endspaceless %}