[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot] 2023-02-28 03:57:56 +00:00 committed by Gabriel Augendre
parent 6d0b95c19a
commit 7167821137
18 changed files with 75 additions and 75 deletions

View file

@ -20,8 +20,8 @@
<a href="{% url "character:view" pk=other.pk %}?party={{ party.pk }}">
{% if other.profile_picture %}
<img class="rounded-5 profile-pic-small"
src="{{ other.profile_picture.url }}"
alt="Image de profil"
src="{{ other.profile_picture.url }}"
alt="Image de profil"
>
{% endif %}
{{ other }}</a>{% if not forloop.last %}, {% endif %}
@ -43,8 +43,8 @@
</div>
{% if character.profile_picture %}
<img class="rounded-5 profile-pic"
src="{{ character.profile_picture.url }}"
alt="Image de profil"
src="{{ character.profile_picture.url }}"
alt="Image de profil"
>
{% endif %}
</div>

View file

@ -2,7 +2,7 @@
<div class="accordion-item">
<h2 class="accordion-header">
<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.name }}
{% if capability.spell %}&nbsp;<i class="fa-solid fa-hand-sparkles"></i>{% endif %}

View file

@ -4,9 +4,9 @@
Réduction de dégâts
{% if character|managed_by:user %}
<a hx-get="{% url "character:damage_reduction_change" pk=character.pk %}"
hx-target="#damage-reduction"
hx-swap="outerHTML"
class="btn btn-primary btn-sm"
hx-target="#damage-reduction"
hx-swap="outerHTML"
class="btn btn-primary btn-sm"
>
<i class="fa-solid fa-pen-to-square"></i> Edit
</a>

View file

@ -3,9 +3,9 @@
<h5 class="card-header">
Réduction de dégâts
<a hx-post="{% url "character:damage_reduction_change" pk=character.pk %}"
hx-target="#damage-reduction"
hx-swap="outerHTML"
class="btn btn-primary btn-sm"
hx-target="#damage-reduction"
hx-swap="outerHTML"
class="btn btn-primary btn-sm"
>
<i class="fa-solid fa-save"></i> Save
</a>

View file

@ -4,9 +4,9 @@
Équipement
{% if character|managed_by:user %}
<a hx-get="{% url "character:equipment_change" pk=character.pk %}"
hx-target="#equipment"
hx-swap="outerHTML"
class="btn btn-primary btn-sm"
hx-target="#equipment"
hx-swap="outerHTML"
class="btn btn-primary btn-sm"
>
<i class="fa-solid fa-pen-to-square"></i> Edit
</a>

View file

@ -3,9 +3,9 @@
<h5 class="card-header">
Équipement
<a hx-post="{% url "character:equipment_change" pk=character.pk %}"
hx-target="#equipment"
hx-swap="innerHTML"
class="btn btn-primary btn-sm"
hx-target="#equipment"
hx-swap="innerHTML"
class="btn btn-primary btn-sm"
>
<i class="fa-solid fa-save"></i> Save
</a>

View file

@ -3,9 +3,9 @@
<h2>
Notes MJ
<a hx-get="{% url "character:gm_notes_change" pk=character.pk %}"
hx-target="#gm-notes"
hx-swap="outerHTML"
class="btn btn-primary btn-sm"
hx-target="#gm-notes"
hx-swap="outerHTML"
class="btn btn-primary btn-sm"
>
<i class="fa-solid fa-pen-to-square"></i> Edit
</a>

View file

@ -3,9 +3,9 @@
<h2>
Notes MJ
<a hx-post="{% url "character:gm_notes_change" pk=character.pk %}"
hx-target="#gm-notes"
hx-swap="innerHTML"
class="btn btn-primary btn-sm"
hx-target="#gm-notes"
hx-swap="innerHTML"
class="btn btn-primary btn-sm"
>
<i class="fa-solid fa-save"></i> Save
</a>

View file

