Difference between revisions of "Template:MapInfoBox"

From Dungeon Defenders 2 Wiki
Jump to: navigation, search
(Reformatting back end code)
(Formatting improvements to the template and improving documentation)
Line 1: Line 1:
<div style="float:right; border:1px solid; margin:5px; text-align:center; margin-bottom:35vh;">
+
{{#if:{{{Description|}}}
[[<!---
+
    |<div style="padding: 0em 2em 0em 1em; margin: 1em 0em 1em 4em; border-left: 1px solid silver;">
--->{{#ifexist: {{{Minimap}}}
+
        <div style="position: absolute; margin-top: -0.2em; margin-left: -0.8em; font: bold 5em Times New Roman, Times, Georgie, serif; color: silver;">“</div>
        | {{{Minimap}}}
+
        <p style="font-size:1.3em">{{{Description}}}</p>
        | {{#ifexist: File:Minimap_{{{MapName}}}.png
+
    </div>
            | File:Minimap_{{{MapName}}}.png
+
}}
            | File:Minimap_The_Gates_Of_Dragonfall.png
+
<div style="float:right; border:1px solid; margin:5px; text-align:center; margin-bottom:35vh; padding: 5px;">
        }}
+
{{#ifexist: {{{Minimap}}}
    }}<!--
+
    | [[{{{Minimap}}}|250px]]
-->|250px]]
+
    | {{#ifexist: File:Minimap_{{{MapName}}}.png
<p style="text-align:center; margin:4px; font-size: 1.25em"><b>{{{MapName}}}</b></p>
+
        | [[File:Minimap_{{{MapName}}}.png|250px]]
 +
        | [[File:Minimap_The_Gates_Of_Dragonfall.png|250px]]
 +
    }}
 +
}}
 +
<p style="text-align:center; margin:4px; font-size: 1.25em"><b>{{{MapName|Map Name}}}</b></p>
 
<hr>
 
<hr>
 
{| cellpadding="2" style="border-collapse:collapse;" width="100%"
 
{| cellpadding="2" style="border-collapse:collapse;" width="100%"
 
|-
 
|-
| style="padding:4px; text-align:right;"| Main Cores:
+
| style="width:45%" | <!--Sets the width for the 1st column-->
| style="padding:4px; text-align:left;" | {{{MCores}}}
+
| style="width:55%" | <!--Sets the width for the 2nd column-->
 
|-
 
|-
| style="padding:4px; text-align:right;"| Sub Cores:
+
| style="font-size: 105%; text-align: right;" | '''Main Cores:'''
| style="padding:4px; text-align:left;" | {{{SCores}}}
+
|{{{MCores|?}}}
 
|-
 
|-
| style="padding:4px; text-align:right;"| Ground Lanes:
+
| style="font-size: 105%; text-align: right;" | '''Sub Cores:'''
| style="padding:4px; text-align:left;" | {{{GLanes}}}
+
|{{{SCores|?}}}
 
|-
 
|-
| style="padding:4px; text-align:right;"| Air Lanes:
+
| style="font-size: 105%; text-align: right;" | '''Ground Lanes:'''
| style="padding:4px; text-align:left;" | {{{ALanes}}}
+
|{{{GLanes|?}}}
 
|-
 
|-
| style="padding:4px; text-align:right;"| Defense Units:
+
| style="font-size: 105%; text-align: right;" | '''Air Lanes:'''
| style="padding:4px; text-align:left;" | {{{DU}}}
+
|{{{ALanes|?}}}
 
|-
 
|-
| style="padding:4px; text-align:right;"| Region:
+
| style="font-size: 105%; text-align: right;" | '''Defense Units:'''
| style="padding:4px; text-align:left;" | {{{Region}}}
+
|{{{DU|?}}}
 +
|-
 +
| style="font-size: 105%; text-align: right;" | '''Region:'''
 +
|{{{Region|?}}}
 
|}
 
|}
</div>
+
</div><!--
{{#if:{{{Description|}}}
+
 
    |<div style="padding: 0em 2em 0em 1em; margin: 1em 0em 1em 4em; border-left: 1px solid silver;">
+
--><noinclude>
        <div style="position: absolute; margin-top: -0.2em; margin-left: -{{{icon-size|0.8em}}}; font: bold 5em Times New Roman, Times, Georgie, serif; color: silver;">“</div>
 
        <p style="font-size:1.3em">{{{Description}}}</p>
 
    </div>
 
    |
 
}}
 
  
<noinclude>
 
 
===Parameters===
 
