Display profile pic on lists as well

This commit is contained in:
Gabriel Augendre 2022-12-09 19:16:10 +01:00
parent 10e79f3dbe
commit 2b7e071e71
4 changed files with 18 additions and 9 deletions

View file

@ -1,4 +0,0 @@
img.profile-pic {
max-width: 240px;
max-height: 240px;
}

View file

@ -1,12 +1,7 @@
{% extends "common/base.html" %}
{% load static %}
{% load django_bootstrap5 %}
{% load character_extras %}
{% block head_end %}
<link rel="stylesheet" href="{% static "character/details.css" %}">
{% endblock %}
{% block title %}{{ character.name }}{% endblock %}
{% block content %}

View file

@ -3,6 +3,12 @@
<div class="card character" data-id="{{ character.pk }}">
<div class="card-body">
<h5 class="card-title">
{% if character.profile_picture %}
<img src="{{ character.profile_picture.url }}"
class="profile-pic rounded-5"
alt="Image de profil"
>
{% endif %}
{% if character.private %}
<i class="fa-solid fa-lock"
data-bs-toggle="tooltip"

View file

@ -10,3 +10,15 @@ blockquote {
padding-left: 2em;
border-left: solid #d5d5d5 4px;
}
.card img.profile-pic {
width: 28px;
height: 28px;
object-fit: cover;
}
img.profile-pic {
max-width: 240px;
max-height: 240px;
object-fit: cover;
}