padding: .2em 1em;
border-radius: 0 0 0 1em;
font-size: 13px;
+}
+
+.funding-cover {
+ float:left;
+ margin-right: 10px;
}
\ No newline at end of file
<div class="normal-text">{{ object.description|safe }}</div>
-{% funding object %}
+{% funding object show_title=False %}
<div class="white-box">
+ {% if object.cover %}
+ <img src="{{ object.cover.url }}" class="funding-cover"/>
+ {% endif %}
<div class="normal-text">
{% offer_status object %}
{% offer_status_more object %}
<p><a href="{% url 'infopage' 'wesprzyj' %}">{% trans "Learn more" %}</a>.</p>
</div>
+ <div style="clear:both;"></div>
{% if object.is_current %}
<div class="normal-text">
style="display: inline-block;">
{% if link %}<a href="{% if is_current %}{% url 'funding_current' offer.slug %}{% else %}{{ offer.get_absolute_url }}{% endif %}">{% endif %}
{% if is_current %}<strong style="margin-right: .6em;">{% trans "Help free the book!" %}</strong>{% endif %}
- <span class="funding-title{% if not is_current %}-strong{% endif %}">{{ offer }}</span>
+ {% if show_title %}<span class="funding-title{% if not is_current %}-strong{% endif %}">{{ offer }}</span>{% endif %}
<div class="progress"
style="text-align: center; background-size: {{ percentage|stringformat:'.2f' }}% 1px;"
@register.inclusion_tag("funding/tags/funding.html", takes_context=True)
-def funding(context, offer=None, link=False, closeable=False, add_class=""):
+def funding(context, offer=None, link=False, closeable=False, show_title=True, add_class=""):
if offer is None and context.get('funding_no_show_current') is None:
offer = Offer.current()
if offer is None:
'percentage': 100 * offer_sum / offer.target,
'link': link,
'closeable': closeable,
+ 'show_title': show_title,
'add_class': add_class,
}