mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-24 07:43:47 +00:00
[Refactor] Rename Portal component to MainMenuGroup
The Portal component is only ever used inside the MainMenu component Change-Id: I3a3c58b11416f28c58f02a8bdfdacfbb7df6de9b
This commit is contained in:
parent
27bb20e37d
commit
769818514d
|
@ -10,17 +10,10 @@
|
|||
}}
|
||||
<div class="vector-main-menu-container {{^data-toc}}vector-sidebar-container-no-toc{{/data-toc}}">
|
||||
<div id="mw-navigation">
|
||||
{{#data-portlets-main-menu}}
|
||||
<nav id="mw-panel" class="vector-main-menu" aria-label="{{msg-vector-site-nav-label}}" role="navigation">
|
||||
{{#data-portlets-first}}{{>Portal}}{{/data-portlets-first}}
|
||||
{{#data-main-menu-action}}{{>MainMenuAction}}{{/data-main-menu-action}}
|
||||
{{#array-portlets-rest}}{{>Portal}}{{/array-portlets-rest}}
|
||||
{{^is-language-in-content}}
|
||||
{{#data-portlets.data-languages}}{{>Portal}}{{/data-portlets.data-languages}}
|
||||
{{/is-language-in-content}}
|
||||
{{! T295555 Add language switch alert message temporarily (to be removed). }}
|
||||
{{#data-vector-language-switch-alert}}{{>MainMenuAction}}{{/data-vector-language-switch-alert}}
|
||||
{{#data-portlets-main-menu}}
|
||||
{{>MainMenuContents}}
|
||||
{{/data-portlets-main-menu}}
|
||||
</nav>
|
||||
{{/data-portlets-main-menu}}
|
||||
</div>
|
||||
</div>
|
||||
|
|
10
includes/templates/MainMenuContents.mustache
Normal file
10
includes/templates/MainMenuContents.mustache
Normal file
|
@ -0,0 +1,10 @@
|
|||
<div class="vector-main-menu-contents">
|
||||
{{#data-portlets-first}}{{>MainMenuGroup}}{{/data-portlets-first}}
|
||||
{{#data-main-menu-action}}{{>MainMenuAction}}{{/data-main-menu-action}}
|
||||
{{#array-portlets-rest}}{{>MainMenuGroup}}{{/array-portlets-rest}}
|
||||
{{^is-language-in-content}}
|
||||
{{#data-portlets.data-languages}}{{>MainMenuGroup}}{{/data-portlets.data-languages}}
|
||||
{{/is-language-in-content}}
|
||||
{{! T295555 Add language switch alert message. }}
|
||||
{{#data-vector-language-switch-alert}}{{>MainMenuAction}}{{/data-vector-language-switch-alert}}
|
||||
</div>
|
|
@ -1,7 +1,7 @@
|
|||
{{!
|
||||
See @typedef MenuDefinition
|
||||
}}
|
||||
<div id="{{id}}" class="vector-menu vector-menu-portal portal{{#class}} {{.}}{{/class}}" {{{html-tooltip}}} {{{html-user-language-attributes}}}>
|
||||
<div id="{{id}}" class="vector-main-menu-group vector-menu vector-menu-portal portal{{#class}} {{.}}{{/class}}" {{{html-tooltip}}} {{{html-user-language-attributes}}}>
|
||||
<div
|
||||
id="{{id}}-label"
|
||||
class="vector-menu-heading{{#heading-class}} {{.}}{{/heading-class}}"
|
|
@ -1,7 +1,9 @@
|
|||
@import '../../common/variables.less';
|
||||
@import 'mediawiki.mixins.less';
|
||||
|
||||
.vector-menu-portal {
|
||||
// FIXME: Remove .vector-menu-portal when cache has cleared
|
||||
.vector-menu-portal,
|
||||
.vector-main-menu-group {
|
||||
margin: 0 @margin-end-portal 0 @margin-start-portal;
|
||||
padding: 0.25em 0;
|
||||
direction: ltr;
|
|
@ -21,7 +21,7 @@
|
|||
@import './components/Menu.less';
|
||||
@import './components/Dropdown.less';
|
||||
@import './components/MenuTabs.less';
|
||||
@import './components/MenuPortal.less';
|
||||
@import './components/MainMenuGroup.less';
|
||||
@import './components/PageTitlebar.less';
|
||||
@import './components/PageToolbar.less';
|
||||
@import './components/PageTools.less';
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import mustache from 'mustache';
|
||||
import { vectorMenuTemplate as portalTemplate } from './MenuDropdown.stories.data';
|
||||
import '../resources/skins.vector.styles/MenuPortal.less';
|
||||
import { placeholder, htmlUserLanguageAttributes, portletAfter } from './utils';
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import mustache from 'mustache';
|
||||
import '../resources/skins.vector.styles/MainMenu.less';
|
||||
import '../resources/skins.vector.styles/SidebarLogo.less';
|
||||
import '../resources/skins.vector.styles/MenuPortal.less';
|
||||
|
||||
import { sidebarTemplate,
|
||||
sidebarLegacyTemplate, SIDEBAR_DATA, SIDEBAR_TEMPLATE_PARTIALS } from './Sidebar.stories.data';
|
||||
|
|
Loading…
Reference in a new issue