2020-01-20 23:19:04 +00:00
|
|
|
import mustache from 'mustache';
|
2020-05-01 01:16:53 +00:00
|
|
|
import template from '!!raw-loader!../includes/Skins/footer.mustache';
|
2021-07-16 15:41:07 +00:00
|
|
|
import Logo from '!!raw-loader!../includes/Skins/Logo.mustache';
|
|
|
|
import footerItemList from '!!raw-loader!../includes/Skins/footerItemList.mustache';
|
2020-01-20 23:19:04 +00:00
|
|
|
import { lastModifiedBar, lastModifiedBarActive } from './lastModifiedBar.stories';
|
|
|
|
import { placeholder } from './utils';
|
|
|
|
|
|
|
|
export default {
|
|
|
|
title: 'Footer'
|
|
|
|
};
|
|
|
|
|
|
|
|
const FOOTER_TEMPLATE_DATA = {
|
2021-09-22 00:37:26 +00:00
|
|
|
'msg-mobile-frontend-sitename': 'Site title OR Logo',
|
2021-07-16 15:41:07 +00:00
|
|
|
'html-minerva-license': 'Content is available under <a rel="nofollow" href="#">Reading Web 3.0 License</a> unless otherwise noted.',
|
|
|
|
'html-after-content': placeholder( 'Extensions can add here e.g. Related Articles.' ),
|
|
|
|
'data-places': [
|
2020-01-20 23:19:04 +00:00
|
|
|
{
|
2021-07-16 15:41:07 +00:00
|
|
|
id: 'places',
|
|
|
|
'array-items': [
|
2020-01-20 23:19:04 +00:00
|
|
|
{
|
2021-07-16 15:41:07 +00:00
|
|
|
id: 'terms-use',
|
|
|
|
html: '<a href="#">Terms of Use</a>'
|
2020-01-20 23:19:04 +00:00
|
|
|
},
|
|
|
|
{
|
2021-07-16 15:41:07 +00:00
|
|
|
id: 'privacy',
|
|
|
|
html: '<a href="#">Privacy</a>'
|
2020-01-20 23:19:04 +00:00
|
|
|
},
|
|
|
|
{
|
2021-07-16 15:41:07 +00:00
|
|
|
id: 'desktop-toggle',
|
|
|
|
html: '<a href="#">Desktop</a>'
|
2020-01-20 23:19:04 +00:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
};
|
|
|
|
|
|
|
|
export const footer = () =>
|
2021-07-16 15:41:07 +00:00
|
|
|
mustache.render( template, {
|
|
|
|
'data-footer': Object.assign( FOOTER_TEMPLATE_DATA, {
|
2021-10-29 19:47:02 +00:00
|
|
|
'data-minerva-history-link': lastModifiedBar()
|
2021-07-16 15:41:07 +00:00
|
|
|
} )
|
|
|
|
} );
|
2020-01-20 23:19:04 +00:00
|
|
|
|
|
|
|
export const footerRecentEdit = () =>
|
2021-07-16 15:41:07 +00:00
|
|
|
mustache.render( template, {
|
|
|
|
'data-footer': Object.assign( FOOTER_TEMPLATE_DATA, {
|
2021-10-29 19:47:02 +00:00
|
|
|
'data-minerva-history-link': lastModifiedBarActive()
|
2021-07-16 15:41:07 +00:00
|
|
|
} )
|
|
|
|
}, {
|
|
|
|
footerItemList,
|
|
|
|
Logo
|
|
|
|
} );
|