mirror of
https://github.com/Crocmagnon/charasheet.git
synced 2024-11-22 22:48:03 +01:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
6d0b95c19a
commit
7167821137
18 changed files with 75 additions and 75 deletions
|
@ -20,8 +20,8 @@
|
||||||
<a href="{% url "character:view" pk=other.pk %}?party={{ party.pk }}">
|
<a href="{% url "character:view" pk=other.pk %}?party={{ party.pk }}">
|
||||||
{% if other.profile_picture %}
|
{% if other.profile_picture %}
|
||||||
<img class="rounded-5 profile-pic-small"
|
<img class="rounded-5 profile-pic-small"
|
||||||
src="{{ other.profile_picture.url }}"
|
src="{{ other.profile_picture.url }}"
|
||||||
alt="Image de profil"
|
alt="Image de profil"
|
||||||
>
|
>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{{ other }}</a>{% if not forloop.last %}, {% endif %}
|
{{ other }}</a>{% if not forloop.last %}, {% endif %}
|
||||||
|
@ -43,8 +43,8 @@
|
||||||
</div>
|
</div>
|
||||||
{% if character.profile_picture %}
|
{% if character.profile_picture %}
|
||||||
<img class="rounded-5 profile-pic"
|
<img class="rounded-5 profile-pic"
|
||||||
src="{{ character.profile_picture.url }}"
|
src="{{ character.profile_picture.url }}"
|
||||||
alt="Image de profil"
|
alt="Image de profil"
|
||||||
>
|
>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<div class="accordion-item">
|
<div class="accordion-item">
|
||||||
<h2 class="accordion-header">
|
<h2 class="accordion-header">
|
||||||
<button class="accordion-button collapsed {% if not character_capability.known %}text-bg-light{% endif %}" type="button"
|
<button class="accordion-button collapsed {% if not character_capability.known %}text-bg-light{% endif %}" type="button"
|
||||||
data-bs-toggle="collapse" data-bs-target="#cap-{{ capability.pk }}">
|
data-bs-toggle="collapse" data-bs-target="#cap-{{ capability.pk }}">
|
||||||
{{ capability.rank }}.
|
{{ capability.rank }}.
|
||||||
{{ capability.name }}
|
{{ capability.name }}
|
||||||
{% if capability.spell %} <i class="fa-solid fa-hand-sparkles"></i>{% endif %}
|
{% if capability.spell %} <i class="fa-solid fa-hand-sparkles"></i>{% endif %}
|
||||||
|
|
|
@ -4,9 +4,9 @@
|
||||||
Réduction de dégâts
|
Réduction de dégâts
|
||||||
{% if character|managed_by:user %}
|
{% if character|managed_by:user %}
|
||||||
<a hx-get="{% url "character:damage_reduction_change" pk=character.pk %}"
|
<a hx-get="{% url "character:damage_reduction_change" pk=character.pk %}"
|
||||||
hx-target="#damage-reduction"
|
hx-target="#damage-reduction"
|
||||||
hx-swap="outerHTML"
|
hx-swap="outerHTML"
|
||||||
class="btn btn-primary btn-sm"
|
class="btn btn-primary btn-sm"
|
||||||
>
|
>
|
||||||
<i class="fa-solid fa-pen-to-square"></i> Edit
|
<i class="fa-solid fa-pen-to-square"></i> Edit
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
<h5 class="card-header">
|
<h5 class="card-header">
|
||||||
Réduction de dégâts
|
Réduction de dégâts
|
||||||
<a hx-post="{% url "character:damage_reduction_change" pk=character.pk %}"
|
<a hx-post="{% url "character:damage_reduction_change" pk=character.pk %}"
|
||||||
hx-target="#damage-reduction"
|
hx-target="#damage-reduction"
|
||||||
hx-swap="outerHTML"
|
hx-swap="outerHTML"
|
||||||
class="btn btn-primary btn-sm"
|
class="btn btn-primary btn-sm"
|
||||||
>
|
>
|
||||||
<i class="fa-solid fa-save"></i> Save
|
<i class="fa-solid fa-save"></i> Save
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -4,9 +4,9 @@
|
||||||
Équipement
|
Équipement
|
||||||
{% if character|managed_by:user %}
|
{% if character|managed_by:user %}
|
||||||
<a hx-get="{% url "character:equipment_change" pk=character.pk %}"
|
<a hx-get="{% url "character:equipment_change" pk=character.pk %}"
|
||||||
hx-target="#equipment"
|
hx-target="#equipment"
|
||||||
hx-swap="outerHTML"
|
hx-swap="outerHTML"
|
||||||
class="btn btn-primary btn-sm"
|
class="btn btn-primary btn-sm"
|
||||||
>
|
>
|
||||||
<i class="fa-solid fa-pen-to-square"></i> Edit
|
<i class="fa-solid fa-pen-to-square"></i> Edit
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
<h5 class="card-header">
|
<h5 class="card-header">
|
||||||
Équipement
|
Équipement
|
||||||
<a hx-post="{% url "character:equipment_change" pk=character.pk %}"
|
<a hx-post="{% url "character:equipment_change" pk=character.pk %}"
|
||||||
hx-target="#equipment"
|
hx-target="#equipment"
|
||||||
hx-swap="innerHTML"
|
hx-swap="innerHTML"
|
||||||
class="btn btn-primary btn-sm"
|
class="btn btn-primary btn-sm"
|
||||||
>
|
>
|
||||||
<i class="fa-solid fa-save"></i> Save
|
<i class="fa-solid fa-save"></i> Save
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
<h2>
|
<h2>
|
||||||
Notes MJ
|
Notes MJ
|
||||||
<a hx-get="{% url "character:gm_notes_change" pk=character.pk %}"
|
<a hx-get="{% url "character:gm_notes_change" pk=character.pk %}"
|
||||||
hx-target="#gm-notes"
|
hx-target="#gm-notes"
|
||||||
hx-swap="outerHTML"
|
hx-swap="outerHTML"
|
||||||
class="btn btn-primary btn-sm"
|
class="btn btn-primary btn-sm"
|
||||||
>
|
>
|
||||||
<i class="fa-solid fa-pen-to-square"></i> Edit
|
<i class="fa-solid fa-pen-to-square"></i> Edit
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
<h2>
|
<h2>
|
||||||
Notes MJ
|
Notes MJ
|
||||||
<a hx-post="{% url "character:gm_notes_change" pk=character.pk %}"
|
<a hx-post="{% url "character:gm_notes_change" pk=character.pk %}"
|
||||||
hx-target="#gm-notes"
|
hx-target="#gm-notes"
|
||||||
hx-swap="innerHTML"
|
hx-swap="innerHTML"
|
||||||
class="btn btn-primary btn-sm"
|
class="btn btn-primary btn-sm"
|
||||||
>
|
>
|
||||||
<i class="fa-solid fa-save"></i> Save
|
<i class="fa-solid fa-save"></i> Save
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
{% load character_extras %}
|
{% load character_extras %}
|
||||||
<div class="progress"
|
<div class="progress"
|
||||||
{% if character|managed_by:user %}
|
{% if character|managed_by:user %}
|
||||||
hx-get="{% url "character:get_health_bar" pk=character.pk %}"
|
hx-get="{% url "character:get_health_bar" pk=character.pk %}"
|
||||||
hx-trigger="refresh_health_bar from:body"
|
hx-trigger="refresh_health_bar from:body"
|
||||||
hx-swap="outerHTML"
|
hx-swap="outerHTML"
|
||||||
{% endif %}>
|
{% 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" }}%">
|
<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 }}
|
PV : {{ character.health_remaining }}/{{ character.health_max }}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
{% load character_extras %}
|
{% load character_extras %}
|
||||||
<div class="progress"
|
<div class="progress"
|
||||||
{% if character|managed_by:user %}
|
{% if character|managed_by:user %}
|
||||||
hx-get="{% url "character:get_mana_bar" pk=character.pk %}"
|
hx-get="{% url "character:get_mana_bar" pk=character.pk %}"
|
||||||
hx-trigger="refresh_mana_bar from:body"
|
hx-trigger="refresh_mana_bar from:body"
|
||||||
hx-swap="outerHTML"
|
hx-swap="outerHTML"
|
||||||
{% endif %}>
|
{% endif %}>
|
||||||
<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" }}%">
|
<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 }}
|
PM : {{ character.mana_remaining }}/{{ character.mana_max }}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
<h2>
|
<h2>
|
||||||
Notes
|
Notes
|
||||||
<a hx-get="{% url "character:notes_change" pk=character.pk %}"
|
<a hx-get="{% url "character:notes_change" pk=character.pk %}"
|
||||||
hx-target="#notes"
|
hx-target="#notes"
|
||||||
hx-swap="outerHTML"
|
hx-swap="outerHTML"
|
||||||
class="btn btn-primary btn-sm"
|
class="btn btn-primary btn-sm"
|
||||||
>
|
>
|
||||||
<i class="fa-solid fa-pen-to-square"></i> Edit
|
<i class="fa-solid fa-pen-to-square"></i> Edit
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
<h2>
|
<h2>
|
||||||
Notes
|
Notes
|
||||||
<a hx-post="{% url "character:notes_change" pk=character.pk %}"
|
<a hx-post="{% url "character:notes_change" pk=character.pk %}"
|
||||||
hx-target="#notes"
|
hx-target="#notes"
|
||||||
hx-swap="innerHTML"
|
hx-swap="innerHTML"
|
||||||
class="btn btn-primary btn-sm"
|
class="btn btn-primary btn-sm"
|
||||||
>
|
>
|
||||||
<i class="fa-solid fa-save"></i> Save
|
<i class="fa-solid fa-save"></i> Save
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -5,16 +5,16 @@
|
||||||
{% if character|managed_by:user %}
|
{% if character|managed_by:user %}
|
||||||
<div class="btn-group btn-group-sm">
|
<div class="btn-group btn-group-sm">
|
||||||
<button hx-get="{% url "character:remove_last_in_path" character_pk=character.pk path_pk=path.pk %}"
|
<button hx-get="{% url "character:remove_last_in_path" character_pk=character.pk path_pk=path.pk %}"
|
||||||
hx-target="#paths-and-capabilities"
|
hx-target="#paths-and-capabilities"
|
||||||
hx-swap="outerHTML"
|
hx-swap="outerHTML"
|
||||||
class="btn btn-secondary">
|
class="btn btn-secondary">
|
||||||
<i class="fa-solid fa-minus"></i>
|
<i class="fa-solid fa-minus"></i>
|
||||||
</button>
|
</button>
|
||||||
{% if path|has_next_capability:character %}
|
{% if path|has_next_capability:character %}
|
||||||
<button hx-get="{% url "character:add_next_in_path" character_pk=character.pk path_pk=path.pk %}"
|
<button hx-get="{% url "character:add_next_in_path" character_pk=character.pk path_pk=path.pk %}"
|
||||||
hx-target="#paths-and-capabilities"
|
hx-target="#paths-and-capabilities"
|
||||||
hx-swap="outerHTML"
|
hx-swap="outerHTML"
|
||||||
class="btn btn-primary">
|
class="btn btn-primary">
|
||||||
<i class="fa-solid fa-plus"></i>
|
<i class="fa-solid fa-plus"></i>
|
||||||
</button>
|
</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -12,9 +12,9 @@
|
||||||
{{ add_path_form.character_path }}
|
{{ add_path_form.character_path }}
|
||||||
{{ add_path_form.other_path }}
|
{{ add_path_form.other_path }}
|
||||||
<button class="btn btn-primary"
|
<button class="btn btn-primary"
|
||||||
hx-target="#paths-and-capabilities"
|
hx-target="#paths-and-capabilities"
|
||||||
hx-swap="outerHTML"
|
hx-swap="outerHTML"
|
||||||
hx-post="{% url "character:add_path" pk=character.pk %}">
|
hx-post="{% url "character:add_path" pk=character.pk %}">
|
||||||
Sélectionner
|
Sélectionner
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -4,20 +4,20 @@
|
||||||
{% with character.states.all as character_states %}
|
{% with character.states.all as character_states %}
|
||||||
{% for state in all_states %}
|
{% for state in all_states %}
|
||||||
<img src="{{ state.icon_url }}" alt="{{ state.name }}" height="25" width="25"
|
<img src="{{ state.icon_url }}" alt="{{ state.name }}" height="25" width="25"
|
||||||
data-bs-toggle="tooltip"
|
data-bs-toggle="tooltip"
|
||||||
data-bs-placement="top"
|
data-bs-placement="top"
|
||||||
data-bs-title="{{ state.name }} : {{ state.description }}"
|
data-bs-title="{{ state.name }} : {{ state.description }}"
|
||||||
class="{% if state in character_states %}state-enabled{% endif %}"
|
class="{% if state in character_states %}state-enabled{% endif %}"
|
||||||
{% if character|managed_by:user %}
|
{% if character|managed_by:user %}
|
||||||
role="button"
|
role="button"
|
||||||
{% if state in character_states %}
|
{% if state in character_states %}
|
||||||
hx-get="{% url "character:remove_state" pk=character.pk state_pk=state.pk %}"
|
hx-get="{% url "character:remove_state" pk=character.pk state_pk=state.pk %}"
|
||||||
{% else %}
|
{% else %}
|
||||||
hx-get="{% url "character:add_state" pk=character.pk state_pk=state.pk %}"
|
hx-get="{% url "character:add_state" pk=character.pk state_pk=state.pk %}"
|
||||||
{% endif %}
|
{% endif %}
|
||||||
hx-target="#states"
|
hx-target="#states"
|
||||||
hx-swap="outerHTML"
|
hx-swap="outerHTML"
|
||||||
{% endif %}
|
{% endif %}
|
||||||
>
|
>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
|
|
|
@ -5,15 +5,15 @@
|
||||||
<h5 class="card-title">
|
<h5 class="card-title">
|
||||||
{% if character.profile_picture %}
|
{% if character.profile_picture %}
|
||||||
<img src="{{ character.profile_picture.url }}"
|
<img src="{{ character.profile_picture.url }}"
|
||||||
class="profile-pic-small rounded-5"
|
class="profile-pic-small rounded-5"
|
||||||
alt="Image de profil"
|
alt="Image de profil"
|
||||||
>
|
>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if character.private %}
|
{% if character.private %}
|
||||||
<i class="fa-solid fa-lock"
|
<i class="fa-solid fa-lock"
|
||||||
data-bs-toggle="tooltip"
|
data-bs-toggle="tooltip"
|
||||||
data-bs-placement="top"
|
data-bs-placement="top"
|
||||||
data-bs-title="Personnage privé, ne peut pas être invité dans un nouveau groupe."
|
data-bs-title="Personnage privé, ne peut pas être invité dans un nouveau groupe."
|
||||||
></i>
|
></i>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{{ character.name }}
|
{{ character.name }}
|
||||||
|
@ -49,12 +49,12 @@
|
||||||
{% with character.states.all as character_states %}
|
{% with character.states.all as character_states %}
|
||||||
{% for state in all_states %}
|
{% for state in all_states %}
|
||||||
<img src="{{ state.icon_url }}" alt="{{ state.name }}" height="25" width="25"
|
<img src="{{ state.icon_url }}" alt="{{ state.name }}" height="25" width="25"
|
||||||
data-bs-toggle="tooltip"
|
data-bs-toggle="tooltip"
|
||||||
data-bs-placement="top"
|
data-bs-placement="top"
|
||||||
data-bs-title="{{ state.name }} : {{ state.description }}"
|
data-bs-title="{{ state.name }} : {{ state.description }}"
|
||||||
{% if state in character_states %}
|
{% if state in character_states %}
|
||||||
class="state-enabled"
|
class="state-enabled"
|
||||||
{% endif %}
|
{% endif %}
|
||||||
>
|
>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
|
|
|
@ -3,6 +3,6 @@
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{% bootstrap_form form %}
|
{% bootstrap_form form %}
|
||||||
<button class="btn btn-primary" type="submit" hx-post="{% url "party:add_effect" pk=party.pk %}"
|
<button class="btn btn-primary" type="submit" hx-post="{% url "party:add_effect" pk=party.pk %}"
|
||||||
hx-target="#effects" hx-swap="outerHTML"
|
hx-target="#effects" hx-swap="outerHTML"
|
||||||
>Enregistrer</button>
|
>Enregistrer</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
{% else %}
|
{% else %}
|
||||||
<div class="progress">
|
<div class="progress">
|
||||||
<div class="progress-bar {% if effect.remaining_percent >= 60 %}bg-success{% elif effect.remaining_percent >= 30 %}bg-warning{% else %}bg-danger{% endif %}"
|
<div class="progress-bar {% if effect.remaining_percent >= 60 %}bg-success{% elif effect.remaining_percent >= 30 %}bg-warning{% else %}bg-danger{% endif %}"
|
||||||
style="width: {{ effect.remaining_percent|floatformat:"0" }}%">
|
style="width: {{ effect.remaining_percent|floatformat:"0" }}%">
|
||||||
{% if rounds == -1 %}
|
{% if rounds == -1 %}
|
||||||
Permanent
|
Permanent
|
||||||
{% elif rounds == 1 %}
|
{% elif rounds == 1 %}
|
||||||
|
|
Loading…
Reference in a new issue