2021-08-30 22:44:00 +00:00
|
|
|
import template from '!!raw-loader!../includes/templates/StickyHeader.mustache';
|
2021-09-07 20:22:19 +00:00
|
|
|
import Button from '!!raw-loader!../includes/templates/Button.mustache';
|
2021-09-16 19:27:10 +00:00
|
|
|
import { searchBoxData } from './SearchBox.stories.data';
|
2021-08-30 22:44:00 +00:00
|
|
|
|
|
|
|
const NO_ICON = {
|
|
|
|
icon: 'none',
|
2021-09-07 20:22:19 +00:00
|
|
|
'is-quiet': true,
|
2021-08-30 22:44:00 +00:00
|
|
|
class: 'sticky-header-icon'
|
|
|
|
};
|
|
|
|
|
2021-09-16 19:27:10 +00:00
|
|
|
const TALK_ICON = {
|
|
|
|
icon: 'none',
|
|
|
|
'is-quiet': true,
|
|
|
|
class: 'sticky-header-icon mw-ui-icon-wikimedia-speechBubbles'
|
|
|
|
};
|
|
|
|
|
|
|
|
const HISTORY_ICON = {
|
|
|
|
icon: 'none',
|
|
|
|
'is-quiet': true,
|
|
|
|
class: 'sticky-header-icon mw-ui-icon-wikimedia-history'
|
|
|
|
};
|
|
|
|
|
2021-08-30 22:44:00 +00:00
|
|
|
const data = {
|
|
|
|
title: 'Audre Lorde',
|
|
|
|
heading: 'Introduction',
|
2023-01-30 15:33:57 +00:00
|
|
|
'data-buttons': [ {
|
2021-09-07 20:22:19 +00:00
|
|
|
id: 'p-lang-btn-sticky-header',
|
|
|
|
class: 'mw-interlanguage-selector',
|
|
|
|
'is-quiet': true,
|
|
|
|
label: '196 languages',
|
|
|
|
'html-vector-button-icon': `<span class="mw-ui-icon mw-ui-icon-wikimedia-language"></span>`
|
2023-01-30 15:33:57 +00:00
|
|
|
} ],
|
2021-09-16 19:27:10 +00:00
|
|
|
'data-search': searchBoxData,
|
2021-09-09 21:40:06 +00:00
|
|
|
'data-button-start': {
|
|
|
|
icon: 'wikimedia-search',
|
2021-09-16 19:27:10 +00:00
|
|
|
class: 'vector-sticky-header-search-toggle',
|
2021-09-09 21:40:06 +00:00
|
|
|
'is-quiet': true,
|
|
|
|
label: 'Search'
|
|
|
|
},
|
2021-09-07 20:22:19 +00:00
|
|
|
'data-button-end': NO_ICON,
|
2023-01-30 15:33:57 +00:00
|
|
|
'data-icons': [
|
2021-09-16 19:27:10 +00:00
|
|
|
TALK_ICON, HISTORY_ICON, NO_ICON, NO_ICON
|
2021-08-30 22:44:00 +00:00
|
|
|
]
|
|
|
|
};
|
|
|
|
|
|
|
|
export const STICKY_HEADER_TEMPLATE_PARTIALS = {
|
2021-09-07 20:22:19 +00:00
|
|
|
Button
|
2021-08-30 22:44:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
export { template, data };
|