Website/app/frontend/templates/components/BurgerMenu/User.html.twig
Snoweuph 983cbb8f3b
Some checks failed
Quality Check / QS Backend (push) Successful in 20s
Quality Check / QS Frontend (push) Failing after 36s
Quality Check / QS Mixed (push) Successful in 34s
Use Symfony UX Twig
2024-07-21 13:55:15 +02:00

25 lines
886 B
Twig

{% props logged_in = false %}
<div class="burger-menu-user">
<div class="burger-menu-user__picture-wrapper">
<twig:ux:icon name="ph:user-circle-fill" class="burger-menu-user__icon-full"/>
</div>
{% if logged_in %}
<span class="burger-menu-user__name">Username</span>
<span class="burger-menu-user__email">username@email.com</span>
<div class="burger-menu-user__actions">
{{ _self.user_action('Profile', 'user') }}
{{ _self.user_action('Settings', 'gear') }}
{{ _self.user_action('Logout', 'sign-out') }}
</div>
{% else %}
<span class="burger-menu-user__info">not logged in</span>
{% endif %}
</div>
{% macro user_action(name, icon) %}
<button>
<twig:ux:icon name="ph:{{ icon }}" class="burger-menu__icon"/>
<span>{{ name }}</span>
</button>
{% endmacro %}