Dantes (обсуждение | вклад) Нет описания правки |
Dantes (обсуждение | вклад) Нет описания правки |
||
| Строка 1: | Строка 1: | ||
/* Лого сайта Shegare */ | |||
document.querySelector('.citizen-header__logo').innerHTML = ` | |||
<div class="logo1"> | |||
<a href="https://spacestories.club/index.php?title=Заглавная_страница" | |||
class="mw-logo citizen-header__button" | |||
title="Перейти на заглавную страницу"> | |||
<img class="mw-logo-icon" src="/resources/assets/logo.png" | |||
alt="Logo" aria-hidden="true" height="32" width="32"/> | |||
</a> | |||
</div> | |||
<div class="logo2"> | |||
<a href="https://spacestories.club/index.php?title=Colonial_Marines" | |||
class="mw-logo citizen-header__button" | |||
title="Перейти на заглавную страницу CM"> | |||
<img class="mw-logo-icon" src="/images/0/0d/CMlog.png" | |||
alt="CM Logo" aria-hidden="true" height="32" width="32"/> | |||
</a> | |||
</div> | |||
`; | |||
/* Перенос page-info в конец footer-places */ | |||
const pageInfo = document.querySelector('.page-info'); | |||
if (pageInfo) { | |||
document.querySelector('#footer-places').insertAdjacentHTML('afterEnd', pageInfo.innerHTML); | |||
pageInfo.innerHTML = null; | |||
} | |||
/* Begin логика цвета через headerColor Shegare */ | |||
const headerColor = document.querySelector('.headerColor'); | |||
if (headerColor) { | |||
const [colorBorder, colorBtn] = headerColor.innerText.split('|'); | |||
function headerRender(colorBorder, colorBtn) { | |||
document.querySelectorAll('h1, h2, h3 , h4, h5').forEach(header => { | |||
document. | if (header.classList.contains('citizen-section-heading')) { | ||
const indicator = header.querySelector('.citizen-sections-enabled, .citizen-section-indicator'); | |||
indicator.style.background = `rgb(${colorBtn})`; | |||
indicator.style.boxShadow = `0 0 20px 0px rgb(${colorBtn} / 20%)`; | |||
const headline = header.querySelector('.mw-headline'); | |||
headline.style.borderImage = `linear-gradient(to right top, ${colorBorder})`; | |||
headline.style.borderImageSlice = '1'; | |||
} else if (header.classList.contains('citizen-section-heading--collapsed')) { | |||
const collapsedIndicator = header.querySelector('.citizen-section-indicator'); | |||
collapsedIndicator.style.background = 'black'; | |||
collapsedIndicator.style.boxShadow = 'unset'; | |||
} | |||
}); | |||
} | |||
headerRender(colorBorder, colorBtn); | |||
document.body.addEventListener('click', () => headerRender(colorBorder, colorBtn)); | |||
} | } | ||
/* End логика цвета через headerColor Shegare */ | |||
/* Begin sidebar для ролей Shegare */ | |||
const jobsTableContainer = document.querySelector('.JobsTableContainer'); | |||
if (jobsTableContainer) { | |||
if (window.innerWidth >= 1440) { | |||
document.querySelector('#content').insertAdjacentHTML('afterbegin', jobsTableContainer.innerHTML); | |||
document.querySelector('.JobsTableContainer').id = 'IdJobsTableContainer2'; | |||
document.querySelector('#content').style.display = 'flex'; | |||
document.querySelector('#bodyContent').style.minHeight = '1350px'; | |||
} else { | |||
document.querySelector('#content').style.display = 'unset'; | |||
} | |||
} | } | ||
/* End | /* End sidebar для ролей Shegare */ | ||
Shegare */ | |||
document.querySelectorAll('.citizen-table-wrapper').forEach(function(wrapper) { | document.querySelectorAll('.citizen-table-wrapper').forEach(function(wrapper) { | ||
if (wrapper.querySelector('.job_gear')) { | if (wrapper.querySelector('.job_gear')) { | ||
| Строка 93: | Строка 86: | ||
} | } | ||
}); | }); | ||
Версия от 09:36, 29 сентября 2024
/* Лого сайта Shegare */
document.querySelector('.citizen-header__logo').innerHTML = `
<div class="logo1">
<a href="https://spacestories.club/index.php?title=Заглавная_страница"
class="mw-logo citizen-header__button"
title="Перейти на заглавную страницу">
<img class="mw-logo-icon" src="/resources/assets/logo.png"
alt="Logo" aria-hidden="true" height="32" width="32"/>
</a>
</div>
<div class="logo2">
<a href="https://spacestories.club/index.php?title=Colonial_Marines"
class="mw-logo citizen-header__button"
title="Перейти на заглавную страницу CM">
<img class="mw-logo-icon" src="/images/0/0d/CMlog.png"
alt="CM Logo" aria-hidden="true" height="32" width="32"/>
</a>
</div>
`;
/* Перенос page-info в конец footer-places */
const pageInfo = document.querySelector('.page-info');
if (pageInfo) {
document.querySelector('#footer-places').insertAdjacentHTML('afterEnd', pageInfo.innerHTML);
pageInfo.innerHTML = null;
}
/* Begin логика цвета через headerColor Shegare */
const headerColor = document.querySelector('.headerColor');
if (headerColor) {
const [colorBorder, colorBtn] = headerColor.innerText.split('|');
function headerRender(colorBorder, colorBtn) {
document.querySelectorAll('h1, h2, h3 , h4, h5').forEach(header => {
if (header.classList.contains('citizen-section-heading')) {
const indicator = header.querySelector('.citizen-sections-enabled, .citizen-section-indicator');
indicator.style.background = `rgb(${colorBtn})`;
indicator.style.boxShadow = `0 0 20px 0px rgb(${colorBtn} / 20%)`;
const headline = header.querySelector('.mw-headline');
headline.style.borderImage = `linear-gradient(to right top, ${colorBorder})`;
headline.style.borderImageSlice = '1';
} else if (header.classList.contains('citizen-section-heading--collapsed')) {
const collapsedIndicator = header.querySelector('.citizen-section-indicator');
collapsedIndicator.style.background = 'black';
collapsedIndicator.style.boxShadow = 'unset';
}
});
}
headerRender(colorBorder, colorBtn);
document.body.addEventListener('click', () => headerRender(colorBorder, colorBtn));
}
/* End логика цвета через headerColor Shegare */
/* Begin sidebar для ролей Shegare */
const jobsTableContainer = document.querySelector('.JobsTableContainer');
if (jobsTableContainer) {
if (window.innerWidth >= 1440) {
document.querySelector('#content').insertAdjacentHTML('afterbegin', jobsTableContainer.innerHTML);
document.querySelector('.JobsTableContainer').id = 'IdJobsTableContainer2';
document.querySelector('#content').style.display = 'flex';
document.querySelector('#bodyContent').style.minHeight = '1350px';
} else {
document.querySelector('#content').style.display = 'unset';
}
}
/* End sidebar для ролей Shegare */
document.querySelectorAll('.citizen-table-wrapper').forEach(function(wrapper) {
if (wrapper.querySelector('.job_gear')) {
wrapper.style.overflowX = 'unset'; // Применяем стиль
}
});
// Для поиска и применения стилей к .citizen-overflow--right
document.querySelectorAll('.citizen-overflow--right').forEach(function(overflowRight) {
if (overflowRight.querySelector('.job_gear')) {
overflowRight.style.webkitMaskImage = 'unset'; // Для WebKit браузеров (Safari)
overflowRight.style.maskImage = 'unset'; // Для остальных браузеров
}
});