Template:Info:修订间差异

添加1,302字节 、​ 2022年12月29日 (星期四)
( ̄▽ ̄)
imported>Zyksnowy
(想要…不用</includeonly>(ˉ﹃ˉ))
(( ̄▽ ̄))
 
(未显示4个用户的56个中间版本)
第1行: 第1行:
<includeonly><div class="infoBox {{{class|}}}" style="width:{{{width|80%}}};border-left: 10px solid {{{color|#1e90ff}}};{{#if:{{{backgroundColor|}}}|background-color:{{{backgroundColor}}};}}"><div class="infoBoxContent" {{#if:{{{backgroundColor|}}}|style="border-color:{{{backgroundColor}}};background-color:{{{backgroundColor}}};"}}>
<div class="nomobile infoBox infoBoxx" style="width:{{{width|}}};{{#if:{{{backgroundColor|}}}|background-color:{{{backgroundColor}}};}}"><div class="{{{class|infoBoxContent new}}}" style="border-left: 9.7px solid {{{color|#1e90ff}}};{{#if:{{{backgroundColor|}}}|border-color:{{{backgroundColor}}};background-color:{{{backgroundColor}}};"}}>
{{#if:{{{title|}}}|<div class="infoBoxTitle" style="{{{title-style|}}}">{{{title}}}</div>}}<div class="infoBoxIcon" style="{{#if:{{{backgroundColor|}}}|background-color:{{{backgroundColor}}};}}{{{icon-style|}}}">{{{leftimage|[[image:Icon-info.png|50px|link=]]}}}</div><div class="infoBoxText" style="{{{text-style|}}}">{{{text|{{{1|'''警告!你还没有添加任何内容'''}}}}}}</div>{{#if:{{{below|}}}|<div class="infoBoxBelow" style="{{{below-style|}}}">{{{below}}}</div>}}
{{#if:{{{title|}}}|<div class="infoBoxTitle" style="{{{title-style|}}}">{{{title}}}</div>}}<div class="infoBoxIcon" style="{{#if:{{{backgroundColor|}}}|background-color:{{{backgroundColor}}};}}{{{icon-style|}}}">{{{leftimage|[[File:Icon-info.png|50px|link=]]}}}</div><div class="infoBoxText" style="{{{text-style|}}}">{{{text|{{{1|'''警告!你还没有添加任何内容'''}}}}}}</div>{{#if:{{{below|}}}|<div class="infoBoxBelow" style="{{{below-style|}}}">{{{below}}}</div>}}
</div></div></includeonly><noinclude>
</div></div>
<div class="mobileonly" style="width:100%;{{#if:{{{backgroundColor|}}}|background-color:{{{backgroundColor}}};}}"><div class="{{{class|infoBoxOrange}}}" style="border-left: 10px solid {{{color|#1e90ff}}};{{#if:{{{backgroundColor|}}}|border-color:{{{backgroundColor}}};background-color:{{{backgroundColor}}};"}}>
{{#if:{{{title|}}}|<div class="infoBoxTitle" style="{{{title-style|}}}">{{{title}}}</div>}}<div class="infoBoxIcon" style="{{#if:{{{backgroundColor|}}}|background-color:{{{backgroundColor}}};}}{{{icon-style|}}}"></div><div class="infoBoxText" style="{{{text-style|}}}">{{{text|{{{1|'''警告!你还没有添加任何内容'''}}}}}}</div>{{#if:{{{below|}}}|<div class="infoBoxBelow" style="{{{below-style|}}}">{{{below}}}</div>}}
</div></div>
<noinclude>{{doc}}


这是效果预览
{{info}}


== 結構 ==
----
<pre>
<center><templatedata>
{{Info
{
|class=
"params": {
|width=
"1": {
|color=
"description": "提示的内容",
|backgroundColor=
"suggested": true,
|title-style=
"type": "content",
|title=
"autovalue": "",
|icon-style=
"default": "警告!你还没有添加任何内容"
|leftimage=
},
|text-style=
"color": {
|text=
"description": "左边缘竖线颜色",
|below-style=
"default": "#1e90ff"
|below=
},
}}
"fontcolor": {
</pre>
"description": "文字颜色",
 
"default": "#E6B800"
 
},
 除了|text= 以外都可以留空或者删去,不写任何东西的效果见上面 【效果预览】
"size": {
|text=可以用参数【1】代替
"description": "图片大小",
{{color|red|新增功能:可以使用参数title来增加一个标题!也可以用参数below增加一个页脚!}}
"type": "number",
 
"default": "50px"
== 举例说明 ==
},
 
"title": {
<pre>
"description": "标题",
{{info
"type": "content"
|width=50%
},
|title=欢迎来到萌娘百科!
"title-style": {
|text= 欢迎使用info模板框,这个模板是所有模板 父模板
"description": "标题样式"
|text-style= color: red; font-weight: bold; font-style: italic;
},
|leftimage= [[image:Icon-info.png|50px|link=]]
"icon-style": {
|color= red
"description": "图片样式"
|backgroundColor=
},
|below=萌娘百科,万物皆可萌!
"text-style": {
|class=
"description": "内容样式"
}}
},
</pre>
"text": {
 
"description": "提示 内容",
[[Category:提示模板 ‎]]</noinclude>
"type": "content"
},
"backgroundColor": {
"description": "背景颜色",
"default": "rgba(255,255,245)"
},
"leftimage": {
"description": "选用 图片",
"type": "wiki-file-name",
"default": "[[image:Icon-info.png|50px|link=]]"
},
"width": {
"type": "number"
},
"class": {},
"below": {},
"below-style": {}
},
"description": "页顶 提示 模板",
"paramOrder": [
"1",
"color",
"backgroundColor",
"leftimage",
"fontcolor",
"size",
"title",
"title-style",
"icon-style",
"text-style",
"text",
"width",
"class",
"below",
"below-style"
]
}
</templatedata></center></noinclude>
244

个编辑