(创建页面,内容为“<includeonly>{{template doc page transcluded}}</includeonly><noinclude>{{template doc page viewed directly}}</noinclude> <!-- EDIT TEMPLATE DOCUMENTATION BELOW T…”) |
小 (文本替换 - 替换“{{template doc page viewed directly}}</noinclude>”为“{{template doc page viewed directly}}</noinclude>[[en:{{FULLPAGENAME}}]]”) |
||
| (未显示1个用户的2个中间版本) | |||
| 第1行: | 第1行: | ||
<includeonly>{{template doc page transcluded}}</includeonly><noinclude>{{template doc page viewed directly}}</noinclude> | <includeonly>{{template doc page transcluded}}</includeonly><noinclude>{{template doc page viewed directly}}</noinclude>[[en:{{FULLPAGENAME}}]] | ||
<!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE --> | <!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE --> | ||
This template can be used to add an entry for a trait in a table of traits. It shows the icon of the trait, followed by its name. The icon's width is constant, defined by the template. The name is automatically aligned left. | This template can be used to add an entry for a trait in a table of traits. It shows the icon of the trait, followed by its name. The icon's width is constant, defined by the template. The name is automatically aligned left. | ||
| 第7行: | 第7行: | ||
Currently does not support entries that have an id="" on the same row, with the rows parameter set. | Currently does not support entries that have an id="" on the same row, with the rows parameter set. | ||
== | == 参数 == | ||
{| class="wikitable" | {| class="wikitable" | ||
! | ! 参数 | ||
! | ! 描述 | ||
! | ! 要求 | ||
! | ! 默认 | ||
|- | |- | ||
| 1 || | | 1 || 特质名称 || '''required''' || 无 | ||
|- | |- | ||
| file || | | file || 如果此参数为非空,它将重载图标为使用该文件路径的图片。如果目前特质没有图标则使用此项。|| 可选 || 默认为使用特质名称的[[Template:icon|Icon template]] | ||
|- | |- | ||
| rows || | | rows || 定义条目应该占用多少行。 || 可选 || 1 | ||
|- | |||
| 2 || 汉语名称 || '''required''' || 无 | |||
|} | |} | ||
== | == 例子 == | ||
{| class="wikitable" | {| class="wikitable" | ||
! Wiki | ! Wiki 文本 | ||
! colspan="2" | | ! colspan="2" | 结果 | ||
|- | |- | ||
| <code><nowiki>{{trait entry|Blind}}</nowiki></code> | | <code><nowiki>{{trait entry|Blind|失明}}</nowiki></code> | ||
{{trait entry|Blind}} | {{trait entry|Blind|失明}} | ||
|- | |- | ||
| <code><nowiki>{{trait entry|New trait without icon|file=Trait henbane addict.png}}</nowiki></code> | | <code><nowiki>{{trait entry|New trait without icon|file=Trait henbane addict.png|没有图标的新特质}}</nowiki></code> | ||
{{trait entry|New trait without icon|file=Trait henbane addict.png}} | {{trait entry|New trait without icon|file=Trait henbane addict.png|没有图标的新特质}} | ||
|- | |- | ||
| <code><nowiki>{{trait entry|Wounded|rows=2}}</nowiki></code> | | <code><nowiki>{{trait entry|Wounded|rows=2}}</nowiki></code> | ||
{{trait entry|Wounded|rows=2}} | {{trait entry|Wounded|rows=2|受伤}} | ||
|- | |- | ||
| | | (举例用的行) | ||
|} | |} | ||
2022年3月18日 (五) 14:24的最新版本
[模板https://www.parawikis.com/wiki/Template:Template_doc_page_viewed_directly?action=raw读取失败:HTTP 502] This template can be used to add an entry for a trait in a table of traits. It shows the icon of the trait, followed by its name. The icon's width is constant, defined by the template. The name is automatically aligned left.
Use this template to standardise the style of trait entries in tables.
Currently does not support entries that have an id="" on the same row, with the rows parameter set.
参数[编辑源代码]
| 参数 | 描述 | 要求 | 默认 |
|---|---|---|---|
| 1 | 特质名称 | required | 无 |
| file | 如果此参数为非空,它将重载图标为使用该文件路径的图片。如果目前特质没有图标则使用此项。 | 可选 | 默认为使用特质名称的Icon template |
| rows | 定义条目应该占用多少行。 | 可选 | 1 |
| 2 | 汉语名称 | required | 无 |
例子[编辑源代码]
| Wiki文本 | 结果 | |
|---|---|---|
{{trait entry|Blind|失明}}
|
失明 | |
{{trait entry|New trait without icon|file=Trait henbane addict.png|没有图标的新特质}}
|
没有图标的新特质 | |
{{trait entry|Wounded|rows=2}}
|
受伤 | |
| (举例用的行) | ||