Открыть меню
Переключить меню настроек
Открыть персональное меню
Вы не представились системе
Ваш IP-адрес будет виден всем, если вы внесёте какие-либо изменения.

MediaWiki:Test.css: различия между версиями

Страница интерфейса MediaWiki
Нет описания правки
Метка: отменено
Нет описания правки
 
(не показаны 4 промежуточные версии этого же участника)
Строка 1: Строка 1:
(function() {
@media (max-width: 1280px) {
     var today = new Date();
     .chem-heading {
    var month = today.getMonth() + 1;
         display: none;
    if (month !== 10 && month !== 11) return;
 
    mw.loader.load('/w/index.php?title=MediaWiki:Test.css&action=raw&ctype=text/css');
 
    var config = {
        leavesCount: 50,
        batsCount: 8,
        websCount: 5,
        pumpkinCount: 3,
        leafIcons: ['🍂','🍁','🦇','🕸️'],
        leafSizes: {min: 14, max: 42},
        pumpkinSizes: {min: 24, max: 36},
        batAnimationDuration: {min: 8, max: 14},
         leafAnimationDuration: [8, 10, 12],
        mobileMaxLeaves: 25
    };
 
    function isMobile() {
        return window.innerWidth <= 768;
     }
     }
 
}
    function random(min, max) {
@media screen and (min-width: 1120px) {
         return min + Math.random() * (max - min);
    body.page-Тест .citizen-body-container {
         grid-template-areas: 'void header header' 'sidebar content toc' 'footer footer footer';
        grid-template-columns: 10% 70% 20%;
        margin-left: 8vw;
        max-width: none;
     }
     }
 
}
     function createElement(tag, className, innerHTML) {
.chem-cards-container {
        var el = document.createElement(tag);
    display: grid;
        if (className) el.className = className;
    grid-template-columns: repeat(3, 1fr);
        if (innerHTML) el.innerHTML = innerHTML;
    gap: 20px;
         return el;
    margin: 20px 0;
    width: 100%;
    box-sizing: border-box;
}
.chem-card {
    background-color: #121212;
    border: 3px solid var(--card-border, #444);
    border-radius: 12px;
    padding: 0;
    color: #e0e0e0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    overflow: hidden;
}
.chem-name-header {
    background-color: var(--card-accent);
    color: #ffffff;
    font-size: 22px;
    font-weight: 700;
     padding: 14px 20px;
    text-align: center;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
    margin: 0;
}
.chem-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: rgba(255,255,255,0.06);
    border-top: 1px solid rgba(255,255,255,0.1);
    cursor: pointer;
}
.chem-heading-content {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
}
.heading-text {
    font-size: 15px;
    font-weight: 600;
    color: var(--card-accent, #8cf);
}
.collapse-btn {
    border: 2px dotted #ffd700;
    padding: 2px 12px;
    border-radius: 9999px;
    font-size: 13px;
    color: #ffd700;
    background: rgba(0,0,0,0.3);
}
.collapsible {
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
    max-height: 0;
    padding: 0;
}
.collapsible.expanded {
    max-height: 2000px;
    padding: 12px 16px 16px;
}
.chem-recipe-block {
    text-align: center;
}
.chem-recipe-steps {
    display: flex;
    flex-direction: column;
    gap: 32px;
}
.recipe-variant-header {
    font-size: 15px;
    font-weight: 700;
    color: #ffd700;
    text-align: center;
    padding: 8px 0;
    border-bottom: 1px dashed rgba(255,215,0,0.3);
    margin-bottom: 12px;
}
.chem-recipe {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    gap: 24px;
    align-items: flex-start;
    justify-content: center;
}
.recipe-inputs {
    flex: 1;
    min-width: 240px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(255,255,255,0.06);
    border-radius: 10px;
    padding: 14px;
}
.recipe-outputs {
    flex: 1;
    min-width: 240px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(255,255,255,0.06);
    border-radius: 10px;
    padding: 14px;
}
.recipe-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,0.08);
    border-radius: 6px;
    padding: 8px 14px;
    border-left: 4px solid var(--card-accent, #8cf);
    white-space: nowrap;
}
.chem-beaker {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
}
.recipe-action {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 130px;
    align-self: center;
}
.recipe-action-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}
.action-sprite .chem-beaker {
    width: 46px;
    height: 46px;
}
.action-text {
    font-weight: 700;
    color: #ffd700;
    font-style: italic;
    font-size: 16px;
    line-height: 1.3;
}
.chem-effects .chem-effect-line {
    margin-bottom: 10px;
    font-size: 14px;
    line-height: 1.45;
    padding-left: 4px;
}
.chem-desc {
    margin: 12px 16px;
    padding: 12px;
    background: rgba(255,255,255,0.03);
    border-radius: 6px;
    border-left: 4px solid var(--card-accent, #8cf);
    font-size: 14px;
    color: #aaa;
}
@media (max-width: 1024px) {
    .chem-cards-container {
         grid-template-columns: repeat(2, 1fr);
     }
     }
 
}
    function initLeaves() {
@media (max-width: 768px) {
        var leavesFragment = document.createDocumentFragment();
    .chem-cards-container {
         var count = isMobile() ? config.mobileMaxLeaves : config.leavesCount;
         grid-template-columns: 1fr;
 
        for (var i = 0; i < count; i++) {
            var leaf = createElement('span', 'halloween-leaf', config.leafIcons[Math.floor(Math.random() * config.leafIcons.length)]);
            leaf.style.left = random(0, 100) + '%';
            leaf.style.fontSize = random(config.leafSizes.min, config.leafSizes.max) + 'px';
            leaf.style.opacity = random(0.3, 1);
            leaf.style.animationDuration = config.leafAnimationDuration[i % config.leafAnimationDuration.length] + 's';
            leaf.style.animationDelay = random(0, 10) + 's';
            leavesFragment.appendChild(leaf);
        }
        var leavesContainer = createElement('div', 'halloween-leaves');
        leavesContainer.appendChild(leavesFragment);
        document.body.appendChild(leavesContainer);
     }
     }
 
     .chem-recipe {
     function initPumpkins() {
         flex-direction: column;
         var heading = document.getElementById('firstHeading');
         gap: 18px;
         if (!heading) return;
         max-width: 100%;
 
         for (var i = 0; i < config.pumpkinCount; i++) {
            var pumpkin = createElement('span', 'halloween-pumpkin', '🎃');
            pumpkin.style.margin = '0 2px';
            pumpkin.style.fontSize = random(config.pumpkinSizes.min, config.pumpkinSizes.max) + 'px';
            heading.appendChild(pumpkin);
            floatPumpkin(pumpkin);
        }
     }
     }
 
     .chem-beaker {
     function floatPumpkin(el) {
         width: 32px;
         var pos = 0, dir = 1;
         height: 32px;
        setInterval(function() {
            pos += dir * 0.3;
            if(pos > 5 || pos < 0) dir *= -1;
            el.style.transform = 'translateY(' + pos + 'px)';
         }, 30);
     }
     }
 
     .action-sprite .chem-beaker {
     function initLinks() {
         width: 38px;
        document.body.addEventListener('mouseover', function(e) {
         height: 38px;
            if (e.target.tagName.toLowerCase() === 'a') {
                e.target.style.color = '#ffa500';
                e.target.style.textShadow = '0 0 8px #ffa500, 0 0 15px #ff7518';
            }
         });
         document.body.addEventListener('mouseout', function(e) {
            if (e.target.tagName.toLowerCase() === 'a') {
                e.target.style.color = '';
                e.target.style.textShadow = '';
            }
        });
     }
     }
 
     .recipe-inputs,
     function initBats() {
    .recipe-outputs {
        var batsFragment = document.createDocumentFragment();
        min-width: 100%;
        for (var i = 0; i < config.batsCount; i++) {
            var bat = createElement('div', 'halloween-bat');
            bat.style.top = random(0, 50) + 'vh';
            bat.style.left = (-50 + random(0, 100)) + 'px';
            bat.style.animationDuration = random(config.batAnimationDuration.min, config.batAnimationDuration.max) + 's';
            batsFragment.appendChild(bat);
        }
        document.body.appendChild(batsFragment);
     }
     }
 
}
    function initWebs() {
        var websFragment = document.createDocumentFragment();
        for (var i = 0; i < config.websCount; i++) {
            var web = createElement('div', 'spider-web');
            web.style.top = random(0, 80) + 'vh';
            web.style.left = random(0, 90) + 'vw';
            web.style.transform = 'rotate(' + random(0, 360) + 'deg)';
            websFragment.appendChild(web);
        }
        document.body.appendChild(websFragment);
    }
 
    mw.hook('wikipage.content').add(function() {
        initLeaves();
        initPumpkins();
        initLinks();
        initBats();
        initWebs();
    });
 
})();

