Cambios

Saltar a: navegación, buscar

Plantilla:Grid/doc

5627 bytes añadidos, 14:23 14 abr 2014
Página creada con «{{doc/start}} The grid template is a singular grid cell, which has the ability to display any image (usually a block or item) that is uploaded as Grid <Name>.png, within it...»
{{doc/start}}
The grid template is a singular grid cell, which has the ability to display any image (usually a block or item) that is uploaded as Grid <Name>.png, within it.
== Usage ==
All inputs are optional (however Amount, Mod, Link and Title won't do anything without Name):<br>
<pre style="max-width: 484px">{{Grid
|Mod:Name,Amount
|mod=Default mod (useful for animations and layout templates)
|default=Image always shown under the main image
|align=Vertical Alignment
|link=Link override
|title=Title, removes link
|class=Adds additional classes to the .grid class
}}</pre>

== Examples ==
To display this image [[:File:Grid Raw Porkchop.png]] with an amount of 20 you would put: <code><nowiki>{{Grid|Raw Porkchop,20}}</nowiki></code>
;shows
{{Grid|Raw Porkchop,20}}

An amount of 2 - 999 is supported, anything else will not be displayed. Note, the automatic link is removed if <nowiki>{{SUBPAGENAME}}</nowiki> is the same as the item name. This is to help prevent self-links, use the link parameter to re-add the link if you need it.


If no image is specified, the background will be added on its own, this could be used to do layouts like so:
<pre style="width:550px">{{Grid|TNT}}{{Grid|TNT}}{{Grid}}{{Grid}}{{Grid|TNT}}{{Grid|TNT}}<br>
{{Grid|TNT}}{{Grid|TNT}}{{Grid}}{{Grid}}{{Grid|TNT}}{{Grid|TNT}}<br>
{{Grid}}{{Grid}}{{Grid|TNT}}{{Grid|TNT}}{{Grid}}{{Grid}}<br>
{{Grid}}{{Grid|TNT}}{{Grid|TNT}}{{Grid|TNT}}{{Grid|TNT}}{{Grid}}<br>
{{Grid}}{{Grid|TNT}}{{Grid|TNT}}{{Grid|TNT}}{{Grid|TNT}}{{Grid}}<br>
{{Grid}}{{Grid|TNT}}{{Grid}}{{Grid}}{{Grid|TNT}}{{Grid}}</pre>
;shows
{{Grid|TNT}}{{Grid|TNT}}{{Grid}}{{Grid}}{{Grid|TNT}}{{Grid|TNT}}<br>
{{Grid|TNT}}{{Grid|TNT}}{{Grid}}{{Grid}}{{Grid|TNT}}{{Grid|TNT}}<br>
{{Grid}}{{Grid}}{{Grid|TNT}}{{Grid|TNT}}{{Grid}}{{Grid}}<br>
{{Grid}}{{Grid|TNT}}{{Grid|TNT}}{{Grid|TNT}}{{Grid|TNT}}{{Grid}}<br>
{{Grid}}{{Grid|TNT}}{{Grid|TNT}}{{Grid|TNT}}{{Grid|TNT}}{{Grid}}<br>
{{Grid}}{{Grid|TNT}}{{Grid}}{{Grid}}{{Grid|TNT}}{{Grid}}


A mod image is specified with the Mod: section of the name (or by setting a default mod using the mod parameter). The image link will then link to the mod sub-page allowing correct linking of mod images. The uploaded image name should by uploaded as <tt>Grid <Itemname> (<Modname>).png</tt> and should be added to the [[:Category:Grid mods|Grid mods]] category, which prevents them from being confused with official Minecraft items.<br>
For example, to display this mod image [[:File:Grid Bronze Sword (IndustrialCraft).png]]: <code><nowiki>{{Grid|IndustrialCraft:Bronze Sword}}</nowiki></code> (or <code><nowiki>{{Grid|mod=IndustrialCraft|Bronze Sword}}</nowiki></code>)
;shows
{{Grid|IndustrialCraft:Bronze Sword}}


Grids can be animated with a theoretically unlimited amount of frames, between mod items and vanilla items. Frames are separated by semi-colons (;).
<code><nowiki>{{Grid|Dirt;TNT,64;IndustrialCraft:Bronze Sword,6;;Grass Block,5;Sand;Gold Helmet,12;IndustrialCraft:Bronze Helmet,2;IndustrialCraft:Copper,50;Redstone Dust}}</nowiki></code>
;shows
{{Grid|Dirt;TNT,64;IndustrialCraft:Bronze Sword,6;;Grass Block,5;Sand;Gold Helmet,12;IndustrialCraft:Bronze Helmet,2;IndustrialCraft:Copper,50;Redstone Dust}}

As you can see, the mod had to be specified for each mod frame, this is where the default mod parameter is useful. <code><nowiki>{{Grid|mod=IndustrialCraft|Bronze Sword,6;;Bronze Helmet,12;Copper,50;Copper Dust}}</nowiki></code>
;shows
{{Grid|mod=IndustrialCraft|Bronze Sword,6;;Bronze Helmet,12;Copper,50;Copper Dust}}

To use a vanilla minecraft item when a default mod is set, use vanilla (shortcut v) as the mod. <code><nowiki>{{Grid|mod=IndustrialCraft|Vanilla:Dirt;vanilla:TNT,64;Bronze Sword,6;;V:Grass Block,5;v:Sand;v:Gold Helmet,12;Bronze Helmet,2;Copper,50;v:Redstone Dust}}</nowiki></code>
;shows
{{Grid|mod=IndustrialCraft|Vanilla:Dirt;vanilla:TNT,64;Bronze Sword,6;;V:Grass Block,5;v:Sand;v:Gold Helmet,12;Bronze Helmet,2;Copper,50;v:Redstone Dust}}

Multiple mods and vanilla minecraft items can be combined in a single animation.



Align uses the [http://www.w3.org/wiki/CSS/Properties/vertical-align vertical-align] CSS property. For example to align to the middle:
<code><nowiki>Smells like {{Grid|Raw Porkchop|align=middle}} in here!</nowiki></code>
;shows
Smells like {{Grid|Raw Porkchop|align=middle}} in here!


Default is always shown and is placed under the image. <code><nowiki>{{Grid|default=layout Brewing Empty}}{{Grid|Splash Mundane Potion|default=layout Brewing Empty}}</nowiki></code>
;shows
{{Grid|default=layout Brewing Empty}}{{Grid|Splash Mundane Potion|default=layout Brewing Empty}}


To change the link from the image name put: <code><nowiki>{{Grid|Charcoal|link=Coal#Charcoal}}</nowiki></code>
;shows
{{Grid|Charcoal|link=Coal#Charcoal}}


To remove the link, set link to none: <code><nowiki>{{Grid|Charcoal|link=none}}</nowiki></code>
;shows
{{Grid|Charcoal|link=none}}

Note that this retains the title.


To add a different title, put: <code><nowiki>{{Grid|Raw Porkchop|title=Smelly Pork}}</nowiki></code>
;shows
{{Grid|Raw Porkchop|title=Smelly Porkchop}}


To remove the title, set title to none: <code><nowiki>{{Grid|Raw Porkchop|title=none}}</nowiki></code>
;shows
{{Grid|Raw Porkchop|title=none}}

Note that setting title will remove the link, due to a limitation in the software.

{{Grid/Available images}}

== Other templates ==
These templates implement this template into a GUI screen which mimics how it would look in Minecraft. Thus, they have mostly the same features as this template.
{{Grid/See also}}

{{doc/end}}<noinclude>
[[fr:Modèle:Grille/doc]]
</noinclude>
2712
ediciones

Menú de navegación