模板:Info:修订间差异

删除313字节 、​ 2023年2月17日 (星期五)
已保护“模板:Info”:​高流量页面([编辑=允许巡查员和管理员](无限期)[移动=允许巡查员和管理员](无限期))
(创建页面,内容为“<includeonly><div class="infoBox {{{class|}}}" style="width:{{{width|80%}}};border-left: 10px solid {{{color|#1e90ff}}};{{#if:{{{backgroundColor|}}}|background-color…”)
 
(已保护“模板:Info”:​高流量页面([编辑=允许巡查员和管理员](无限期)[移动=允许巡查员和管理员](无限期)))
 
(未显示3个用户的7个中间版本)
<includeonly><templatestyles src="Info/style.css" /><div class="mw-parser-output"><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}}};"}}>
{{#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|{{#if:{{{smallimage|}}}|25px|50px}}|link=]]}}}</div><div class="infoBoxText" style="{{{text-style|}}}{{{content-style|}}}">{{{text|{{{content|{{{1|'''警告!你还没有添加任何内容'''}}}}}}}}}</div>{{#if:{{{below|}}}|<div class="infoBoxBelow" style="{{{below-style|}}}">{{{below}}}</div>}}
</div></div></div>{{#ifeq:{{NAMESPACENUMBER}}|10|{{#switch:{{{type|}}}
| top = [[Category:页顶提示模板]]
| middle = [[Category:页中提示模板]]
| none =
| #default = [[Category:页顶提示模板]] }}|}}</includeonly><noinclude>
{{Documentation}}
== 使用方法 ==
[[分类:元模板]]<templatedata>
这是效果预览
{
{{Info}}
"params": {
<pre>
"text": {
除了|text= 以外都可以留空或者删去,不写任何东西的效果见上面的【效果预览】
"aliases": [
|text=可以用参数【1】代替
"1",
可以使用参数title来增加一个标题!也可以用参数below增加一个页脚!
"content"
type= ,分類填寫,默認為【頁頂提醒模板】,top為【頁頂提醒模板】;middle為【頁中提醒模板】;none為沒有分類。
],
</pre>
"label": "内容",
<pre>
"type": "content",
{{info
"required": true
|width=50% <!-- 模板宽度,选填,默认为80% -->
},
|title=欢迎来到萌娘百科! <!-- 文本标题,选填 -->
"title": {
|text= 欢迎使用info模板框,这个模板是所有模板的父模板 <!-- 文本内容,必填!!!(可省去参数名) -->
"label": "标题",
|text-style= color: red; font-weight: bold; font-style: italic; <!-- 文本样式,选填,格式为行内样式(inline style) -->
"type": "content"
|leftimage= [[image:Icon-info.png|50px|link=]] <!-- 左侧图标,选填,格式为图片插入语法,默认为[[image:Icon-info.png|50px|link=]] -->
},
|color= red <!-- 左边框颜色,选填,格式为HTML颜色语法,默认为#1e90ff -->
"width": {
|backgroundColor= <!-- 背景颜色,选填,格式为HTML颜色语法,默认为#fbfbfb -->
"label": "宽度",
|below=萌娘百科,万物皆可萌! <!-- 底部内容,选填-->
"type": "string",
|class= <!-- 模板额外class,选填,格式为class语法-->
"default": "80%"
|type= <!--模板类型,仅供模板页使用:在模板页中默认为【页顶提醒模板】,top为【页顶提醒模板】,middle为【页中提醒模板】,none为没有分类;在非模板页中默认为没有分类-->
},
|smallimage= <!--图标大小,选填。参数值填写任意内容时,图标大小为25px(即一行文字的高度),否则为50px(默认高度)-->
"color": {
}}
"label": "左边框颜色",
</pre>
"type": "string",
[[分类:元模板]]</noinclude>
"default": "#1e90ff"
},
"text-style": {
"label": "文本样式",
"type": "string"
},
"backgroundColor": {
"label": "背景颜色",
"type": "string"
},
"below": {
"label": "页脚",
"type": "content"
},
"leftimage": {
"label": "左侧图标",
"type": "content",
"default": "[[image:Icon-info.png|50px|link=]]"
},
"smallimage": {
"label": "图标大小",
"type": "string",
"default": "50px"
},
"class": {
"label": "类名",
"type": "string"
},
"type": {
"label": "模板类型",
"description": "可以是:top / middle / none"
},
"title-style": {
"label": "标题样式",
"type": "string"
},
"icon-style": {
"label": "图标样式",
"type": "string"
},
"content-style": {
"label": "内容样式",
"type": "string"
},
"below-style": {
"label": "页脚样式",
"type": "string"
}
},
"description": "消息提示框",
"format": "block"
}
</templatedata></noinclude>
维护员、​界面管理员、​巡查员、​监督员、​小部件编辑者
3,462

个编辑