792efc0fbcea6d1b9c06730da4b86d817218c8bd
[wolnelektury.git] / src / annoy / templates / annoy / banner_seasonal.html
1 {% load l10n %}
2 {% load time_tags %}
3
4 {% if banner %}
5 <div class="l-container">
6   <div class="
7               annoy-banner
8               annoy-banner_{{ banner.place }}
9               annoy-banner-style_{{ banner.style }}
10               {% if banner.get_image %}with-image{% endif %}
11               {% if banner.smallfont %}banner-smallfont{% endif %}
12               annoy-banner-clickable
13               "
14         id="annoy-banner-{{ banner.id }}"
15         style="
16            {% if banner.text_color %}color: {{ banner.text_color }};{% endif %}
17            {% if banner.background_color %}background-color: {{ banner.background_color }};{% endif %}
18         ">
19     {% if not banner.action_label %}
20     <a
21       {% if banner.is_external %}target="_blank"{% endif %}
22       href="{{ banner.url }}">
23     {% endif %}
24     <div class="annoy-banner-inner">
25
26       {% if banner.get_image %}
27       <div>
28         <img src="{{ banner.get_image.url }}">
29         </div>
30       {% endif %}
31       <div class="text">
32         {{ banner.get_text|safe|linebreaks }}
33       </div>
34
35
36
37
38       {% if banner.action_label %}
39       <a class="action"
40          {% if banner.is_external %}target="_blank"{% endif %}
41          href="{{ banner.url }}">
42           {{ banner.action_label }}
43         </a>
44       {% endif %}
45     </div>
46     {% if not banner.action_label %}
47       </a>
48     {% endif %}
49
50         <div class="state-box">
51           <div class="progress-box">
52             <div>
53               <div class="l-checkout__support__bar">
54                 <span class="{% if banner.progress_percent < 15 %}little-progress{% endif %}" data-label="{{ banner.progress_percent|floatformat:"2" }}% ({{ banner.progress|floatformat:"g" }} zł)" style="width: {{ banner.progress_percent|stringformat:".3f" }}%;"></span>
55               </div>
56             </div>
57           </div>
58           <div class="bar-status-box">
59           <div class="time-box">
60             <strong class="countdown inline" data-until='{{ banner.until|date_to_utc:True|utc_for_js }}'>&nbsp;</strong>
61           </div>
62           {% if banner.target %}
63           <strong>{{ banner.target|floatformat:"g" }} zł</strong>
64           {% endif %}
65           </div>
66         </div>
67
68
69   </div>
70 </div>
71 {% endif %}