bookwyrm-mastodon/bookwyrm/templates/snippets/goal_progress.html

13 lines
713 B
HTML
Raw Normal View History

2021-02-27 21:48:10 -05:00
{% load i18n %}
2021-02-11 11:24:20 -05:00
{% load humanize %}
2021-01-16 14:34:19 -05:00
<p>
{% if goal.progress_percent >= 100 %}
2021-02-27 21:48:10 -05:00
{% trans "Success!" %}
2021-01-16 14:34:19 -05:00
{% elif goal.progress_percent %}
2021-02-27 21:48:10 -05:00
{% blocktrans with percent=goal.percent %}{{ percent }}% complete!{% endblocktrans %}
2021-01-16 14:34:19 -05:00
{% endif %}
2021-02-11 11:24:20 -05:00
{% if goal.user == request.user %}You've{% else %}{{ goal.user.display_name }} has{% endif %} read {% if request.path != goal.local_path %}<a href="{{ goal.local_path }}">{% endif %}{{ goal.book_count }} of {{ goal.goal | intcomma }} books{% if request.path != goal.local_path %}</a>{% endif %}.
2021-01-16 14:34:19 -05:00
</p>
2021-01-16 17:33:43 -05:00
<progress class="progress is-large" value="{{ goal.book_count }}" max="{{ goal.goal }}" aria-hidden="true">{{ goal.progress_percent }}%</progress>
2021-01-16 14:34:19 -05:00