mirror of
https://github.com/Crocmagnon/charasheet.git
synced 2024-11-05 06:13:55 +01:00
Vary health and mana bar color according to percentage remaining
This commit is contained in:
parent
71ce3eefa0
commit
6abf6bec8b
2 changed files with 2 additions and 2 deletions
|
@ -5,7 +5,7 @@
|
|||
hx-trigger="refresh_health_bar from:body"
|
||||
hx-swap="outerHTML"
|
||||
{% endif %}>
|
||||
<div class="progress-bar bg-success" style="width: {{ character.health_remaining_percent|floatformat:"0" }}%">
|
||||
<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>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
hx-trigger="refresh_mana_bar from:body"
|
||||
hx-swap="outerHTML"
|
||||
{% endif %}>
|
||||
<div class="progress-bar bg-primary" style="width: {{ character.mana_remaining_percent|floatformat:"0" }}%">
|
||||
<div class="progress-bar {% if character.mana_remaining_percent > 60 %}bg-primary{% elif character.mana_remaining_percent > 30 %}bg-warning{% else %}bg-danger{% endif %}" style="width: {{ character.mana_remaining_percent|floatformat:"0" }}%">
|
||||
PM : {{ character.mana_remaining }}/{{ character.mana_max }}
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue