Reorganize SCSS files, RWD-ize funding.
[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 {{ add_class }}" data-offer-id="{{offer.id}}" style="">
6     {% if closeable %}<a href="#" class="close">X</a>{% endif %}
7     {% if link and is_current %}
8         <div class="call-area">
9             <a class="call honking" href="{% url 'funding_current' offer.slug %}">
10                 {% trans "Support!" %}</a>
11             <div class="learn-more">
12                 <a href="{% url 'infopage' 'wesprzyj' %}">{% trans "Learn more" %}</a>
13             </div>
14         </div>
15     {% endif %}
16     <div class="description {% if link and is_current %}with-button{% endif %}">
17     {% if link %}<a href="{% if is_current %}{% url 'funding_current' offer.slug %}{% else %}{{ offer.get_absolute_url }}{% endif %}">{% endif %}
18     {% if show_title %}
19         {% if is_current and show_title_calling %}<strong style="margin-right: .6em;">{% trans "Help free the book!" %}</strong>{% endif %}
20         <span class="funding-title{% if not is_current %}-strong{% endif %}">{{ offer }}</span>
21     {% endif %}
22
23     <div class="progress"
24         style="text-align: center; background-size: {{ percentage|stringformat:'.2f' }}% 1px;"
25     >
26         {% if sum %}
27             <span class="piece" style="float:left">{% trans "collected" %}: {{ sum }} zł</span>
28         {% endif %}
29         {% if not is_win %}
30             <span class="piece" style="float: right">{% trans "needed" %}: {{ offer.target }} zł</span>
31         {% endif %}
32         {% if is_current %}
33             <span class="piece" style="display:inline-block;margin-right: 0em;">{% trans "until fundraiser end" %}:
34                 <span class="countdown inline" data-until='{{ offer.end|date_to_utc:True|utc_for_js }}'></span>
35             </span>
36         {% else %}
37             <div style="clear: both"></div>
38         {% endif %}
39     </div>
40     {% if link %}</a>{% endif %}
41     </div>
42     <div style="clear: both"></div>
43 </div>
44 {% if closeable %}
45     <div class="funding-handle">{% trans "Help free the book!" %}</div>
46 {% endif %}
47 {% endspaceless %}
48 {% endif %}