Текущая версия от 13:10, 4 апреля 2026

@media (max-width: 1280px) {
    .chem-heading {
        display: none;
    }
}
@media screen and (min-width: 1120px) {
    body.page-Тест .citizen-body-container {
        grid-template-areas: 'void header header' 'sidebar content toc' 'footer footer footer';
        grid-template-columns: 10% 70% 20%;
        margin-left: 8vw;
        max-width: none;
    }
}
.chem-cards-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 20px 0;
    width: 100%;
    box-sizing: border-box;
}
.chem-card {
    background-color: #121212;
    border: 3px solid var(--card-border, #444);
    border-radius: 12px;
    padding: 0;
    color: #e0e0e0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    overflow: hidden;
}
.chem-name-header {
    background-color: var(--card-accent);
    color: #ffffff;
    font-size: 22px;
    font-weight: 700;
    padding: 14px 20px;
    text-align: center;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
    margin: 0;
}
.chem-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: rgba(255,255,255,0.06);
    border-top: 1px solid rgba(255,255,255,0.1);
    cursor: pointer;
}
.chem-heading-content {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
}
.heading-text {
    font-size: 15px;
    font-weight: 600;
    color: var(--card-accent, #8cf);
}
.collapse-btn {
    border: 2px dotted #ffd700;
    padding: 2px 12px;
    border-radius: 9999px;
    font-size: 13px;
    color: #ffd700;
    background: rgba(0,0,0,0.3);
}
.collapsible {
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
    max-height: 0;
    padding: 0;
}
.collapsible.expanded {
    max-height: 2000px;
    padding: 12px 16px 16px;
}
.chem-recipe-block {
    text-align: center;
}
.chem-recipe-steps {
    display: flex;
    flex-direction: column;
    gap: 32px;
}
.recipe-variant-header {
    font-size: 15px;
    font-weight: 700;
    color: #ffd700;
    text-align: center;
    padding: 8px 0;
    border-bottom: 1px dashed rgba(255,215,0,0.3);
    margin-bottom: 12px;
}
.chem-recipe {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    gap: 24px;
    align-items: flex-start;
    justify-content: center;
}
.recipe-inputs {
    flex: 1;
    min-width: 240px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(255,255,255,0.06);
    border-radius: 10px;
    padding: 14px;
}
.recipe-outputs {
    flex: 1;
    min-width: 240px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(255,255,255,0.06);
    border-radius: 10px;
    padding: 14px;
}
.recipe-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,0.08);
    border-radius: 6px;
    padding: 8px 14px;
    border-left: 4px solid var(--card-accent, #8cf);
    white-space: nowrap;
}
.chem-beaker {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
}
.recipe-action {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 130px;
    align-self: center;
}
.recipe-action-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}
.action-sprite .chem-beaker {
    width: 46px;
    height: 46px;
}
.action-text {
    font-weight: 700;
    color: #ffd700;
    font-style: italic;
    font-size: 16px;
    line-height: 1.3;
}
.chem-effects .chem-effect-line {
    margin-bottom: 10px;
    font-size: 14px;
    line-height: 1.45;
    padding-left: 4px;
}
.chem-desc {
    margin: 12px 16px;
    padding: 12px;
    background: rgba(255,255,255,0.03);
    border-radius: 6px;
    border-left: 4px solid var(--card-accent, #8cf);
    font-size: 14px;
    color: #aaa;
}
@media (max-width: 1024px) {
    .chem-cards-container {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 768px) {
    .chem-cards-container {
        grid-template-columns: 1fr;
    }
    .chem-recipe {
        flex-direction: column;
        gap: 18px;
        max-width: 100%;
    }
    .chem-beaker {
        width: 32px;
        height: 32px;
    }
    .action-sprite .chem-beaker {
        width: 38px;
        height: 38px;
    }
    .recipe-inputs,
    .recipe-outputs {
        min-width: 100%;
    }
}