charasheet/src/character/templates/character/view.html

188 lines
7.6 KiB
HTML

{% extends "common/base.html" %}
{% block title %}{{ character.name }}{% endblock %}
{% block content %}
<h1>{{ character.name }}</h1>
<p>
<a href="{% url "admin:character_character_change" object_id=character.pk %}">Edit</a>
</p>
<p>
Joueur : {{ character.player.get_full_name|default:character.player.username }}
</p>
<p>
{{ character.race.name }} {{ character.profile.name }} niv. {{ character.level }}<br>
{{ character.get_gender_display }}, {{ character.age }} ans, {{ character.height_m }}m, {{ character.weight }}kg (IMC: {{ character.imc }})
</p>
<div class="row">
<div class="col-sm-6 col-md">
<table class="table table-hover table-sm">
<thead>
<tr>
<th scope="col">Carac</th>
<th scope="col">Valeur</th>
<th scope="col">Mod.</th>
</tr>
</thead>
<tbody class="table-group-divider">
<tr>
<th scope="row">FOR</th>
<td>{{ character.value_strength }}</td>
<td>{{ character.modifier_strength }}</td>
</tr>
<tr>
<th scope="row">DEX</th>
<td>{{ character.value_dexterity }}</td>
<td>{{ character.modifier_dexterity }}</td>
</tr>
<tr>
<th scope="row">CON</th>
<td>{{ character.value_constitution }}</td>
<td>{{ character.modifier_constitution }}</td>
</tr>
<tr>
<th scope="row">INT</th>
<td>{{ character.value_intelligence }}</td>
<td>{{ character.modifier_intelligence }}</td>
</tr>
<tr>
<th scope="row">SAG</th>
<td>{{ character.value_wisdom }}</td>
<td>{{ character.modifier_wisdom }}</td>
</tr>
<tr>
<th scope="row">CHA</th>
<td>{{ character.value_charisma }}</td>
<td>{{ character.modifier_charisma }}</td>
</tr>
</tbody>
</table>
</div>
<div class="col-sm-6 col-md">
<table class="table table-hover table-sm">
<thead>
<tr><th scope="col" colspan="2">Combat</th></tr>
</thead>
<tbody class="table-group-divider">
<tr>
<th scope="row">Initiative</th>
<td>{{ character.initiative }}</td>
</tr>
<tr>
<th scope="row">Att. contact</th>
<td>{{ character.attack_melee }}</td>
</tr>
<tr>
<th scope="row">Att. distance</th>
<td>{{ character.attack_range }}</td>
</tr>
<tr>
<th scope="row">Att. magique</th>
<td>{{ character.attack_magic }}</td>
</tr>
<tr>
<th scope="row">Défense</th>
<td>{{ character.defense }}</td>
</tr>
</tbody>
</table>
</div>
<div class="col-sm-6 col-md">
<table class="table table-hover table-sm">
<thead>
<tr><th scope="col" colspan="2">Énergie</th></tr>
</thead>
<tbody class="table-group-divider">
<tr>
<th scope="row">PV max</th>
<td>{{ character.health_max }}</td>
</tr>
<tr>
<th scope="row">PV restants</th>
<td>{{ character.health_remaining }}</td>
</tr>
<tr>
<th scope="row">PM max</th>
<td>{{ character.mana_max }}</td>
</tr>
<tr>
<th scope="row">PM restants</th>
<td>{{ character.mana_remaining }}</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>
<th scope="row">{{ weapon.name }}</th>
<td>1D20 +</td>
<td>{{ weapon.damage }}</td>
<td>{{ weapon.special }}</td>
</tr>
{% empty %}
<tr>
<td colspan="4">Aucune arme</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
<div class="row">
<div class="col">
<div class="card">
<h5 class="card-header">Équipement</h5>
<div class="card-body">
<p class="card-text">{{ character.equipment|linebreaksbr|default:"Rien ici..." }}</p>
</div>
</div>
</div>
</div>
<h5 class="mt-3">Voies & Capacités</h5>
<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">{{ 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>
{% endblock %}