@ -1,10 +1,10 @@
{% 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 %}>
{% 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>

View file

@ -1,10 +1,10 @@
{% load character_extras %}
<div class="progress"
{% if character|managed_by:user %}
hx-get="{% url "character:get_mana_bar" pk=character.pk %}"
hx-trigger="refresh_mana_bar from:body"
hx-swap="outerHTML"
{% endif %}>
{% if character|managed_by:user %}
hx-get="{% url "character:get_mana_bar" pk=character.pk %}"
hx-trigger="refresh_mana_bar from:body"
hx-swap="outerHTML"
{% 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" }}%">
PM : {{ character.mana_remaining }}/{{ character.mana_max }}
</div>

View file

@ -3,9 +3,9 @@
<h2>
Notes
<a hx-get="{% url "character:notes_change" pk=character.pk %}"
hx-target="#notes"
hx-swap="outerHTML"
class="btn btn-primary btn-sm"
hx-target="#notes"
hx-swap="outerHTML"
class="btn btn-primary btn-sm"
>
<i class="fa-solid fa-pen-to-square"></i> Edit
</a>

View file

@ -3,9 +3,9 @@
<h2>
Notes
<a hx-post="{% url "character:notes_change" pk=character.pk %}"
hx-target="#notes"
hx-swap="innerHTML"
class="btn btn-primary btn-sm"
hx-target="#notes"
hx-swap="innerHTML"
class="btn btn-primary btn-sm"
>
<i class="fa-solid fa-save"></i> Save
</a>

View file

@ -5,16 +5,16 @@
{% if character|managed_by:user %}
<div class="btn-group btn-group-sm">
<button hx-get="{% url "character:remove_last_in_path" character_pk=character.pk path_pk=path.pk %}"
hx-target="#paths-and-capabilities"
hx-swap="outerHTML"
class="btn btn-secondary">
hx-target="#paths-and-capabilities"
hx-swap="outerHTML"
class="btn btn-secondary">
<i class="fa-solid fa-minus"></i>
</button>
{% if path|has_next_capability:character %}
<button hx-get="{% url "character:add_next_in_path" character_pk=character.pk path_pk=path.pk %}"
hx-target="#paths-and-capabilities"
hx-swap="outerHTML"
class="btn btn-primary">
hx-target="#paths-and-capabilities"
hx-swap="outerHTML"
class="btn btn-primary">
<i class="fa-solid fa-plus"></i>
</button>
{% endif %}

View file

@ -12,9 +12,9 @@
{{ add_path_form.character_path }}
{{ add_path_form.other_path }}
<button class="btn btn-primary"
hx-target="#paths-and-capabilities"
hx-swap="outerHTML"
hx-post="{% url "character:add_path" pk=character.pk %}">
hx-target="#paths-and-capabilities"
hx-swap="outerHTML"
hx-post="{% url "character:add_path" pk=character.pk %}">
Sélectionner
</button>
</div>

View file

@ -4,20 +4,20 @@
{% with character.states.all as character_states %}
{% for state in all_states %}
<img src="{{ state.icon_url }}" alt="{{ state.name }}" height="25" width="25"
data-bs-toggle="tooltip"
data-bs-placement="top"
data-bs-title="{{ state.name }} : {{ state.description }}"
class="{% if state in character_states %}state-enabled{% endif %}"
{% if character|managed_by:user %}
role="button"
{% if state in character_states %}
hx-get="{% url "character:remove_state" pk=character.pk state_pk=state.pk %}"
{% else %}
hx-get="{% url "character:add_state" pk=character.pk state_pk=state.pk %}"
{% endif %}
hx-target="#states"
hx-swap="outerHTML"
{% endif %}
data-bs-toggle="tooltip"
data-bs-placement="top"
data-bs-title="{{ state.name }} : {{ state.description }}"
class="{% if state in character_states %}state-enabled{% endif %}"
{% if character|managed_by:user %}
role="button"
{% if state in character_states %}
hx-get="{% url "character:remove_state" pk=character.pk state_pk=state.pk %}"
{% else %}
hx-get="{% url "character:add_state" pk=character.pk state_pk=state.pk %}"
{% endif %}
hx-target="#states"
hx-swap="outerHTML"
{% endif %}
>
{% endfor %}
{% endwith %}

View file

@ -5,15 +5,15 @@
<h5 class="card-title">
{% if character.profile_picture %}
<img src="{{ character.profile_picture.url }}"
class="profile-pic-small rounded-5"
alt="Image de profil"
class="profile-pic-small rounded-5"
alt="Image de profil"
>
{% endif %}
{% if character.private %}
<i class="fa-solid fa-lock"
data-bs-toggle="tooltip"
data-bs-placement="top"
data-bs-title="Personnage privé, ne peut pas être invité dans un nouveau groupe."
data-bs-toggle="tooltip"
data-bs-placement="top"
data-bs-title="Personnage privé, ne peut pas être invité dans un nouveau groupe."
></i>
{% endif %}
{{ character.name }}
@ -49,12 +49,12 @@
{% with character.states.all as character_states %}
{% for state in all_states %}
<img src="{{ state.icon_url }}" alt="{{ state.name }}" height="25" width="25"
data-bs-toggle="tooltip"
data-bs-placement="top"
data-bs-title="{{ state.name }} : {{ state.description }}"
{% if state in character_states %}
class="state-enabled"
{% endif %}
data-bs-toggle="tooltip"
data-bs-placement="top"
data-bs-title="{{ state.name }} : {{ state.description }}"
{% if state in character_states %}
class="state-enabled"
{% endif %}
>
{% endfor %}
{% endwith %}

View file

@ -3,6 +3,6 @@
{% csrf_token %}
{% bootstrap_form form %}
<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>
</form>

View file

@ -28,7 +28,7 @@
{% else %}
<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 %}"
style="width: {{ effect.remaining_percent|floatformat:"0" }}%">
style="width: {{ effect.remaining_percent|floatformat:"0" }}%">
{% if rounds == -1 %}
Permanent
{% elif rounds == 1 %}