7 Days to Die Wiki
 
(Une révision intermédiaire par le même utilisateur non affichée)
Ligne 1 : Ligne 1 :
<includeonly><span class="grid {{{class|}}}" {{ #if: {{{align|}}} | style="vertical-align: {{{align}}}" }}><span class="border"><span>{{
+
<includeonly><span class="grid {{{class|}}}" {{#if: {{{align|}}} | style="vertical-align: {{{align}}}" }}><span class="border"><span>{{#if: {{{default|}}} | <span class="default-image">[[File:{{{default}}}.png|70px|alt=|link=]]</span> }}{{#if: {{#pos: {{{1}}} | ; }} | <span class="animated" data-imgs="{{{1}}}" {{#if: {{{mod|}}} | data-mod="{{{mod}}}" }}> }}{{
#if: {{{default|}}} | <span class="default-image">[[File:{{{default}}}.png|70px|alt=|link=]]</span>
 
}}{{#if: {{#pos: {{{1}}} | ; }} | <span class="animated" data-imgs="{{{1}}}" {{#if: {{{mod|}}} | data-mod="{{{mod}}}" }}> }}{{
 
 
#vardefine: f | {{#explode: {{{1|}}} | ; }}
 
#vardefine: f | {{#explode: {{{1|}}} | ; }}
 
}}{{
 
}}{{
Ligne 73 : Ligne 71 :
 
| <br>
 
| <br>
 
}}</span>{{
 
}}</span>{{
#if: {{#pos: {{{1}}} | ; }} | </span> }}</span></span></span></includeonly>
+
#if: {{#pos: {{{1}}} | ; }} | </span> }}</span></span></span></includeonly><noinclude>
{{/doc}}<noinclude>
+
{{/doc}}
 
[[Catégorie:Modèles d'image]]
 
[[Catégorie:Modèles d'image]]
   

Version actuelle datée du 9 décembre 2014 à 02:28

Template-info.png Documentation


Cet article doit être traduit. Vous pouvez aider 7 Days to Die Wiki, en le traduisant.


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):

{{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
}}

Inputs

Not all inputs (crafting ingredients) have filenames which match the item, especially for items whose names contain more than one word. For those items, add them to the {{Icon to item}} template. Just add the items you need to the list that follows, using this format: |Filename = Item Name

For example
      |PlantAloe = Aloe

Examples

To display this image File:Pork.png with an amount of 20 you would put: {{Grid|Pork,20}}

shows

PorkBoiled20

An amount of 2 - 999 is supported, anything else will not be displayed. Note, the automatic link is removed if {{SUBPAGENAME}} 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:

{{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}}
shows

TntTnt

TntTnt
TntTnt

TntTnt


TntTnt



TntTntTntTnt


TntTntTntTnt


Tnt

Tnt

Align uses the vertical-align CSS property. For example to align to the middle: Smells like {{Grid|Blueberries|align=middle}} in here!

shows

Smells like Blueberries in here!

To change the link from the image name put: {{Grid|Coal|link=Coal#Crafting}}

shows

Coal