40 lines
2.2 KiB
Twig
40 lines
2.2 KiB
Twig
{% extends "base.html.twig" %}
|
|
|
|
{% block body %}
|
|
<div class="text-center">
|
|
{% if app.user %}
|
|
<a class="btn btn-primary" href="{{path("app_logout")}}" title="Connexion">
|
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="w-6 h-6" style="width:25px; padding-right:5px">
|
|
<path fill-rule="evenodd" d="M7.5 3.75A1.5 1.5 0 006 5.25v13.5a1.5 1.5 0 001.5 1.5h6a1.5 1.5 0 001.5-1.5V15a.75.75 0 011.5 0v3.75a3 3 0 01-3 3h-6a3 3 0 01-3-3V5.25a3 3 0 013-3h6a3 3 0 013 3V9A.75.75 0 0115 9V5.25a1.5 1.5 0 00-1.5-1.5h-6zm5.03 4.72a.75.75 0 010 1.06l-1.72 1.72h10.94a.75.75 0 010 1.5H10.81l1.72 1.72a.75.75 0 11-1.06 1.06l-3-3a.75.75 0 010-1.06l3-3a.75.75 0 011.06 0z" clip-rule="evenodd" />
|
|
</svg>
|
|
|
|
Logout
|
|
</a>
|
|
{% else %}
|
|
<a class="btn btn-primary" href="{{path("app_login")}}" title="Connexion">
|
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="w-6 h-6" style="width:25px; padding-right:5px">
|
|
<path fill-rule="evenodd" d="M7.5 3.75A1.5 1.5 0 006 5.25v13.5a1.5 1.5 0 001.5 1.5h6a1.5 1.5 0 001.5-1.5V15a.75.75 0 011.5 0v3.75a3 3 0 01-3 3h-6a3 3 0 01-3-3V5.25a3 3 0 013-3h6a3 3 0 013 3V9A.75.75 0 0115 9V5.25a1.5 1.5 0 00-1.5-1.5h-6zm10.72 4.72a.75.75 0 011.06 0l3 3a.75.75 0 010 1.06l-3 3a.75.75 0 11-1.06-1.06l1.72-1.72H9a.75.75 0 010-1.5h10.94l-1.72-1.72a.75.75 0 010-1.06z" clip-rule="evenodd" />
|
|
</svg>
|
|
|
|
Login
|
|
</a>
|
|
{% endif %}
|
|
</div>
|
|
|
|
{% if app.user %}
|
|
<div class="card mt-5" style="max-width:600px; margin:auto;">
|
|
<div class="card-body d-flex">
|
|
<div>
|
|
<img src="{{ (app.user.avatar starts with 'images/' ? asset(app.user.avatar) : app.user.avatar ) }}" style="height:100px; background-color: #212529"/>
|
|
</div>
|
|
|
|
<div class="ps-3">
|
|
<b>login</b> = {{ app.user.username }}<br>
|
|
<b>firstname</b> = {{ app.user.firstname }}<br>
|
|
<b>lastname</b> = {{ app.user.lastname }}<br>
|
|
<b>email</b> = {{ app.user.email }}<br>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
{% endblock %} |