From Dark and Darker Wiki

No edit summary
(Created Item Infobox)
Line 1: Line 1:
<includeonly>
<includeonly>
<div class="itembox" style="width:90%;max-width:400px;{{#ifeq:{{{nofloat|}}}|1||float:right;}}">
<div style="width: 300px; background-color: rgb(var(--background-color),0.3); padding: 16px; max-width:470px; border:2px solid rgb(var(--rarity-{{#switch:{{{rarity|}}}
<div style="display: flex; flex-direction: column; align-items: center;">
|#default = {{{rarity}}}}}),0.5); {{#ifeq:{{{nofloat|}}}|1||float:right;}}">
{{Iconbox|{{{name}}}|caption=no|size=96px|nolink=1}}
<div style="display:flex; flex-direction:column; align-items:center;"class="itemboxheader">
<div style="display:flex; flex-direction:column; align-items:center;"class="itemboxheader">
<div>
{{#switch:{{{rarity|}}}
|0
|1
|2
|3
|4
|5
|6
|7 = {{Iconbox|{{{name}}}|image={{{name}}}.png|caption=no|size=150x150px|nolink=1}}
|#default = {{Iconbox|{{{name}}}|image={{{name}}}.png|caption=no|size=150x150px|nolink=1}}
}}<!--
        --></div>
        <div>
<div class="bold" style="margin-top:0px!important;font-size:22px;">{{{name}}}</div>
<div class="bold" style="margin-top:0px!important;font-size:22px;">{{{name}}}</div>
</div>
</div>
</div>
     </div>
      
<div class="line"></div>
<div class="line"></div>
     <div class="stats-container" style="display:grid;grid-template-columns: repeat(1, minmax(0, 1fr));"><!--
     <div style="display:grid;grid-template-columns: repeat(1, minmax(0, 1fr));"><!--
-->{{#if:{{{description|}}}|
-->{{#if:{{{effect|}}}|
<div class="grid-column: span 1 / span 1;display: grid; grid-template-columns: repeat(2, minmax(0, 1fr))">
<div class="stats-container" style="grid-column: span 1 / span 1;display: grid; grid-template-columns: repeat(2, minmax(0, 1fr))">
<div style="float: left; width: 30%; font-weight:bold; color:rgb(221,149,42);>Description</div>
<div style="font-weight:bold; color:rgb(245,226,133);">Effect</div>
<div style="float: left; width: 70%;">{{{description}}}</div>
        {{#if:{{{rarity|}}}
        |<div>{{{effect}}}</div>
        |<div>{{{effect}}}</div>}}
        </div>
|}}<!--
-->{{#if:{{{actiontime|}}}|
<div class="stats-container" style="grid-column: span 1 / span 1;display: grid; grid-template-columns: repeat(2, minmax(0, 1fr))">
<div style="font-weight:bold; color:rgb(245,226,133);">Action Time</div>
<div>{{{actiontime}}}</div>
</div>
</div>
|}}
|}}<!--
</div>
-->{{#if:{{{purchase-able|}}}|
</div>
<div class="stats-container" style="ggrid-column: span 1 / span 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr))"><!--
--><div style="font-weight:bold; color:rgb(245,226,133);">Purchase-able</div>
        <div style="display:flex; flex-direction:column;"><!--
        --><div>{{{purchase-able}}}</div><!--
--></div>
    </div>
|}}<!--
    --></div>
        </div>
</includeonly>
</includeonly>
<noinclude>
<noinclude>
== Usage ==
Creates an infobox for an Item.
This template can be used by entering the following onto a relevant page. Do not use this on your user page. It is reserved for content pages.


<pre>{{Infobox Item
== Example ==
|name        = Golden Key
 
|description = Use the Golden Key to find Legendary items
<table class="wikitable">
<tr>
<th>Code</th>
<th>Preview</th>
</tr>
    <tr>
<td style="padding: 20px 30px;">
<pre>
 
{{Infobox Item
|name                 = Bandage
|effect              = 8
|actiontime          = 6 seconds
|purchase-able       = [[Surgeon]]
}}</pre></td>
<td style="padding: 20px 30px;">
{{Infobox Item
|name                = Bandage
|effect              = 8
|actiontime          = 6 seconds
|purchase-able        = [[Surgeon]]
}}
}}
</pre>
</td>
</tr>
</table>
 
== All Options ==
 
The full list of options are listed below.


Results in:
<pre style="display: inline-block;">
{{Infobox Item
{{Infobox Item
|name       = Golden Key
|name                 = Bandage
|description = Use the Golden Key to find Legendary items
|effect              = 8
|actionspeed          = 6 seconds
|purchase-able        = [[Surgeon]]
}}
}}
</pre>
<templatedata>
{
"params": {
"name": {
"label": "Name",
"example": "Bandage",
"type": "string",
"required": true,
"suggested": true,
            "description": "The name of the item"
},
"effect": {
"label": "Effect",
"type": "string",
"suggested": true,
            "description": "Effect of the item at corresponding rarity"
},
"actiontime": {
"label": "Action Time",
"type": "string",
"suggested": true,
            "description": "Action Time of the item"
},
        "purchase-able": {
"label": "Purchase-able",
"type": "string",
"suggested": true,
            "description": "Purchase-able of the item"
           
},
"rarity": {
"label": "Rarity",
"type": "string",
"suggested": true,
            "description": "Rarity of the item"
},
"paramOrder": [
"name",
"effect",
"actiontime",
        "purchase-able",
        "rarity"
]
}
</templatedata></noinclude>

Revision as of 23:53, 8 February 2023


Creates an infobox for an Item.

Example

Code Preview

{{Infobox Item
|name                 = Bandage
|effect               = 8
|actiontime           = 6 seconds
|purchase-able        = [[Surgeon]]
}}
Bandage.png
Bandage
Effect
8
Action Time
6 seconds
Purchase-able


All Options

The full list of options are listed below.

{{Infobox Item
|name                 = Bandage
|effect               = 8
|actionspeed          = 6 seconds
|purchase-able        = [[Surgeon]]
}}

No description.

Template parameters

ParameterDescriptionTypeStatus
Namename

The name of the item

Example
Bandage
Stringrequired
Effecteffect

Effect of the item at corresponding rarity

Stringsuggested
Action Timeactiontime

Action Time of the item

Stringsuggested
Purchase-ablepurchase-able

Purchase-able of the item

Stringsuggested
Rarityrarity

Rarity of the item

Stringsuggested