Website/app/frontend/templates/components/BurgerMenu/Index.html.twig
Snoweuph d0ec79fd71
Some checks failed
Quality Check / QS Frontend (push) Failing after 13s
Quality Check / QS Mixed (push) Failing after 11s
Quality Check / QS Backend (push) Successful in 14s
Use Symfony UX Twig
2024-07-21 12:53:00 +02:00

49 lines
1.3 KiB
Twig

{% set logged_in = true %}
<button
class="burger-menu__button-open"
>
<twig:ux:icon name="ph:list" />
</button>
<div
class="burger-menu"
tabindex="-1"
>
<button
class="burger-menu__button-close"
>
<twig:ux:icon name="ph:x" />
</button>
<div class="burger-menu__user-section">
<div class="burger-menu__user-picture-wrapper">
<twig:ux:icon name="ph:user-circle-fill" />
</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-fill') }}
{{ _self.user_action('Settings', 'gear-fill') }}
{{ _self.user_action('Logout', 'sign-out') }}
</div>
{% else %}
<span class="burger-menu__user-info">not logged in</span>
{% endif %}
</div>
{% if not logged_in %}
<hr/>
<a class="burger-menu__login">
<span>Login with Euphcloud</span>
</a>
{% endif %}
<hr/>
<twig:BurgerMenu:Nav/>
</div>
{% macro user_action(name, icon) %}
<button>
<twig:ux:icon name="ph:{{ icon }}" />
<span>{{ name }}</span>
</button>
{% endmacro %}