===Parameters===
 
{| border="1" style="border-collapse:collapse;"
 
{| border="1" style="border-collapse:collapse;"
Line 50: Line 51:
 
| MapName || Name of the map.
 
| MapName || Name of the map.
 
|-
 
|-
| Description || Description of the map.
+
| Description || In-game description of the map.
 
|-
 
|-
 
| MCores || Total amount of Main Cores.
 
| MCores || Total amount of Main Cores.
Line 66: Line 67:
  
 
===Example===
 
===Example===
<code><nowiki>{{MapInfoBox  
+
{| style="width:80%;"
| Minimap=File:Minimap_The_Gates_Of_Dragonfall.png
+
! style="font-size:150%; width: 50%;" | Wiki Text
| MapName=The Gates of Dragonfall
+
! style="font-size:150%; width: 50%;" | Result
| Description=Squire, put a description here!
+
|-
| MCores=1  
+
|<div style="display: flex; justify-content: center;"><!---
| SCores=0  
+
---><code style="display: table; white-space: pre-wrap;"><!---
| GLanes=3  
+
    ---><nowiki>
| ALanes=2  
+
 
| DU=600
+
            {{MapInfoBox  
| Region=Dragonfall Town
+
            | Minimap=File:Minimap_The_Gates_Of_Dragonfall.png        
}}</nowiki></code> produces the following:
+
            | MapName=The Gates of Dragonfall
 +
            | Description=Squire, put a description here!
 +
            | MCores=1  
 +
            | SCores=0  
 +
            | GLanes=3  
 +
            | ALanes=2  
 +
            | DU=600
 +
            | Region=Dragonfall Town
 +
            }}
 +
 
 +
        </nowiki><!---
 +
---></code>
 +
</div>
 +
|<div style="display: flex; justify-content: center;">
 +
    {{MapInfoBox
 +
    | Minimap=File:Minimap_The_Gates_Of_Dragonfall.png
 +
    | MapName=The Gates of Dragonfall
 +
    | Description=Squire, put a description here!
 +
    | MCores=1
 +
    | SCores=0
 +
    | GLanes=3
 +
    | ALanes=2
 +
    | DU=600
 +
    | Region=Dragonfall Town
 +
    }}
 +
</div>
 +
|}
  
{{MapInfoBox
 
| Minimap=File:Minimap_The_Gates_Of_Dragonfall.png
 
| MapName=The Gates of Dragonfall
 
| Description=Squire, put a description here!
 
| MCores=1
 
| SCores=0
 
| GLanes=3
 
| ALanes=2
 
| DU=600
 
| Region=Dragonfall Town
 
}}
 
 
</noinclude>
 
</noinclude>

Revision as of 18:36, 9 February 2023

250px

Map Name


Main Cores: ?
Sub Cores: ?
Ground Lanes: ?
Air Lanes: ?
Defense Units: ?
Region: ?

Parameters

Parameter Description
Minimap File reference to the Minimap image. File:Minimap_{{{MapName}}}.png will be used if this parameter is not set.
MapName Name of the map.
Description In-game description of the map.
MCores Total amount of Main Cores.
SCores Total amount of Sub Cores.
GLanes Total amount of Ground Lanes.
ALanes Total amount of Air Lanes.
DU Defense Unit Limit.
Region The region the map belongs to.

Example

Wiki Text Result
{{MapInfoBox | Minimap=File:Minimap_The_Gates_Of_Dragonfall.png | MapName=The Gates of Dragonfall | Description=Squire, put a description here! | MCores=1 | SCores=0 | GLanes=3 | ALanes=2 | DU=600 | Region=Dragonfall Town }}

Minimap The Gates of Dragonfall.png

The Gates of Dragonfall


Main Cores: 1
Sub Cores: 0
Ground Lanes: 3
Air Lanes: 2
Defense Units: 600
Region: Dragonfall Town

Squire, put a description here!