Template:Iconbox:修订间差异

(merge from offical wiki)
 
(文本替换 - 替换“Category:Templates”为“Category:模板”)
第2行: 第2行:
<div style="margin-left:5px;"><div style="font-weight: bold; font-size:larger;">{{#ifeq:{{{link}}}|on|[[{{{1}}}]]|{{{1}}}}}{{anchor|{{{1}}}}}</div><div style="line-height: 1.2em; font-style: italic; font-size:smaller;">{{{2|The description of the achievements}}}</div></div></div></includeonly><noinclude>
<div style="margin-left:5px;"><div style="font-weight: bold; font-size:larger;">{{#ifeq:{{{link}}}|on|[[{{{1}}}]]|{{{1}}}}}{{anchor|{{{1}}}}}</div><div style="line-height: 1.2em; font-style: italic; font-size:smaller;">{{{2|The description of the achievements}}}</div></div></div></includeonly><noinclude>
{{template doc}}
{{template doc}}
[[Category:Templates]]
[[Category: 模板]]
</noinclude>
</noinclude>

2022年3月7日 (一) 16:07的版本

[查看] [编辑]Template-info.png 模板文档

Usage

One item in a list of icons (achievements, disasters, etc.). The box name is sent as a referencable anchor on the page, so you don't need to also use id="" to link to it.

{{iconbox|name|description}}
{{iconbox|name|description|image=file.png}}
{{iconbox|name|description|link=on}}
{{iconbox|name|description|image=file.png|link=on}}

Parameters

Parameter Description Required Default
1 Box name and hovertext required none
2 Description optional The description of the achievements
image Image file optional <parameter 1>.png
template Uses an assembled template in place of an image optional image
link Puts a link in the box name
  • If set to "on", <parameter 1> is used for the link
optional No link

Examples

{{iconbox|unknown}}

unknown icon
unknown
The description of the achievements

{{iconbox|Brave New World|Colonize a planet.}}

Brave New World icon
Brave New World
Colonize a planet.

{{iconbox|Break On Through...|Research a Rare technology.|link=on}}

Break On Through... icon
Research a Rare technology.

{{iconbox|Shipyard|A Shipyard may build one ship at a time, in parallel with other Shipyards.|image=sb shipyard.png|link=on}}

Shipyard icon
A Shipyard may build one ship at a time, in parallel with other Shipyards.

{{iconbox|Lush|Life thrives here, the fauna is plentiful and the flora grows rapidly.|template={{planet modifier|pm_lush|1}}|link=on}}

Pm lush.pngPm frame 1.png
Life thrives here, the fauna is plentiful and the flora grows rapidly.