import mustache from 'mustache';
import template from '!!raw-loader!../includes/Skins/footer.mustache';
import Logo from '!!raw-loader!../includes/Skins/Logo.mustache';
import footerItemList from '!!raw-loader!../includes/Skins/footerItemList.mustache';
import { lastModifiedBar, lastModifiedBarActive } from './lastModifiedBar.stories';
import { placeholder } from './utils';
export default {
title: 'Footer'
};
const FOOTER_TEMPLATE_DATA = {
'msg-mobile-frontend-sitename': 'Site title OR Logo',
'html-minerva-license': 'Content is available under Reading Web 3.0 License unless otherwise noted.',
'html-after-content': placeholder( 'Extensions can add here e.g. Related Articles.' ),
'data-places': [
{
id: 'places',
'array-items': [
{
id: 'terms-use',
html: 'Terms of Use'
},
{
id: 'privacy',
html: 'Privacy'
},
{
id: 'desktop-toggle',
html: 'Desktop'
}
]
}
]
};
export const footer = () =>
mustache.render( template, {
'data-footer': Object.assign( FOOTER_TEMPLATE_DATA, {
'data-minerva-history-link': lastModifiedBar()
} )
} );
export const footerRecentEdit = () =>
mustache.render( template, {
'data-footer': Object.assign( FOOTER_TEMPLATE_DATA, {
'data-minerva-history-link': lastModifiedBarActive()
} )
}, {
footerItemList,
Logo
} );