{% load i18n %}
{% load time_tags %}
{% if offer %}
-<a
- class="funding {{ add_class }}"
- style="background-size: {{ percentage|stringformat:'.2f' }}% 1px;"
- {% if link %}href="{{ offer.get_absolute_url }}"{% endif %}
- >
- {% if is_current %}
- {% trans "Support a book:" %}
- {% endif %}
- <em>{{ offer }}</em>
- <span style="float:right">
- {% trans "collected" %}: <em>{{ offer.sum }} / {{ offer.target }} zł</em>
- {% if is_current %}
- <span style="margin-left: 2em;">{% trans "until fundraiser end" %}:
- <strong class="countdown inline" data-until='{{ offer.end|local_to_utc|utc_for_js }}'></strong>
- </span>
+{% spaceless %}
+<div class="funding" style="">
+ {% if link and is_current %}
+ <a class="call" href="{{ offer.get_absolute_url }}">
+ {% trans "Support a book!" %}</a>
{% endif %}
- </span>
- <div style="clear:both"></div>
-</a>
+ <div class="description {% if link and is_current %}with-button{% endif %}"
+ style="display: inline-block;">
+ <strong>
+ {% if link %}<a href="{{ offer.get_absolute_url }}">{% endif %}
+ {{ offer }}
+ {% if link %}</a>{% endif %}
+ </strong>
+ <div class="progress"
+ style="text-align: center; background-size: {{ percentage|stringformat:'.2f' }}% 1px;"
+ >
+ {% if sum %}
+ <span class="piece" style="float:left">{% trans "collected" %}: <em>{{ sum }} </em></span>
+ {% endif %}
+ {% if not is_win %}
+ <span class="piece" style="float: right">{% trans "missing" %}: <em>{{ missing }} zł</em></span>
+ {% endif %}
+ {% if is_current %}
+ <span class="piece" style="display:inline-block;margin-right: 0em;">{% trans "until fundraiser end" %}:
+ <span class="countdown inline" data-until='{{ offer.end|date_to_utc:True|utc_for_js }}'></span>
+ </span>
+ {% endif %}
+
+ <div style="clear: both"></div>
+ </div>
+ </div>
+</div>
+{% endspaceless %}
{% endif %}