mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-24 15:53:46 +00:00
6efcf775c0
Follow up to 49c8b5f514
Our PHP parser resolves >Menu to the parent directory which
differs from the frontend Mustache library.
Best to have different names for these files to avoid this problem.
Bug: T311319
Change-Id: Iea708718a0b928c4902dc7bac0c5ee304b89f961
53 lines
1.4 KiB
JavaScript
53 lines
1.4 KiB
JavaScript
import sidebarTemplate from '!!raw-loader!../includes/templates/Sidebar.mustache';
|
|
import sidebarLegacyTemplate from '!!raw-loader!../includes/templates/LegacySidebar.mustache';
|
|
import { vectorMenuTemplate } from './MenuDropdown.stories.data';
|
|
import { PORTALS } from './MenuPortal.stories.data';
|
|
|
|
const SIDEBAR_BEFORE_OUTPUT_HOOKINFO = `Beware: Portals can be added, removed or reordered using
|
|
SidebarBeforeOutput hook as in this example.`;
|
|
|
|
export { sidebarTemplate, sidebarLegacyTemplate };
|
|
|
|
export const SIDEBAR_TEMPLATE_PARTIALS = {
|
|
Menu: vectorMenuTemplate
|
|
};
|
|
|
|
export const OPT_OUT_DATA = {
|
|
'data-emphasized-sidebar-action': {
|
|
href: '#',
|
|
'msg-vector-opt-out': 'Switch to old look',
|
|
'msg-vector-opt-out-tooltip': 'Change your settings to go back to the old look of the skin (legacy Vector)'
|
|
}
|
|
};
|
|
|
|
export const SIDEBAR_DATA = {
|
|
withNoPortals: {
|
|
'array-portlets-rest': []
|
|
},
|
|
withPortals: {
|
|
'data-portlets-first': PORTALS.navigation,
|
|
'array-portlets-rest': [
|
|
PORTALS.toolbox,
|
|
PORTALS.otherProjects
|
|
],
|
|
'data-portals-languages': PORTALS.langlinks
|
|
},
|
|
withoutLogo: {
|
|
'data-portals-languages': PORTALS.langlinks,
|
|
'array-portals-first': PORTALS.navigation,
|
|
'array-portlets-rest': [
|
|
PORTALS.toolbox,
|
|
PORTALS.otherProjects
|
|
]
|
|
},
|
|
thirdParty: {
|
|
'array-portlets-rest': [
|
|
PORTALS.toolbox,
|
|
PORTALS.navigation,
|
|
{
|
|
'html-portal-content': SIDEBAR_BEFORE_OUTPUT_HOOKINFO
|
|
}
|
|
]
|
|
}
|
|
};
|