Template:Info:修订间差异

H萌娘,万物皆可H的百科全书!
跳到导航 跳到搜索
imported>=海豚=
([InPageEdit] 没有编辑摘要 (编辑自Special:Diff/38836))
(( ̄▽ ̄))
 
(未显示2个用户的33个中间版本)
第1行: 第1行:
<noinclude>这是效果预览
<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}}};"}}>
</noinclude>
{{#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 class="infoBox infobox1" style="width:{{{width|80%}}};{{#if:{{{backgroundColor|}}}|background-color:{{{backgroundColor}}};}}"><div class="{{{class|infoBoxContent}}}" style="border-left: 9.7px solid {{{color|#1e90ff}}};{{#if:{{{backgroundColor|}}}|border-color:{{{backgroundColor}}};background-color:{{{backgroundColor}}};"}}>
</div></div>
{{#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>}}
<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}}};"}}>
</div></div>{{#switch:{{{type|}}}
{{#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>}}
| top = [[分类: 页顶提示模板]]
</div></div>
| middle = [[分类: 页中提示模板]]
<noinclude>{{doc}}
| none
| #default = }}<noinclude>


== 結構 ==
<pre>
{{Info
|class=
|width= 默認值是80%
|color= 默認值是#1e90ff
|backgroundColor=
|title-style=
|title=
|icon-style=
|leftimage= 默認值是[[image:Icon-info.png|50px|link=]]
|text-style=
|text= 默認值是'''警告!你还没有添加任何内容'''
|below-style=
|below=
}}
</pre>


<pre>
----
{{Info
<center><templatedata>
|class=
{
|width=
"params": {
|color=
"1": {
|backgroundColor=
"description": "提示的内容",
|title-style=
"suggested": true,
|title=
"type": "content",
|icon-style=
"autovalue": "",
|leftimage=
"default": "警告!你还没有添加任何内容"
|text-style=
},
|text=
"color": {
|below-style=
"description": "左边缘竖线颜色",
|below=
"default": "#1e90ff"
}}
},
</pre>
"fontcolor": {
 
"description": "文字颜色",
 所有參數都可以留空或者删去,但是會使模板失去作用,不写任何东西 效果见上面的【效果预览】。
"default": "#E6B800"
 除了|text= 以外的所有參數留空或者删去是合理的用法。
},
|text=可以用参数【1】代替
"size": {
{{Color|red|可以使用参数title来增加一个标题<br />可以使用参数below来增加一个页脚}}
"description": "图片大小",
 
"type": "number",
== 举例说明 ==
"default": "50px"
 
},
<pre>
"title": {
{{info
"description": "标题",
|width=50%
"type": "content"
|title=欢迎来到H萌娘!
},
|text= 欢迎使用info模板框,这个模板是所有模板 父模板
"title-style": {
|text-style= color: red; font-weight: bold; font-style: italic;
"description": "标题样式"
|leftimage= [[image:Icon-info.png|50px|link=]]
},
|color= red
"icon-style": {
|backgroundColor=
"description": "图片样式"
|below=H萌娘,万物皆可萌!
},
|class=
"text-style": {
}}
"description": "内容样式"
</pre>
},
 
"text": {
[[分类:提示模板 ‎]]</noinclude>
"description": "提示 内容",
"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>

2022年12月29日 (四) 20:16的最新版本

Icon-info.png
警告!你还没有添加任何内容
警告!你还没有添加任何内容
Template-info.svg 模板文档  [查看] [编辑] [历史] [刷新]

结构[编辑源代码]

{{Info
|class=
|width= 默认值是80%
|color= 默认值是#1e90ff
|title-style=
|title=
|icon-style=
|leftimage= 默认值是[[File:Icon-info.png|50px|link=]]
|text-style=
|text= 默认值是'''警告!你还没有添加任何内容'''
|below-style=
|below=
}}
{{Info
|class=
|width=
|color=
|title-style=
|title=
|icon-style=
|leftimage=
|text-style=
|text=
|below-style=
|below=
}}

 所有参数都可以留空或者删去,但是会使模板失去作用,不写任何东西的效果见上面的【效果预览】。  除了|text= 以外的所有参数留空或者删去是合理的用法。  |text=可以用参数【1】代替  可以使用参数title来增加一个标题
可以使用参数below来增加一个页脚

举例说明[编辑源代码]

{{info
|width=50% 
|title=欢迎来到H萌娘!
|text= 欢迎使用info模板框,这个模板是所有模板的父模板
|class= infoBoxRed
|text-style= color: red; font-weight: bold; font-style: italic;
|leftimage= [[image:Icon-info.png|50px|link=]]
|color= red
|below=H萌娘,万物皆可H!
|class=
}}



页顶提示框模板

模板参数

参数描述类型状态
11

提示的内容

默认值
警告!你还没有添加任何内容
自动值
内容推荐
colorcolor

左边缘竖线颜色

默认值
#1e90ff
未知可选
backgroundColorbackgroundColor

背景颜色

默认值
rgba(255,255,245)
未知可选
leftimageleftimage

选用的图片

默认值
[[image:Icon-info.png|50px|link=]]
文件可选
fontcolorfontcolor

文字颜色

默认值
#E6B800
未知可选
sizesize

图片大小

默认值
50px
数字可选
titletitle

标题

内容可选
title-styletitle-style

标题样式

未知可选
icon-styleicon-style

图片样式

未知可选
text-styletext-style

内容样式

未知可选
texttext

提示的内容

内容可选
widthwidth

无描述

数字可选
classclass

无描述

未知可选
belowbelow

无描述

未知可选
below-stylebelow-style

无描述

未知可选