mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-16 18:58:45 +00:00
55189058be
- Remove usage/references to MinervaTemplate::getHistoryLinkHtml, html-minerva-lastmodified - Add data key for history.mustache template. - Update footer template to use new data key. Bug: T292554 Change-Id: Id5fbf61ba181a0088a25e77175b808362963c63b
53 lines
1.4 KiB
JavaScript
53 lines
1.4 KiB
JavaScript
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 <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': [
|
|
{
|
|
id: 'places',
|
|
'array-items': [
|
|
{
|
|
id: 'terms-use',
|
|
html: '<a href="#">Terms of Use</a>'
|
|
},
|
|
{
|
|
id: 'privacy',
|
|
html: '<a href="#">Privacy</a>'
|
|
},
|
|
{
|
|
id: 'desktop-toggle',
|
|
html: '<a href="#">Desktop</a>'
|
|
}
|
|
]
|
|
}
|
|
]
|
|
};
|
|
|
|
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
|
|
} );
|