mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-05 14:22:56 +00:00
698752e38a
Moving all the templateParser calls to one function so its easier to see how the template is composed. The diff of changes to the stories folder highlight the internal changes which are: * html-portals replaced with html-sidebar in main template * new Sidebar template added which outputs to html-sidebar * Mention of "MainMenu" replaced with better understood "Sidebar" This is precursory work to adopt templatePartials Change-Id: I6b2196e39087f818e774d04b2d1b9ab8cb8816a1
37 lines
1.4 KiB
JavaScript
37 lines
1.4 KiB
JavaScript
import mustache from 'mustache';
|
|
import navTemplate from '!!raw-loader!../includes/templates/Navigation.mustache';
|
|
import '../.storybook/common.less';
|
|
import '../resources/skins.vector.styles/navigation.less';
|
|
|
|
import { loggedOut, loggedInWithEcho } from './personalNavigation.stories';
|
|
import { viewTabs, namespaceTabs } from './tabs.stories';
|
|
import { more, variants } from './menu.stories';
|
|
import { simpleSearch } from './searchBox.stories';
|
|
import { sidebarWithPortals } from './sidebar.stories';
|
|
|
|
export default {
|
|
title: 'Navigation (Header + Sidebar)'
|
|
};
|
|
|
|
export const navigationLoggedOutWithVariants = () => mustache.render( navTemplate,
|
|
{
|
|
'html-personalmenu': loggedOut(),
|
|
'html-navigation-left-tabs': namespaceTabs() + variants(),
|
|
'html-navigation-right-tabs': `${viewTabs()} ${simpleSearch()}`,
|
|
'html-sidebar': sidebarWithPortals(),
|
|
'html-navigation-heading': 'Navigation menu',
|
|
'html-logo-attributes': `class="mw-wiki-logo" href="/wiki/Main_Page" title="Visit the main page"`
|
|
}
|
|
);
|
|
|
|
export const navigationLoggedInWithMore = () => mustache.render( navTemplate,
|
|
{
|
|
'html-personalmenu': loggedInWithEcho(),
|
|
'html-navigation-left-tabs': namespaceTabs(),
|
|
'html-navigation-right-tabs': `${viewTabs()} ${more()} ${simpleSearch()}`,
|
|
'html-sidebar': sidebarWithPortals(),
|
|
'html-navigation-heading': 'Navigation menu',
|
|
'html-logo-attributes': `class="mw-wiki-logo" href="/wiki/Main_Page" title="Visit the main page"`
|
|
}
|
|
);
|