Funding wip: rewording and banner tweaks
[wolnelektury.git] / apps / funding / templates / funding / tags / funding.html
1 {% load i18n %}
2 {% load time_tags %}
3 {% if offer %}
4 {% spaceless %}
5 <div class="funding" style="">
6     {% if link and is_current %}
7         <div style="float:left; padding-right: .6em;">
8             <a class="call honking" href="{% url 'funding_current' offer.slug %}">
9                 {% trans "Support!" %}</a>
10             <div style="text-align: center; margin: auto;">
11                 <a href="{% url 'infopage' 'wesprzyj' %}">{% trans "Learn more" %}</a>
12             </div>
13         </div>
14     {% endif %}
15     <div class="description {% if link and is_current %}with-button{% endif %}"
16         style="display: inline-block;">
17     {% if link %}<a href="{% if is_current %}{% url 'funding_current' offer.slug %}{% else %}{{ offer.get_absolute_url }}{% endif %}">{% endif %}
18     {% if is_current %}<strong style="">{% trans "Help free the book!" %}</strong>{% endif %}
19     <span class="funding-title{% if not is_current %}-strong{% endif %}">{{ offer }}</span>
20
21     <div class="progress"
22         style="text-align: center; background-size: {{ percentage|stringformat:'.2f' }}% 1px;"
23     >
24         {% if sum %}
25             <span class="piece" style="float:left">{% trans "missing" %}: {{ missing }} zł</span>
26         {% endif %}
27         {% if not is_win %}
28             <span class="piece" style="float: right">{% trans "collected" %}: {{ sum }} zł</span>
29         {% endif %}
30         {% if is_current %}
31             <span class="piece" style="display:inline-block;margin-right: 0em;">{% trans "until fundraiser end" %}:
32                 <span class="countdown inline" data-until='{{ offer.end|date_to_utc:True|utc_for_js }}'></span>
33             </span>
34         {% endif %}
35
36         <div style="clear: both"></div>
37     </div>
38     {% if link %}</a>{% endif %}
39     </div>
40     <div style="clear: both"></div>
41 </div>
42 {% endspaceless %}
43 {% endif %}