LLWiki正在建設中,歡迎加入我們

「Widget:游戏主界面」修訂間的差異

出自LLWiki
跳至導覽 跳至搜尋
第1行: 第1行:
<noinclude>{{doc|content=请使用[[:category:导航模板|导航模板]]调用。}}</noinclude><includeonly><!--{if !isset($wgWidgetStartScreen) || !$wgWidgetStartScreen}--><!--{assign var="wgWidgetStartScreen" value=true scope="global"}--><script>
<noinclude>{{doc|content=请使用[[:category:导航模板|导航模板]]调用。}}[[category:混合小部件]]</noinclude><includeonly><!--{if !isset($wgWidgetStartScreen) || !$wgWidgetStartScreen}--><!--{assign var="wgWidgetStartScreen" value=true scope="global"}--><script defer src='/zh?title=</includeonly><noinclude><p>JavaScript脚本:[[</noinclude>User:Bhsd/widget/nav.js<noinclude>]]</p></noinclude><includeonly>&action=raw&ctype=text/javascript'></script><style>
//</includeonly>JavaScript脚本:<pre lang="js">
window.addEventListener('load', function () {
var ele = document.querySelector('.start-screen'),
parent = document.querySelector('#mw-content-text .mw-parser-output');
ele.querySelectorAll('a[href]').forEach(function(e) {
var href = decodeURIComponent(e.href),
section = /#/.test(href),
pagename = section ? href.match('^(?:https:)?(?:\/\/llwiki\.org)?/zh/(.*)#')[1] : href.match('^(?:https:)?(?:\/\/llwiki\.org)?/zh/(.*)$')[1];
if (pagename == mw.config.get('wgPageName')) {
e.href = section ? href.match(/#.*$/)[0] : 'javascript:void(0)';
}
});
if (mw.config.get('skin') == 'minerva') {
ele.querySelectorAll( '.lazy-image-placeholder' ).forEach(function(e) {
let img = document.createElement('img');
img.src = e.dataset.src;
e.replaceWith(img);
});
parent.appendChild(ele);
ele.scrollLeft = (ele.scrollWidth - ele.clientWidth) / 2;
}
});
//</pre>
<includeonly>
</script><style>
/* </includeonly>CSS样式表:<pre lang="css"> */
/* </includeonly>CSS样式表:<pre lang="css"> */
.start-screen {
.start-screen {

於 2020年11月29日 (日) 00:25 的修訂

Template-info.png 小部件文檔
這個文檔是內聯文檔。

請使用導航模板調用。

JavaScript腳本:User:Bhsd/widget/nav.js

CSS樣式表:

 */
.start-screen {
	text-align: center;
	position: sticky;
	bottom: 3px;
	white-space: nowrap;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scroll-snap-type: x mandatory;
}
.start-screen a {
	scroll-snap-align: start;
}
.start-screen table {
	display: inline-table;
	margin: 0;
	width: auto !important;
}
/*