“模板:Main page/gamebuild/styles.css”与“MediaWiki:Mainpage.js”:页面之间的差异

来自NebulaeWiki
< 模板:Main page/gamebuild(页面间差异)
无编辑摘要
 
无编辑摘要
 
第1行: 第1行:
#home-gamebuild {
$(function(){
display: flex;
    /* 头图 */
flex-direction: column;
    var page = document.querySelector("body");
justify-content: space-between;
    if (page.classList.contains('page-首页')) {
}
        var mwBody = document.getElementById('content');
 
        var newDiv = document.createElement('div');
.home-gamebuild-links {
        newDiv.setAttribute('class', 'header-image');
grid-template-columns: 1fr 1fr;
        newDiv.innerHTML = '<div class="header-image" style="background-image: linear-gradient(to top, var(--color-surface-0), transparent 50%), url(https://wiki.knebulae.com/images/title.png);background-size: cover;background-position: top;height: 36vh;margin-bottom: -37vh;"></div>';
}
        mwBody.parentNode.insertBefore(newDiv, mwBody);
 
    }
.home-gamebuild-patch__container {
}());
display: flex;
align-items: center;
justify-content: space-between;
}
 
.home-gamebuild-patch {
display: flex;
white-space: nowrap;
align-items: center;
}
 
.home-gamebuild-patch__name {
font-size: 1.2rem;
font-weight: 600;
}
 
.home-gamebuild-patch__type {
padding: 0.1rem 0.6rem;
margin-left: 0.4rem;
background: var( --color-surface-3 );
border-radius: 100px;
font-size: 0.8125rem;
font-weight: 500;
text-transform: uppercase;
}
 
.home-gamebuild-patch__type--LIVE {
background: var( --background-color-success );
color: #14866d;
}
 
.home-gamebuild-patch__type--EVO {
background: var( --background-color-destructive );
color: #dd3333;
}
 
.home-gamebuild-patch__type--WIP {
background: var( --background-color-warning );
color: #ac6600;
}

2024年1月3日 (三) 16:23的版本

$(function(){
    /* 头图 */
    var page = document.querySelector("body");
    if (page.classList.contains('page-首页')) {
        var mwBody = document.getElementById('content');
        var newDiv = document.createElement('div');
        newDiv.setAttribute('class', 'header-image');
        newDiv.innerHTML = '<div class="header-image" style="background-image: linear-gradient(to top, var(--color-surface-0), transparent 50%), url(https://wiki.knebulae.com/images/title.png);background-size: cover;background-position: top;height: 36vh;margin-bottom: -37vh;"></div>';
        mwBody.parentNode.insertBefore(newDiv, mwBody);
    }
}());