mirror of
https://github.com/Crocmagnon/charasheet.git
synced 2024-11-05 06:13:55 +01:00
Display image
This commit is contained in:
parent
5ff9742a60
commit
10e79f3dbe
2 changed files with 42 additions and 23 deletions
4
src/character/static/character/details.css
Normal file
4
src/character/static/character/details.css
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
img.profile-pic {
|
||||||
|
max-width: 240px;
|
||||||
|
max-height: 240px;
|
||||||
|
}
|
|
@ -3,32 +3,47 @@
|
||||||
{% load django_bootstrap5 %}
|
{% load django_bootstrap5 %}
|
||||||
{% load character_extras %}
|
{% load character_extras %}
|
||||||
|
|
||||||
|
{% block head_end %}
|
||||||
|
<link rel="stylesheet" href="{% static "character/details.css" %}">
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% block title %}{{ character.name }}{% endblock %}
|
{% block title %}{{ character.name }}{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h1>{{ character.name }}</h1>
|
<div class="d-flex flex-column flex-sm-row justify-content-between">
|
||||||
<p>
|
<div>
|
||||||
Joueur : {{ character.player.get_full_name|default:character.player.username }}
|
<h1>{{ character.name }}</h1>
|
||||||
</p>
|
<p>
|
||||||
{% if party %}
|
Joueur : {{ character.player.get_full_name|default:character.player.username }}
|
||||||
<p>
|
</p>
|
||||||
Groupe : <a href="{{ party.get_absolute_url }}">{{ party }}</a>
|
{% if party %}
|
||||||
•
|
<p>
|
||||||
Joueurs : {% for other in party.characters.all %}<a href="{% url "character:view" pk=other.pk %}?party={{ party.pk }}">{{ other }}</a>{% if not forloop.last %}, {% endif %}{% endfor %}
|
Groupe : <a href="{{ party.get_absolute_url }}">{{ party }}</a>
|
||||||
</p>
|
•
|
||||||
{% endif %}
|
Joueurs : {% for other in party.characters.all %}<a href="{% url "character:view" pk=other.pk %}?party={{ party.pk }}">{{ other }}</a>{% if not forloop.last %}, {% endif %}{% endfor %}
|
||||||
{% if character|managed_by:user %}
|
</p>
|
||||||
<p>
|
{% endif %}
|
||||||
<a href="{% url "character:change" pk=character.pk %}">Modifier</a>
|
{% if character|managed_by:user %}
|
||||||
•
|
<p>
|
||||||
<a href="{% url "character:reset_stats" pk=character.pk %}" id="reset-stats">Réinitialiser les stats</a>
|
<a href="{% url "character:change" pk=character.pk %}">Modifier</a>
|
||||||
</p>
|
•
|
||||||
{% endif %}
|
<a href="{% url "character:reset_stats" pk=character.pk %}" id="reset-stats">Réinitialiser les stats</a>
|
||||||
<p>
|
</p>
|
||||||
{{ character.race.name }} {{ character.profile.name }} niv. {{ character.level }}<br>
|
{% endif %}
|
||||||
{{ character.get_gender_display }}, {{ character.age }} ans, {{ character.height_m }}m, {{ character.weight }}kg (IMC: {{ character.imc|floatformat }})
|
<p>
|
||||||
</p>
|
{{ character.race.name }} {{ character.profile.name }} niv. {{ character.level }}<br>
|
||||||
{% include "character/snippets/character_details/states.html" %}
|
{{ character.get_gender_display }}, {{ character.age }} ans, {{ character.height_m }}m, {{ character.weight }}kg (IMC: {{ character.imc|floatformat }})
|
||||||
|
</p>
|
||||||
|
{% include "character/snippets/character_details/states.html" %}
|
||||||
|
</div>
|
||||||
|
{% if character.profile_picture %}
|
||||||
|
<img class="rounded-5 profile-pic"
|
||||||
|
src="{{ character.profile_picture.url }}"
|
||||||
|
alt="Image de profil"
|
||||||
|
>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-12 col-md-6 col-lg-6 col-xl">
|
<div class="col-sm-12 col-md-6 col-lg-6 col-xl">
|
||||||
<table id="fight-table" class="table table-hover table-sm">
|
<table id="fight-table" class="table table-hover table-sm">
|
||||||
|
|
Loading…
Reference in a new issue