Difference between revisions of "Template:Grid/doc"
(Oh this is all very silly. But useful!) |
|||
(6 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{doc/start}} | {{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 {{{1}}}.png, within it. | 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 {{{1}}}.png, within it. | ||
+ | |||
+ | Imported from the Minecraft Wiki. | ||
== Usage == | == Usage == | ||
Put <code><nowiki>{{Grid|Name}}}</nowiki></code> where you want the image. | Put <code><nowiki>{{Grid|Name}}}</nowiki></code> where you want the image. | ||
You can also specify the [http://www.w3.org/wiki/CSS/Properties/vertical-align vertical alignment] of the text with the image. | You can also specify the [http://www.w3.org/wiki/CSS/Properties/vertical-align vertical alignment] of the text with the image. | ||
− | <code><nowiki>{{Grid|Name|Vertical Alignment}}</nowiki></code> | + | <code><nowiki>{{Grid|Name|Vertical Alignment|link=Optional link override|title=Optional title, is overridden by link titles}}</nowiki></code> |
== Examples == | == Examples == | ||
Line 14: | Line 16: | ||
If no image is specified, the background will be added on its own, allowing you to do layouts like so: | If no image is specified, the background will be added on its own, allowing you to do layouts like so: | ||
− | <pre>{{Grid|TNT}}{{Grid|TNT}}{{Grid}}{{Grid}}{{Grid|TNT}}{{Grid|TNT}}<br /> | + | <pre style="width:570px">{{Grid|TNT}}{{Grid|TNT}}{{Grid}}{{Grid}}{{Grid|TNT}}{{Grid|TNT}}<br /> |
{{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}}{{Grid|TNT}}{{Grid|TNT}}{{Grid}}{{Grid}}<br /> | ||
Line 32: | Line 34: | ||
;which will result in: | ;which will result in: | ||
Smells like {{Grid|Raw Porkchop|middle}} in here! | Smells like {{Grid|Raw Porkchop|middle}} in here! | ||
+ | |||
+ | |||
+ | To change the link from the image name put: <code><nowiki>{{Grid|Charcoal (Item)|link=Coal#Charcoal}}</nowiki></code> | ||
+ | ;which will result in: | ||
+ | {{Grid|Charcoal (Item)|link=Coal#Charcoal}} | ||
+ | |||
+ | |||
+ | If |link= is left blank, the link will be removed which in turn removes the title automatically added by links.<br /> | ||
+ | To re-add the title, put: <code><nowiki>{{Grid|Raw Porkchop|link=|title=Smelly Pork}}</nowiki></code> | ||
+ | ;which will result in: | ||
+ | {{Grid|Raw Porkchop|link=|title=Smelly Porkchop}} | ||
+ | |||
+ | Note that if a link is present, its title will override whatever title is specified. | ||
{{Grid/Available images}} | {{Grid/Available images}} | ||
Line 37: | Line 52: | ||
== Other templates == | == Other templates == | ||
These templates implement the grid template into a GUI screen which mimics how it would look in Minecraft with CSS. | These templates implement the grid template into a GUI screen which mimics how it would look in Minecraft with CSS. | ||
− | + | {{Grid/See also}} | |
− | + | ||
{{doc/end}} | {{doc/end}} |
Latest revision as of 07:44, 18 December 2011
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 {{{1}}}.png, within it.
Imported from the Minecraft Wiki.
Usage
Put {{Grid|Name}}}
where you want the image.
You can also specify the vertical alignment of the text with the image.
{{Grid|Name|Vertical Alignment|link=Optional link override|title=Optional title, is overridden by link titles}}
Examples
To display this image you would put: {{Grid|Raw Porkchop}}
- which will result in
If no image is specified, the background will be added on its own, allowing you to do layouts like so:
{{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}}
- which will result in
To align text to the middle on the same line as the image you would put: Smells like {{Grid|Raw Porkchop|middle}} in here!
- which will result in
To change the link from the image name put: {{Grid|Charcoal (Item)|link=Coal#Charcoal}}
- which will result in
If |link= is left blank, the link will be removed which in turn removes the title automatically added by links.
To re-add the title, put: {{Grid|Raw Porkchop|link=|title=Smelly Pork}}
- which will result in
Note that if a link is present, its title will override whatever title is specified.
Available images
Blocks
Items
Put uploaded images in Category:Grid images.
Other templates
These templates implement the grid template into a GUI screen which mimics how it would look in Minecraft with CSS.
- {{Grid}}
- {{Grid/Crafting Table}}
- {{Grid/Furnace}}
- {{Grid/Brewing Stand}}
This is the documentation page, it should be transcluded into the main template page. See Template:Doc for more information.