widget_user: add title style if there is one

This commit is contained in:
Darks 2020-07-30 14:50:08 +02:00
parent a4efe29a7d
commit a2767c4343
Signed by untrusted user: Darks
GPG Key ID: F61F10FA138E797C
1 changed files with 5 additions and 1 deletions

View File

@ -4,7 +4,11 @@
<img class="profile-avatar" src="{{ url_for('avatar', filename=user.avatar) }}" alt="Avatar de {{ user.name }}">
<div>
<div class="profile-name"><a href="{{ url_for('user', username=user.name) }}">{{ user.name }}</a></div>
<div class="profile-title">{{ user.title.name if user.title else "Membre" }}</div>
{% if user.title %}
<div class="profile-title" style="{{ user.title.css }}">{{ user.title.name }}</div>
{% else %}
<div class="profile-title">Membre</div>
{% endif %}
<div class="profile-points">Niveau {{ user.level[0] }} <span>({{ user.xp }})</span></div>
<div class="profile-points-small">N{{ user.level[0] }} <span>({{ user.xp }})</span></div>
<div class="profile-xp"><div style='width: {{ user.level[1] }}%;'></div></div>