From 10e79f3dbeb54b8eed1ac78f64fb22f7215e5c04 Mon Sep 17 00:00:00 2001 From: Gabriel Augendre Date: Fri, 9 Dec 2022 19:00:29 +0100 Subject: [PATCH] Display image --- src/character/static/character/details.css | 4 ++ .../character/character_details.html | 61 ++++++++++++------- 2 files changed, 42 insertions(+), 23 deletions(-) create mode 100644 src/character/static/character/details.css diff --git a/src/character/static/character/details.css b/src/character/static/character/details.css new file mode 100644 index 0000000..45409f0 --- /dev/null +++ b/src/character/static/character/details.css @@ -0,0 +1,4 @@ +img.profile-pic { + max-width: 240px; + max-height: 240px; +} diff --git a/src/character/templates/character/character_details.html b/src/character/templates/character/character_details.html index 8af0263..e97d1ed 100644 --- a/src/character/templates/character/character_details.html +++ b/src/character/templates/character/character_details.html @@ -3,32 +3,47 @@ {% load django_bootstrap5 %} {% load character_extras %} +{% block head_end %} + +{% endblock %} + {% block title %}{{ character.name }}{% endblock %} {% block content %} -

{{ character.name }}

-

- Joueur : {{ character.player.get_full_name|default:character.player.username }} -

- {% if party %} -

- Groupe : {{ party }} - • - Joueurs : {% for other in party.characters.all %}{{ other }}{% if not forloop.last %}, {% endif %}{% endfor %} -

- {% endif %} - {% if character|managed_by:user %} -

- Modifier - • - RĂ©initialiser les stats -

- {% endif %} -

- {{ character.race.name }} {{ character.profile.name }} niv. {{ character.level }}
- {{ character.get_gender_display }}, {{ character.age }} ans, {{ character.height_m }}m, {{ character.weight }}kg (IMC: {{ character.imc|floatformat }}) -

- {% include "character/snippets/character_details/states.html" %} +
+
+

{{ character.name }}

+

+ Joueur : {{ character.player.get_full_name|default:character.player.username }} +

+ {% if party %} +

+ Groupe : {{ party }} + • + Joueurs : {% for other in party.characters.all %}{{ other }}{% if not forloop.last %}, {% endif %}{% endfor %} +

+ {% endif %} + {% if character|managed_by:user %} +

+ Modifier + • + RĂ©initialiser les stats +

+ {% endif %} +

+ {{ character.race.name }} {{ character.profile.name }} niv. {{ character.level }}
+ {{ character.get_gender_display }}, {{ character.age }} ans, {{ character.height_m }}m, {{ character.weight }}kg (IMC: {{ character.imc|floatformat }}) +

+ {% include "character/snippets/character_details/states.html" %} +
+ {% if character.profile_picture %} + Image de profil + {% endif %} +
+