“Widget:Sif-song-table”的版本间差异

添加206字节 、​ 2022年5月17日 (二) 19:55
//使用页面/文本对比查看器快速编辑
(//使用页面/文本对比查看器快速编辑)
 
(未显示2个用户的28个中间版本)
<noinclude>{{doc|content=用于[[LoveLive!学园偶像祭歌曲列表]]。}}</noinclude><includeonly><和[[LoveLive!学园偶像祭~after school ACTIVITY~ Wai--{if Wai!isset($wgWidgetSifSongTable) ||Home Meeting!$wgWidgetSifSongTable}--><!歌曲列表]]。请使用{{tl|Sif-song-{assign var="wgWidgetSifSongTable" value=true scope="global"table}--><script>}调用。}}[[category:混合小部件]]
<p>JavaScript脚本:[[User:Bhsd/widget/sif-song-table.js]]</p></noinclude><includeonly><!--{if !isset($wgWidgetSifSongTable) || !$wgWidgetSifSongTable}--><!--{assign var="wgWidgetSifSongTable" value=true scope="global"}--><script defer src='/zh?title=user:bhsd/widget/sif-song-table.js&action=raw&ctype=text/javascript'></script><style>
//</includeonly>JavaScript脚本:<pre lang="js">
window.addEventListener('load', function() {
document.querySelectorAll( '.sif-song-table' ).forEach(function(table) {
table.querySelectorAll( '.tabs-dropdown li' ).forEach(function(ele, i) {
ele.onclick = function() {
table.querySelector( '.tabs-label' ).textContent = ele.textContent;
table.querySelectorAll( 'td:nth-last-child(-n+2) > span' ).forEach(function(e) {
e.style.display = '';
});
table.querySelectorAll( 'td:nth-last-child(-n+2)' ).forEach(function(e) {
let level = e.querySelector( ':scope > span:nth-child(' + (i+1) + ')' );
level.style.display = 'initial';
e.dataset.sortValue = level.textContent;
});
};
});
});
});
//</pre>
<includeonly>
</script><style>
/* </includeonly>CSS样式表:<pre lang="css"> */
.sif-song-table {
text-align: center;
}
.sif-song-table .tabs-dropdown {
width: auto !important;
white-space: nowrap;
}
/* 涉及JS的高度计算,提前加载tabs扩展的部分样式 */
.sif-song-table.tsticky .tabs-dropdown {
margin-top: 10px;
margin-bottom: 10px;
}
.sif-song-table.tsticky .tabs-container {
z-index: 1;
}
.sif-song-table .tabs-label {
transition-delay: 0.3s;
}
.sif-song-table .tabs-label:hover {
transition-delay: 0s;
}
.sif-song-table .tabs-content {
border-radius: 0 0 8px 8px;
width: auto;
min-width: 100%;
left: 0;
transition: height linear 0.3s;
overflow: hidden;
}
.sif-song-table .tabs-dropdown:not(:hover) ul.tabs-content {
height: 0 !important;
background-color:#f8f9fa;
border-bottom: none;
}
.sif-song-table .tabs-dropdown li:last-child {
border-radius: 0 0 8px 8px;
}
 
.attrib-s {
background-color: #f8f9faffc1c1;
}
.attrib-p {
background-color: #c0ffbb;
}
.attrib-c {
background-color: #b0e2ff;
}
.swing {
.sif-song-table td:nth-last-child(-n+2) > span {
display:none inline-block;
width: 1.25em;
height: 1.25em;
background-image: url(/mediawiki/img_auth.php/6/65/SIF_Swing_Key.png);
background-size: 1.25em;
vertical-align: text-bottom;
}
/* </pre><includeonly> */
16,874

个编辑