mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-16 02:41:54 +00:00
864a1766a7
This patch refactors the markup and JS associated with the page actions menu in order to achieve greater flexibility in its presentation. The menu items are now positioned via flexbox and rendered using a mustache template in PHP. The goal of this refactor is to accommodate both AMC mode and default mode with the same markup. No changes should be visible for non-AMC users with this refactor. No changes to AMC mode have been made in this patch either. This patch includes temporary workarounds to avoid problems caused by HTML caching. Changes include: - Changing the data structure of the page_actions property in SkinMinerva.php - Passing that modified data structure into a new mustache template, PageActionMenu.mustache - Adding new CSS for the new page actions menu HTML - changing the query selectors in JS to match the new markup - Making the JS-modified page-actions compatible with the new markup - Keeping existing CSS and JS to avoid breaking cached HTML Bug: T213352 Depends-On: I95cf726c4b6d8c3895a26aa6e07f4b1747ee30fe Change-Id: I5a7d73b20617cb3c6d6379084ac4bea23ec3bc74
12 lines
298 B
Plaintext
12 lines
298 B
Plaintext
<nav class="page-actions-menu">
|
|
<ul id="page-actions" class="page-actions-menu__list">
|
|
{{#pageactions}}
|
|
<li class="page-actions-menu__list-item">
|
|
<a id="{{id}}" href="{{href}}" class="{{class}}" role="button" title="{{title}}">
|
|
{{text}}
|
|
</a>
|
|
</li>
|
|
{{/pageactions}}
|
|
</ul>
|
|
</nav>
|