Commit 4e93c90f authored by Mat's avatar Mat

fragment, correction de l'url des images + styles avatar

parent 3757d9f9
<style>
img.avatar {
width: 50px;
height: 50px;
border-radius: 50%;
}
</style>
<ul>
{% for user in users %}
{# @var user \SocketBundle\Entity\User #}
{# pour avoir l'autocomplétion #}
<li>
{{ user.username }}
<img src="{{ 'http://localhost/tbws/web/assets/img/avatar/' ~ user.avatar | default('default.jpg') }}" alt="avatar">
<img src="{{ 'http://0.0.0.0:81/web/assets/img/avatar/' ~ user.avatar | default('default.jpg') }}" alt="avatar" class="avatar">
{#
normalement, asset() retourne 'localhost/tbws/web/'
mais avec web socket, asset() retourne juste 'localhost'
#}
</li>
{% endfor %}
</ul>
\ No newline at end of file
</ul>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment