This commit is contained in:
Gabriel Augendre 2022-10-30 23:11:59 +01:00
parent 414de4ad03
commit 9969644129

View file

@ -16,7 +16,7 @@
{{ character.get_gender_display }}, {{ character.age }} ans, {{ character.height_m }}m, {{ character.weight }}kg (IMC: {{ character.imc }}) {{ character.get_gender_display }}, {{ character.age }} ans, {{ character.height_m }}m, {{ character.weight }}kg (IMC: {{ character.imc }})
</p> </p>
<div class="row"> <div class="row">
<div class="col-sm-6 col-md"> <div class="col-sm-6 col-lg-6 col-xl">
<table class="table table-hover table-sm"> <table class="table table-hover table-sm">
<thead> <thead>
<tr> <tr>
@ -59,7 +59,7 @@
</tbody> </tbody>
</table> </table>
</div> </div>
<div class="col-sm-6 col-md"> <div class="col-sm-6 col-lg-6 col-xl">
<table class="table table-hover table-sm"> <table class="table table-hover table-sm">
<thead> <thead>
<tr><th scope="col" colspan="2">Combat</th></tr> <tr><th scope="col" colspan="2">Combat</th></tr>
@ -108,7 +108,7 @@
</tbody> </tbody>
</table> </table>
</div> </div>
<div class="col-sm-6 col-md"> <div class="col-sm-12 col-md-8 col-lg-6 col-xl">
<table class="table table-hover table-sm"> <table class="table table-hover table-sm">
<thead> <thead>
<tr><th scope="col" colspan="2">Énergie</th></tr> <tr><th scope="col" colspan="2">Énergie</th></tr>
@ -116,7 +116,7 @@
<tbody class="table-group-divider"> <tbody class="table-group-divider">
<tr> <tr>
<th scope="row"> <th scope="row">
PV Points de vie
<div class="btn-group btn-group-sm float-end" role="group"> <div class="btn-group btn-group-sm float-end" role="group">
<button <button
hx-get="{% url "character:health_change" pk=character.pk %}?value=ko" hx-get="{% url "character:health_change" pk=character.pk %}?value=ko"
@ -148,7 +148,7 @@
</tr> </tr>
<tr> <tr>
<th scope="row"> <th scope="row">
PM Points de mana
<div class="btn-group btn-group-sm float-end" role="group"> <div class="btn-group btn-group-sm float-end" role="group">
<button <button
hx-get="{% url "character:mana_change" pk=character.pk %}?value=ko" hx-get="{% url "character:mana_change" pk=character.pk %}?value=ko"
@ -182,155 +182,158 @@
data-bs-title="{{ character.level }} (niveau) + {{ character.modifier_magic }} (mod. {{ character.profile.magical_strength }})" data-bs-title="{{ character.level }} (niveau) + {{ character.modifier_magic }} (mod. {{ character.profile.magical_strength }})"
{% elif character.profile.mana_max_compute == 2 %} {% elif character.profile.mana_max_compute == 2 %}
data-bs-title="2 x {{ character.level }} (niveau) + {{ character.modifier_magic }} (mod. {{ character.profile.magical_strength }})" data-bs-title="2 x {{ character.level }} (niveau) + {{ character.modifier_magic }} (mod. {{ character.profile.magical_strength }})"
{% endif %}> {% endif %}
>
<span id="mana-remaining">{{ character.mana_remaining }}</span> / {{ character.mana_max }} <span id="mana-remaining">{{ character.mana_remaining }}</span> / {{ character.mana_max }}
</td> </td>
</tr>
<tr>
<th scope="row">
Points de récup.
<div class="btn-group btn-group-sm float-end" role="group">
<button
type="button"
disabled
class="btn btn-outline-secondary"><i class="fa-solid fa-battery-empty"></i></button>
<button
hx-get="{% url "character:recovery_points_change" pk=character.pk %}?value=-1"
hx-target="#recovery-points-remaining"
hx-swap="innerHTML"
type="button"
class="btn btn-danger"><i class="fa-solid fa-minus"></i></button>
<button
hx-get="{% url "character:recovery_points_change" pk=character.pk %}?value=1"
hx-target="#recovery-points-remaining"
hx-swap="innerHTML"
type="button"
class="btn btn-success"><i class="fa-solid fa-plus"></i></button>
<button
type="button"
disabled
class="btn btn-outline-secondary"><i class="fa-solid fa-battery-full"></i></button>
</div>
</th>
<td>
<span id="recovery-points-remaining">{{ character.recovery_points_remaining }}</span> / {{ character.recovery_points_max }}</td>
</tr>
<tr>
<th scope="row">
Points de chance
<div class="btn-group btn-group-sm float-end" role="group">
<button
type="button"
disabled
class="btn btn-outline-secondary"><i class="fa-solid fa-battery-empty"></i></button>
<button
hx-get="{% url "character:luck_points_change" pk=character.pk %}?value=-1"
hx-target="#luck-points-remaining"
hx-swap="innerHTML"
type="button"
class="btn btn-danger"><i class="fa-solid fa-minus"></i></button>
<button
hx-get="{% url "character:luck_points_change" pk=character.pk %}?value=1"
hx-target="#luck-points-remaining"
hx-swap="innerHTML"
type="button"
class="btn btn-success"><i class="fa-solid fa-plus"></i></button>
<button
hx-get="{% url "character:luck_points_change" pk=character.pk %}?value=max"
hx-target="#luck-points-remaining"
hx-swap="innerHTML"
type="button"
class="btn btn-outline-success"><i class="fa-solid fa-battery-full"></i></button>
</div>
</th>
<td data-bs-toggle="tooltip"
data-bs-placement="left"
data-bs-title="[1 dé de vie + {{ character.modifier_constitution|add:character.level }}] PV">
<span id="luck-points-remaining">{{ character.luck_points_remaining }}</span> / {{ character.luck_points_max }}
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="row">
<div class="col-md-4 mb-3">
<div class="card">
<h5 class="card-header">{{ character.racial_capability.name }}</h5>
<div class="card-body">
<p class="card-text">{{ character.racial_capability.description|capfirst }}</p>
</div>
</div>
</div>
<div class="col-md-8">
<table class="table table-hover table-sm">
<thead>
<tr>
<th scope="col">Arme</th>
<th scope="col">Attaque</th>
<th scope="col">DM</th>
<th scope="col">Spécial</th>
</tr>
</thead>
<tbody class="table-group-divider">
{% for weapon in character.weapons.all %}
<tr> <tr>
<th scope="row"> <th scope="row">{{ weapon.name }}</th>
PR <td>1D20 +</td>
<div class="btn-group btn-group-sm float-end" role="group"> <td>{{ weapon.damage }}</td>
<button <td>{{ weapon.special }}</td>
type="button" </tr>
disabled {% empty %}
class="btn btn-outline-secondary"><i class="fa-solid fa-battery-empty"></i></button> <tr>
<button <td colspan="4">Aucune arme</td>
hx-get="{% url "character:recovery_points_change" pk=character.pk %}?value=-1" </tr>
hx-target="#recovery-points-remaining" {% endfor %}
hx-swap="innerHTML" </tbody>
type="button" </table>
class="btn btn-danger"><i class="fa-solid fa-minus"></i></button> </div>
<button </div>
hx-get="{% url "character:recovery_points_change" pk=character.pk %}?value=1" <div class="row">
hx-target="#recovery-points-remaining" <div class="col">
hx-swap="innerHTML" <div class="card">
type="button" <h5 class="card-header">Équipement</h5>
class="btn btn-success"><i class="fa-solid fa-plus"></i></button> <div class="card-body" id="equipment">
<button {% include "character/equipment_display.html" %}
type="button" </div>
disabled <div class="card-footer">
class="btn btn-outline-secondary"><i class="fa-solid fa-battery-full"></i></button> {{ character.money_pp }} pp,
</div> {{ character.money_po }} po,
</th> {{ character.money_pa }} pa,
<td> {{ character.money_pc }} pc
<span id="recovery-points-remaining">{{ character.recovery_points_remaining }}</span> / {{ character.recovery_points_max }}</td>
<tr>
<th scope="row">
PC
<div class="btn-group btn-group-sm float-end" role="group">
<button
type="button"
disabled
class="btn btn-outline-secondary"><i class="fa-solid fa-battery-empty"></i></button>
<button
hx-get="{% url "character:luck_points_change" pk=character.pk %}?value=-1"
hx-target="#luck-points-remaining"
hx-swap="innerHTML"
type="button"
class="btn btn-danger"><i class="fa-solid fa-minus"></i></button>
<button
hx-get="{% url "character:luck_points_change" pk=character.pk %}?value=1"
hx-target="#luck-points-remaining"
hx-swap="innerHTML"
type="button"
class="btn btn-success"><i class="fa-solid fa-plus"></i></button>
<button
hx-get="{% url "character:luck_points_change" pk=character.pk %}?value=max"
hx-target="#luck-points-remaining"
hx-swap="innerHTML"
type="button"
class="btn btn-outline-success"><i class="fa-solid fa-battery-full"></i></button>
</div>
</th>
<td data-bs-toggle="tooltip"
data-bs-placement="left"
data-bs-title="[1 dé de vie + {{ character.modifier_constitution|add:character.level }}] PV">
<span id="luck-points-remaining">{{ character.luck_points_remaining }}</span> / {{ character.luck_points_max }}
</td>
</tr>
</tbody>
</table>
</div> </div>
</div> </div>
<div class="row"> </div>
<div class="col-md-4 mb-3"> </div>
<div class="card"> <h4 class="mt-3">Voies & Capacités</h4>
<h5 class="card-header">{{ character.racial_capability.name }}</h5> <div class="row gy-3">
<div class="card-body"> {% for path, capabilities in character.get_capabilities_by_path.items %}
<p class="card-text">{{ character.racial_capability.description|capfirst }}</p> <div class="col-xl-3 col-md-6">
</div> <div class="card">
</div> <h5 class="card-header">{{ path.display_name }}</h5>
</div> {% if path.notes %}
<div class="col-md-8"> <div class="card-body text-bg-light">{{ path.notes }}</div>
<table class="table table-hover table-sm"> {% endif %}
<thead> <ul class="list-group list-group-flush">
<tr> {% for capability in capabilities %}
<th scope="col">Arme</th> <li class="list-group-item">
<th scope="col">Attaque</th> <strong>
<th scope="col">DM</th> {{ capability.rank }}.
<th scope="col">Spécial</th> {{ capability.name }}
</tr> {% if capability.spell %}<i class="fa-solid fa-hand-sparkles"></i>{% endif %}
</thead> {% if capability.limited %}<i class="fa-solid fa-handcuffs"></i>{% endif %}
<tbody class="table-group-divider"> </strong><br>
{% for weapon in character.weapons.all %} {{ capability.description }}
<tr> </li>
<th scope="row">{{ weapon.name }}</th> {% endfor %}
<td>1D20 +</td> </ul>
<td>{{ weapon.damage }}</td>
<td>{{ weapon.special }}</td>
</tr>
{% empty %}
<tr>
<td colspan="4">Aucune arme</td>
</tr>
{% endfor %}
</tbody>
</table>
</div> </div>
</div> </div>
<div class="row"> {% endfor %}
<div class="col"> </div>
<div class="card"> <h4 class="mt-3">Notes</h4>
<h5 class="card-header">Équipement</h5> <div class="row" id="notes">
<div class="card-body" id="equipment"> {% include "character/notes_display.html" %}
{% include "character/equipment_display.html" %} </div>
</div>
<div class="card-footer">
{{ character.money_pp }} pp,
{{ character.money_po }} po,
{{ character.money_pa }} pa,
{{ character.money_pc }} pc
</div>
</div>
</div>
</div>
<h4 class="mt-3">Voies & Capacités</h4>
<div class="row gy-3">
{% for path, capabilities in character.get_capabilities_by_path.items %}
<div class="col-xl-3 col-md-6">
<div class="card">
<h5 class="card-header">{{ path.display_name }}</h5>
{% if path.notes %}
<div class="card-body text-bg-light">{{ path.notes }}</div>
{% endif %}
<ul class="list-group list-group-flush">
{% for capability in capabilities %}
<li class="list-group-item">
<strong>
{{ capability.rank }}.
{{ capability.name }}
{% if capability.spell %}<i class="fa-solid fa-hand-sparkles"></i>{% endif %}
{% if capability.limited %}<i class="fa-solid fa-handcuffs"></i>{% endif %}
</strong><br>
{{ capability.description }}
</li>
{% endfor %}
</ul>
</div>
</div>
{% endfor %}
</div>
<h4 class="mt-3">Notes</h4>
<div class="row" id="notes">
{% include "character/notes_display.html" %}
</div>
{% endblock %} {% endblock %}