mediawiki-skins-MinervaNeue/stories/footer.stories.js
Nicholas Ray 6df49e3da4 Add alt attribute to logo
* Adds alt attribute with a value of the `mobile-frontend-sitename`
(previously called `mobile-frontend-footer-sitename`). The message was
changed because this affects both the footer and the header's logo.

* Adds a `minerva-footer-logo` class to the logo in footer.mustache in
preparation for changing that element from an h2 to a div. Given caching
issues (old CSS with new HTML; new CSS with old HTML are both
possibilities), we need to do this in two separate deploy cycles.

Bug: T288362
Change-Id: I3ecbf8fdcae72a0ded7f60c559259f312b8ef15d
2021-09-22 02:01:42 +00:00

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, {
'html-minerva-lastmodified': lastModifiedBar()
} )
} );
export const footerRecentEdit = () =>
mustache.render( template, {
'data-footer': Object.assign( FOOTER_TEMPLATE_DATA, {
'html-minerva-lastmodified': lastModifiedBarActive()
} )
}, {
footerItemList,
Logo
} );