Template:Iconbox: Difference between revisions

mNo edit summary
mNo edit summary
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><div style="display:flex; align-items:center;">{{#if:{{{template|}}}|{{{template}}}|[[File:{{#if:{{{image|}}}|{{{image|{{{en|成就图标}}}.png}}}|{{{en|{{{cn|{{{1|成就名称}}}}}}}}}.{{{extension|png}}}}}|{{{en|{{{1}}}}}} 的图标|link={{#ifeq:{{{link}}}|on|{{{cn|}}}|}}]]}}
<includeonly><div style="display:flex; align-items:center;">{{#if:{{{template|}}}|{{{template}}}|[[File:{{#if:{{{image|}}}|{{{image|{{{en|成就图标}}}.png}}}|{{{en|{{{cn|{{{1|成就名称}}}}}}}}}.{{{extension|png}}}}}|{{{en|{{{1}}}}}} 的图标|link={{#ifeq:{{{link}}}|on|{{{cn|}}}|}}]]}}
<div style="margin-left:5px;"><div style="font-weight: ; font-size:smaller;">{{#ifeq:{{{cn}}}|||{{{en|}}}}}</div><div style="font-weight: bold; font-size:larger;">{{#ifeq:{{{link}}}|on|[[{{{en|{{{cn|{{{1}}}}}}}}}]]|{{{en|{{{cn|{{{1}}}}}}}}}}}{{anchor|{{{en|{{{1}}}}}}}}</div><div style="line-height: 1.2em; font-style: italic; font-size:smaller;">{{{desc|{{{2| 成就 的描述}}}}}}</div></div></div></includeonly><noinclude>
<div style="margin-left:5px;"><div style="font-weight: ; font-size:smaller;">{{#ifeq:{{{cn}}}|||{{{en|}}}}}</div><div style="font-weight: bold; font-size:larger;">{{#ifeq:{{{link}}}|on|[[{{{cn|{{{en|{{{1}}}}}}}}}]]|{{{cn|{{{1|{{{en|}}}}}}}}}}}{{anchor|{{{en|{{{1}}}}}}}}</div><div style="line-height: 1.2em; font-style: italic; font-size:smaller;">{{{desc|{{{2|{{{1}}} 的描述}}}}}}</div></div></div></includeonly><noinclude>
{{template doc}}
{{template doc}}
[[Category:模板]]
[[Category:模板]]
</noinclude>
</noinclude>

Latest revision as of 14:11, 18 March 2022

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

Usage[edit source]

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[edit source]

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[edit source]

{{iconbox|unknown}}

unknown 的图标
unknown
unknown的描述

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

Brave New World 的图标
Brave New World
Colonize a planet.

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

Break On Through... 的图标
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 的图标
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.