Template:Info/doc: Difference between revisions

From NeuroWiki
Jump to navigation Jump to search
m 1 revision imported
Translated
 
Line 1: Line 1:
{{High-risk|各类模板及大量}}
== Preview ==
== 效果预览 ==
When no parameters are filled, the effect is as follows:
不填写任何参数时,效果如下。
{{info}}
{{info}}
== 简要说明 ==
== Brief Description ==
* 参数<code>text</code>为必填,其他参数均为选填。
* The parameter <code>text</code> is required, all other parameters are optional.
** 也可以直接使用参数<code>1</code>。例如<code><nowiki>{{Info|内容}}</nowiki></code><code><nowiki>{{Info|text=内容}}</nowiki></code>是等价的。
** 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.
* 可以使用参数title来增加一个标题,也可以用参数below增加一个脚注。
* You can use the parameter title to add a title, or use the parameter below to add a footer note.
* 在使用该模板制作其他模板时,可以使用参数<code>type</code>填写分类。top(默认)为【页顶提示模板】,middle为【页中提示模板】,none为没有分类。
* 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          = <!-- 模板宽度,默认为80% -->
|width          = <!-- Template width, default is 80% -->


|color          = <!-- 左侧竖条颜色,默认为 #1e90ff -->
|color          = <!-- Left stripe color, default is #1e90ff -->
|backgroundColor = <!-- 背景颜色,默认为 #fbfbfb -->
|backgroundColor = <!-- Background color, default is #fbfbfb -->


|leftimage      = <!-- 左侧图标,默认为 [[image:Icon-info.png|50px|link=]],会覆盖参数{{{smallimage}}}-->
|leftimage      = <!-- Left icon, default is [[image:Icon-info.png|50px|link=]], will override parameter {{{smallimage}}} -->
|icon-style      = <!-- 图标样式 -->
|icon-style      = <!-- Icon style -->
|smallimage      = <!-- 图标大小。参数值不为空时,图标大小为25px,否则为50px -->
|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    = <!-- 标题样式,格式为行内样式(inline style),如 color: red; font-style: italic; -->
|title-style    = <!-- Title style, formatted as inline style, such as color: red; font-style: italic; -->


|text            = <!-- 文本内容,等效于{{{content}}}{{{1}}} -->
|text            = <!-- Text content, equivalent to {{{content}}} and {{{1}}} -->
|text-style      = <!-- 文本样式,等效于{{{content-style}}} -->
|text-style      = <!-- Text style, equivalent to {{{content-style}}} -->


|below          = <!-- 底部内容 -->
|below          = <!-- Bottom content -->
|below-style    = <!-- 底部样式 -->
|below-style    = <!-- Bottom style -->


|class          = <!-- 模板额外class -->
|class          = <!-- Additional template class -->
|type            = <!-- 模板类型,仅供模板页使用:top为【页顶提示模板】,middle为【页中提示模板】,none为没有分类;在模板页中默认为页顶提示模板,非模板页中默认为没有分类 -->
|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:模板文档]]</noinclude>
<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 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 -->
}}