mediawiki-skins-Citizen/templates/UserMenu.mustache
alistair3149 516ef3a1cb
feat(dropdown): revamp dropdown menu handling
Putting the dropdown content in the details elemenet have been inconsistent.
Transition are not working correctly and different browsers are not handling it well.
Furthermore, the previous implementation does not allow an always visible state of dropdown content.

Fixes: #882
2024-07-03 16:07:19 -04:00

19 lines
795 B
Plaintext

{{!
string msg-citizen-usermenu-toggle The label used by the user menu button.
}}
<div class="citizen-userMenu citizen-header__item citizen-dropdown">
<details class="citizen-dropdown-details">
<summary
class="citizen-dropdown-summary"
title="{{msg-citizen-usermenu-toggle}}"
aria-details="citizen-userMenu__card">
<span class="citizen-ui-icon mw-ui-icon-wikimedia-userAvatar"></span>
<span>{{msg-citizen-usermenu-toggle}}</span>
</summary>
</details>
<div id="citizen-userMenu__card" class="citizen-menu__card">
{{#data-user-info}}{{>UserInfo}}{{/data-user-info}}
{{#data-portlets.data-user-interface-preferences}}{{>Menu}}{{/data-portlets.data-user-interface-preferences}}
{{#data-portlets.data-user-menu}}{{>Menu}}{{/data-portlets.data-user-menu}}
</div>
</div>