MediaWiki:Common.js: различия между версиями
Pok (обсуждение | вклад) мНет описания правки |
Pok (обсуждение | вклад) мНет описания правки |
||
| Строка 25: | Строка 25: | ||
{ key: 'dark', label: 'Чёрная тема' } | { key: 'dark', label: 'Чёрная тема' } | ||
]; | ]; | ||
const $heading = $('<div>', { class: 'theme- | const $heading = $('<div>', { class: 'theme-menu__heading', text: 'Тема' }); | ||
const $content = $('<div>', { class: 'theme-window__content' }); | const $content = $('<div>', { id: 'theme-preferences__content', class: 'theme-window__content' }); | ||
const $list = $('<ul>', { class: 'theme-menu__content-list' }); | const $list = $('<ul>', { class: 'theme-menu__content-list' }); | ||
const $item = $('<li>', { class: 'mw-list-item mw-list-item-js' }); | const $item = $('<li>', { class: 'mw-list-item mw-list-item-js' }); | ||
| Строка 64: | Строка 64: | ||
const $dropdown = $('<div>', { class: 'theme-dropdown' }); | const $dropdown = $('<div>', { class: 'theme-dropdown' }); | ||
const $details = $('<details>', { id: 'theme-preferences-details', class: 'theme-dropdown-details' }); | const $details = $('<details>', { id: 'theme-preferences-details', class: 'theme-dropdown-details' }); | ||
const $summary = $('<summary>', { class: 'theme-dropdown-summary' }) | const $summary = $('<summary>', { class: 'theme-dropdown-summary', 'data-tooltip-initialized': 'true' }) | ||
.append($('<span>', { class: 'theme-icon theme-icon-settings' })); | .append($('<span>', { class: 'theme-icon theme-icon-settings' })); | ||
$details.append($summary); | $details.append($summary); | ||
const $window = $('<div>', { id: 'theme-preferences', class: 'theme-window' }).hide(); | const $window = $('<div>', { id: 'theme-preferences', class: 'theme-window' }).hide(); | ||
$ | |||
const $header = $('<div>', { id: 'theme-preferences__header', class: 'theme-window__header', text: 'Параметры' }); | |||
$window.append($header); | |||
initThemeMenu($window, currentTheme); | initThemeMenu($window, currentTheme); | ||