mirror of
https://github.com/Crocmagnon/charasheet.git
synced 2024-05-22 02:42:51 +02:00
7167821137
for more information, see https://pre-commit.ci
12 lines
603 B
HTML
12 lines
603 B
HTML
{% load character_extras %}
|
|
<div class="progress"
|
|
{% if character|managed_by:user %}
|
|
hx-get="{% url "character:get_health_bar" pk=character.pk %}"
|
|
hx-trigger="refresh_health_bar from:body"
|
|
hx-swap="outerHTML"
|
|
{% endif %}>
|
|
<div class="progress-bar {% if character.health_remaining_percent > 60 %}bg-success{% elif character.health_remaining_percent > 30 %}bg-warning{% else %}bg-danger{% endif %}" style="width: {{ character.health_remaining_percent|floatformat:"0" }}%">
|
|
PV : {{ character.health_remaining }}/{{ character.health_max }}
|
|
</div>
|
|
</div>
|