Template:Info/doc: Difference between revisions
Jump to navigation
Jump to search
创建页面,内容为“{{High-risk|各类模板及大量}} == 效果预览 == 不填写任何参数时,效果如下。 {{info}} == 简要说明 == * 参数<code>text</code>为必填,其他参数均为选填。 ** 也可以直接使用参数<code>1</code>。例如<code><nowiki>{{Info|内容}}</nowiki></code>和<code><nowiki>{{Info|text=内容}}</nowiki></code>是等价的。 * 可以使用参数title来增加一个标题,也可以用参数below增加一个脚注。 * 在使用…” |
Translated |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
== Preview == | |||
== | When no parameters are filled, the effect is as follows: | ||
{{info}} | {{info}} | ||
== | == Brief Description == | ||
* | * The parameter <code>text</code> is required, all other parameters are optional. | ||
** | ** You can also use parameter <code>1</code> directly. For example, <code><nowiki>{{Info|Content}}</nowiki></code> and <code><nowiki>{{Info|text=Content}}</nowiki></code> are equivalent. | ||
* | * You can use the parameter title to add a title, or use the parameter below to add a footer note. | ||
* | * When using this template to create other templates, you can use the parameter <code>type</code> to fill in the category. Top (default) is [Top Notice Template], middle is [Middle Notice Template], none means no category. | ||
== | == Full Parameters == | ||
<pre> | <pre> | ||
{{info | {{info | ||
Line 27: | Line 26: | ||
}} | }} | ||
</pre> | </pre> | ||
== | == Parameter Explanation == | ||
<pre> | <pre> | ||
{{info | {{info | ||
|width = <!-- | |width = <!-- Template width, default is 80% --> | ||
|color = <!-- | |color = <!-- Left stripe color, default is #1e90ff --> | ||
|backgroundColor = <!-- | |backgroundColor = <!-- Background color, default is #fbfbfb --> | ||
|leftimage = <!-- | |leftimage = <!-- Left icon, default is [[image:Icon-info.png|50px|link=]], will override parameter {{{smallimage}}} --> | ||
|icon-style = <!-- | |icon-style = <!-- Icon style --> | ||
|smallimage = <!-- | |smallimage = <!-- Icon size. If the parameter value is not empty, the icon size is 25px, otherwise it is 50px --> | ||
|title = <!-- | |title = <!-- Title content --> | ||
|title-style = <!-- | |title-style = <!-- Title style, formatted as inline style, such as color: red; font-style: italic; --> | ||
|text = <!-- | |text = <!-- Text content, equivalent to {{{content}}} and {{{1}}} --> | ||
|text-style = <!-- | |text-style = <!-- Text style, equivalent to {{{content-style}}} --> | ||
|below = <!-- | |below = <!-- Bottom content --> | ||
|below-style = <!-- | |below-style = <!-- Bottom style --> | ||
|class = <!-- | |class = <!-- Additional template class --> | ||
|type = <!-- | |type = <!-- Template type, for template page use only: top is [Top Notice Template], middle is [Middle Notice Template], none means no category; default is Top Notice Template on template pages, no category on non-template pages --> | ||
}} | }} | ||
</pre> | </pre> | ||
<includeonly>[[en:Template:Info]]</includeonly><noinclude>[[Category: | <includeonly>[[en:Template:Info]]</includeonly><noinclude>[[Category:Template Documentation]]</noinclude> |
Latest revision as of 21:42, 9 November 2024
Preview
When no parameters are filled, the effect is as follows:
Warning! You haven't added any content yet
Brief Description
- The parameter
text
is required, all other parameters are optional.- You can also use parameter
1
directly. For example,{{Info|Content}}
and{{Info|text=Content}}
are equivalent.
- You can also use parameter
- You can use the parameter title to add a title, or use the parameter below to add a footer note.
- When using this template to create other templates, you can use the parameter
type
to fill in the category. Top (default) is [Top Notice Template], middle is [Middle Notice Template], none means no category.
Full Parameters
{{info |width= |color= |backgroundColor= |leftimage= |icon-style= |smallimage= |title= |title-style= |text= |text-style= |below= |below-style= |class= |type= }}
Parameter Explanation
{{info |width = <!-- Template width, default is 80% --> |color = <!-- Left stripe color, default is #1e90ff --> |backgroundColor = <!-- Background color, default is #fbfbfb --> |leftimage = <!-- Left icon, default is [[image:Icon-info.png|50px|link=]], will override parameter {{{smallimage}}} --> |icon-style = <!-- Icon style --> |smallimage = <!-- Icon size. If the parameter value is not empty, the icon size is 25px, otherwise it is 50px --> |title = <!-- Title content --> |title-style = <!-- Title style, formatted as inline style, such as color: red; font-style: italic; --> |text = <!-- Text content, equivalent to {{{content}}} and {{{1}}} --> |text-style = <!-- Text style, equivalent to {{{content-style}}} --> |below = <!-- Bottom content --> |below-style = <!-- Bottom style --> |class = <!-- Additional template class --> |type = <!-- Template type, for template page use only: top is [Top Notice Template], middle is [Middle Notice Template], none means no category; default is Top Notice Template on template pages, no category on non-template pages --> }}