import mustache from 'mustache'; import { htmluserlangattributes } from './utils'; import skinTemplate from '!!raw-loader!../includes/templates/index.mustache'; import { placeholder } from './utils'; import '../resources/skins.vector.styles/index.less'; import { NAVIGATION_TEMPLATE_DATA, navTemplate, NAVIGATION_TEMPLATE_PARTIALS } from './Navigation.stories.data'; import { FOOTER_TEMPLATE_DATA, footerTemplate } from './Footer.stories.data'; const TEMPLATE_PARTIALS = Object.assign( {}, NAVIGATION_TEMPLATE_PARTIALS, { Navigation: navTemplate, Footer: footerTemplate } ); export default { title: 'Skin' }; const HTML_INDICATORS = `
`; export const vector2019LoggedOut = () => mustache.render( skinTemplate, { 'html-title': 'Vector 2019', 'page-isarticle': true, 'msg-tagline': 'From Wikipedia, the free encyclopedia', 'html-userlangattributes': htmluserlangattributes, 'msg-jumptonavigation': 'Jump to navigation', 'msg-jumptosearch': 'Jump to search', 'data-navigation': NAVIGATION_TEMPLATE_DATA.loggedOutWithVariants, // site specific 'data-footer': FOOTER_TEMPLATE_DATA, 'html-sitenotice': placeholder( 'a site notice or central notice banner may go here', 70 ), // article dependent 'html-bodycontent': placeholder( 'Article content goes here' ), 'html-printfooter': `Retrieved from ‘https://en.wikipedia.org/w/index.php?title=this&oldid=blah’`, 'html-catlinks': placeholder( 'Category links component from mediawiki core', 50 ), // extension dependent.. 'html-hook-vector-before-footer': placeholder( 'VectorBeforeFooter hook output', 100 ), 'html-dataAfterContent': placeholder( 'Extensions can add here e.g. Related Articles.', 100 ), 'html-indicators': HTML_INDICATORS, 'html-subtitle': placeholder( 'Extensions can configure subtitle', 20 ) }, TEMPLATE_PARTIALS ); export const vector2019LoggedIn = () => mustache.render( skinTemplate, { 'html-title': 'Vector 2019', 'page-isarticle': true, 'msg-tagline': 'From Wikipedia, the free encyclopedia', 'html-userlangattributes': htmluserlangattributes, 'msg-jumptonavigation': 'Jump to navigation', 'msg-jumptosearch': 'Jump to search', 'data-navigation': NAVIGATION_TEMPLATE_DATA.loggedInWithMoreActions, // site specific 'data-footer': FOOTER_TEMPLATE_DATA, 'html-sitenotice': placeholder( 'a site notice or central notice banner may go here', 70 ), // article dependent 'html-bodycontent': placeholder( 'Article content goes here' ), 'html-printfooter': `Retrieved from ‘https://en.wikipedia.org/w/index.php?title=this&oldid=blah’`, 'html-catlinks': placeholder( 'Category links component from mediawiki core', 50 ) }, TEMPLATE_PARTIALS );