{% set snippets = sulu_snippet_load_by_area('newsletter') %}
{% set snippetsGT = sulu_snippet_load_by_area('groupe-travail') %}
{% if snippets.content is defined and snippets.content is not empty %}
{% set link = snippets.content.link %}
{% else %}
{% set link = "" %}
{% endif %}
{% if snippetsGT.content is defined and snippetsGT.content is not empty %}
{% set linkGT = snippetsGT.content.link %}
{% else %}
{% set linkGT = "" %}
{% endif %}
<div class="groupe-travail team-button">
<a href="{{ linkGT }}" class="br8 cblue nodeco dflex aic lh28 fs18 fw600">
<div class="diflex jcc aic"><img src="/resources/img/groupe-travail.svg" alt="" class="mr-8px filter-white" loading="lazy" width="20" height="20"></div>Groupes de travail</a>
</div>
<div class="newsletter">
<a href="{{ link }}" target="_blank" class="br8 cwhite nodeco dflex aic lh28 fs18 fw600">
<div class="diflex jcc aic"><img src="/resources/img/newsletter-icon.svg" width="16" height="12" alt="" loading="lazy"></div>Newsletter</a>
</div>
<hr class="newsletter-hr">
{% if app.user %}
{% if app.user.contact.avatar.id is defined and app.user.contact.avatar.id is not empty %}
{% set avatar = sulu_resolve_media(app.user.contact.avatar.id, 'fr') %}
<a href="{{ path('sulu_community.profile') }}" class="nodeco dflex aic img-container profile">
<img src="{{ avatar.formats['sulu-260x.webp'] }}" title="Cliquez pour accéder à votre profil" width="{{ avatar.fileVersion.properties.width }}" height="{{ avatar.fileVersion.properties.height }}" loading="lazy">
</a>
{% else %}
<a href="{{ path('sulu_community.profile') }}" class="nodeco dflex aic">
<div class="user-initials dflex aic jcc cwhite">
{{ app.user.contact.lastName|first|upper }}
{{ app.user.contact.firstName|first|upper }}
</div>
</a>
{% endif %}
{% else %}
<div class="user-menu dflex aic login-button">
<div class="user-icon not-visible-mobile dropdown-button cwhite dflex aic fs18 fw600 lh28" tabindex="0">
<img src="/resources/img/user-icon.svg" width="14" height="15" alt="Connexion" loading="lazy">Connexion
</div>
<div class="main-nav-links dropdown-element">
<a href="{{ path('sulu_community.login') }}" class="nodeco fw400 fs14 cblue dflex menu-link">
<img src="/resources/img/connection-icon.svg" width="16" height="16" alt="Se connecter" loading="lazy">
<div>Me connecter</div>
</a>
<a href="{{ path('sulu_community.registration') }}" class="nodeco fw400 fs14 cblue dflex menu-link">
<img src="/resources/img/inscriription-icon.svg" width="16" height="18" alt="S'inscrire" loading="lazy">
<div>M'inscrire</div>
</a>
</div>
<div class="dflex aic jcc mobile-user-icon bgorange visible-mobile-flex">
<img src="/resources/img/mobile-user-icon.svg" width="14" height="15" alt="Mobile" loading="lazy">
</div>
</div>
{% endif %}