LLWiki正在建设中,欢迎加入我们!
“Widget:年表標籤/篩選”的版本间差异
跳转到导航
跳转到搜索
小 |
(//使用页面/文本对比查看器快速编辑) |
||
(未显示同一用户的15个中间版本) | |||
第1行: | 第1行: | ||
<noinclude>{{doc|content=仅用于{{tl|年表标签/筛选}}。}}[[category:混合小部件]] |
|||
<includeonly><!--{if !isset($wgWidgetFilter) || !$wgWidgetFilter}--><!--{assign var="wgWidgetFilter" value=true scope="global"}--> |
<p>JavaScript脚本:[[User:Bhsd/widget/tagFilter.js]]</p></noinclude><includeonly><!--{if !isset($wgWidgetFilter) || !$wgWidgetFilter}--><!--{assign var="wgWidgetFilter" value=true scope="global"}--><script defer src='/zh?title=user:bhsd/widget/tagFilter.js&action=raw&ctype=text/javascript'></script><style> |
||
<script> |
|||
/ |
/* </includeonly>CSS样式表:<pre lang="css"> */ |
||
.chronology, .filter { |
|||
window.addEventListener('load', function() { |
|||
display: inline-block !important; /* Safari */ |
|||
document.querySelectorAll('.filter').forEach(function(ele) { |
|||
white-space: nowrap; |
|||
ele.addEventListener('click', function() { |
|||
line-height: 1.2; |
|||
document.querySelectorAll('#mw-content-text dl').forEach(function(parent) { |
|||
color: #676767; |
|||
var child = parent.querySelector('dd > :not(.mw-collapsed)'); |
|||
font-weight: bold; |
|||
if(child) |
|||
font-size: small; |
|||
parent.style.display = ''; |
|||
padding: 2px 4px; |
|||
else |
|||
margin-right: 0.5rem; |
|||
parent.style.display = 'none'; |
|||
border-radius: 3px; |
|||
}); |
|||
transition: background-color ease-out 0.5s; |
|||
}); |
|||
} |
|||
}); |
|||
.filter.mw-collapsed { |
|||
}); |
|||
background-color: #ccc !important; |
|||
//</pre> |
|||
} |
|||
<includeonly> |
|||
/* </pre><includeonly> */ |
|||
</style><!--{/if}--></includeonly> |
2022年5月17日 (二) 19:57的最新版本
JavaScript脚本:User:Bhsd/widget/tagFilter.js
CSS样式表:
*/
.chronology, .filter {
display: inline-block !important; /* Safari */
white-space: nowrap;
line-height: 1.2;
color: #676767;
font-weight: bold;
font-size: small;
padding: 2px 4px;
margin-right: 0.5rem;
border-radius: 3px;
transition: background-color ease-out 0.5s;
}
.filter.mw-collapsed {
background-color: #ccc !important;
}
/*