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

Страница интерфейса MediaWiki
Нет описания правки
Метка: отменено
Нет описания правки
 
(не показана 21 промежуточная версия этого же участника)
Строка 1: Строка 1:
var ChemRecipe = (function() {
body:before {
     function createBlock(data) {
     content: "";
        var container = document.createElement('div');
    position: fixed;
        container.style.background = '#1e1e1e';
    top: 0;
        container.style.color = '#ddd';
    left: 0;
        container.style.border = '1px solid #444';
    right: 0;
        container.style.borderRadius = '8px';
    bottom: 0;
        container.style.padding = '10px';
    background-image: url("https://upload.wikimedia.org/wikipedia/commons/3/36/Snowflakes_falling_transparent.gif");
        container.style.margin = '10px';
    background-repeat: repeat;
        container.style.width = '300px';
    pointer-events: none;
        container.style.display = 'inline-block';
    opacity: 0.35;
        container.style.verticalAlign = 'top';
    z-index: 2;
    animation: snowmove 60s linear infinite;
}


        var title = document.createElement('div');
@keyframes snowmove {
        title.style.fontWeight = 'bold';
    from { background-position: 0 0; }
        title.style.fontSize = '16px';
    to { background-position: 500px 1000px; }
        title.style.marginBottom = '6px';
}
        title.textContent = data.name;
        container.appendChild(title);


        if (data.ingredients) {
h1, h2, h3, h4, h5 {
            var ingTitle = document.createElement('div');
    text-shadow: 0 0 6px rgba(179, 229, 252, 0.7), 0 0 12px rgba(179, 229, 252, 0.4);
            ingTitle.style.fontStyle = 'italic';
    transition: text-shadow 0.3s;
            ingTitle.textContent = 'Смешайте';
}
            container.appendChild(ingTitle);


            var ul = document.createElement('ul');
h1:hover, h2:hover, h3:hover, h4:hover, h5:hover {
            ul.style.paddingLeft = '20px';
    text-shadow: 0 0 12px rgba(179, 229, 252, 0.9), 0 0 20px rgba(179, 229, 252, 0.6);
            for (var i = 0; i < data.ingredients.length; i++) {
}
                var li = document.createElement('li');
                li.textContent = data.ingredients[i].name + ' [' + data.ingredients[i].amount + ']';
                ul.appendChild(li);
            }
            container.appendChild(ul);
        }


        if (data.effects) {
a, a:visited {
            var effTitle = document.createElement('div');
    transition: color 0.3s, text-shadow 0.3s;
            effTitle.style.fontWeight = 'bold';
}
            effTitle.style.marginTop = '6px';
            effTitle.textContent = 'Эффекты';
            container.appendChild(effTitle);


            var ulEff = document.createElement('ul');
a:hover {
            ulEff.style.paddingLeft = '20px';
    color: #b3e5fc !important;
            for (var j = 0; j < data.effects.length; j++) {
    text-shadow: 0 0 6px #b3e5fc;
                var liEff = document.createElement('li');
}
                liEff.textContent = data.effects[j];
                ulEff.appendChild(liEff);
            }
            container.appendChild(ulEff);
        }


        if (data.description) {
.wikitable {
            var desc = document.createElement('div');
    border-color: rgba(179, 229, 252, 0.6) !important;
            desc.style.marginTop = '6px';
    border-radius: 6px;
            desc.style.fontSize = '13px';
}
            desc.textContent = data.description;
            container.appendChild(desc);
        }


        return container;
.wikitable th {
    }
    background: rgba(179, 229, 252, 0.1);
}


    return {
.mw-page-title-main:before {
        render: function(recipes, targetId) {
    content: " ";
            var target = document.getElementById(targetId);
}
            for (var k = 0; k < recipes.length; k++) {
 
                target.appendChild(createBlock(recipes[k]));
.mw-page-title-main:after {
            }
     content: " ";
        }
}
     };
})();

Текущая версия от 08:23, 13 ноября 2025

body:before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("https://upload.wikimedia.org/wikipedia/commons/3/36/Snowflakes_falling_transparent.gif");
    background-repeat: repeat;
    pointer-events: none;
    opacity: 0.35;
    z-index: 2;
    animation: snowmove 60s linear infinite;
}

@keyframes snowmove {
    from { background-position: 0 0; }
    to { background-position: 500px 1000px; }
}

h1, h2, h3, h4, h5 {
    text-shadow: 0 0 6px rgba(179, 229, 252, 0.7), 0 0 12px rgba(179, 229, 252, 0.4);
    transition: text-shadow 0.3s;
}

h1:hover, h2:hover, h3:hover, h4:hover, h5:hover {
    text-shadow: 0 0 12px rgba(179, 229, 252, 0.9), 0 0 20px rgba(179, 229, 252, 0.6);
}

a, a:visited {
    transition: color 0.3s, text-shadow 0.3s;
}

a:hover {
    color: #b3e5fc !important;
    text-shadow: 0 0 6px #b3e5fc;
}

.wikitable {
    border-color: rgba(179, 229, 252, 0.6) !important;
    border-radius: 6px;
}

.wikitable th {
    background: rgba(179, 229, 252, 0.1);
}

.mw-page-title-main:before {
    content: " ";
}

.mw-page-title-main:after {
    content: " ";
}