“模板:Documentation/doc”与“模板:Mbox/styles.css”:页面之间的差异

来自NebulaeWiki
< 模板:Documentation(页面间差异)
(已保护“模板:Documentation/doc”([编辑=仅允许管理员](无限期)[移动=仅允许管理员](无限期)))
 
(已保护“模板:Mbox/styles.css”([编辑=仅允许管理员](无限期)[移动=仅允许管理员](无限期)))
 
第1行: 第1行:
<!--此模板还在汉化中-->
.mbox {
position: relative;
display: flex;
flex-direction: column;
margin-top: 0.4rem;
margin-bottom: 0.8rem;
background-color: var( --color-surface-2 );
border-radius: var( --border-radius--medium );
color: var( --color-base--subtle );
font-size: 0.875rem;
}
 
.mbox.mbox-high {
background-color: var( --background-color-destructive );
}


{{Documentation}}
.mbox.mbox-med {
'''documentation'''模板是在template/module文档中转录的。这个模板应该只用在标题中带有"doc"的模板。
background-color: var( --background-color-warning );
}


==用法==
.mbox-title {
将{{t|documentation}}放在文档页面的顶部。
display: flex;
align-items: center;
padding: 10px 15px;
font-weight: 500;
}


If the page to be documented is a subpage, use {{t|documentation|pagename of page to be documented}} at the top of the documentation page. For example, Template:Foo/bar's documentation page would use {{t|documentation|Template:Foo/bar}}.
.mbox-icon img {
width: 14px;
height: auto;
margin-right: 10px;
opacity: 0.5;
}


The template will attempt to auto detect and link <code><nowiki>{{#Invoke:}}</nowiki></code> calls on template documentations or the <code>require()</code>/<code>mw.loadData()</code> depedency list on module documentations. If you want to supress the auto generated dependency list, use {{t|documentation|DependencyList=no}}
.mbox-text {
position: absolute;
z-index: 10;
padding: 15px 20px;
width: calc(100% - 40px);
background-color: var( --color-surface-2 );
border-radius: var( --border-radius--medium );
box-shadow: var( --box-shadow-dialog );
opacity: 0;
transition: opacity 0.2s ease, box-shadow 0.2s ease;
visibility: hidden;
}


==提示==
.mbox:hover .mbox-text {
这个模板链接到一个/doc,可能看起来毫无用处,然而,它的存在是为了将导航框和用户框链接到其基础模板的文档。
opacity: 1;
visibility: visible;
}


<includeonly></includeonly>
.mbox-high .mbox-text {
background-color: var( --background-color-destructive );
}
 
.mbox-med .mbox-text {
background-color: var( --background-color-warning );
}
 
.mbox-需要翻译{
    background-color: #ffcc3382;
    color: rgba(0,0,0,0.8);
    border-radius: var(--border-radius--medium);
}
 
/* Dark mode */
html.skin-citizen-dark .mbox-icon img {
filter: invert( 1 );
}


==TemplateData==
/* Readability fixes */
<templatedata>
html.skin-citizen-dark .mbox {
{
color: var( --color-base--emphasized );
"params": {},
"description": "The documentation template is transcluded in the template/module documentation. This template should only be used on subpages titled \"doc\"."
}
}
</templatedata>

2023年9月23日 (六) 22:29的最新版本

.mbox {
	position: relative;
	display: flex;
	flex-direction: column;
	margin-top: 0.4rem;
	margin-bottom: 0.8rem;
	background-color: var( --color-surface-2 );
	border-radius: var( --border-radius--medium );
	color: var( --color-base--subtle );
	font-size: 0.875rem;
}

.mbox.mbox-high {
	background-color: var( --background-color-destructive );
}

.mbox.mbox-med {
	background-color: var( --background-color-warning );
}

.mbox-title {
	display: flex;
	align-items: center;
	padding: 10px 15px;
	font-weight: 500;
}

.mbox-icon img {
	width: 14px;
	height: auto;
	margin-right: 10px;
	opacity: 0.5;
}

.mbox-text {
	position: absolute;
	z-index: 10;
	padding: 15px 20px;
	width: calc(100% - 40px);
	background-color: var( --color-surface-2 );
	border-radius: var( --border-radius--medium );
	box-shadow: var( --box-shadow-dialog );
	opacity: 0;
	transition: opacity 0.2s ease, box-shadow 0.2s ease;
	visibility: hidden;
}

.mbox:hover .mbox-text {
	opacity: 1;
	visibility: visible;
}

.mbox-high .mbox-text {
	background-color: var( --background-color-destructive );
}

.mbox-med .mbox-text {
	background-color: var( --background-color-warning );
}

.mbox-需要翻译{
    background-color: #ffcc3382;
    color: rgba(0,0,0,0.8);
    border-radius: var(--border-radius--medium);
}

/* Dark mode */
html.skin-citizen-dark .mbox-icon img {
	filter: invert( 1 );
}

/* Readability fixes */
html.skin-citizen-dark .mbox {
	color: var( --color-base--emphasized );
}