Difference between revisions of "Template:MapCard"

From comp.tf
Jump to navigation Jump to search
m
(Update from Template:MapCardTest)
Line 2: Line 2:
 
<div style="width:248px;">
 
<div style="width:248px;">
 
<center>'''[[{{{map|}}}]]'''</center>
 
<center>'''[[{{{map|}}}]]'''</center>
<div style="width:248px; border:1px solid #aaa; background-color: #f9f9f9;">
+
<div style="width:248px; border:1px solid #aaa; background-color:#f9f9f9;">
<div style="border:2px solid #f9f9f9;">[[File:{{{image|Generic_Logo.png}}}|center|244px|link={{{map|}}}]]</div>
+
<div style="height:137px; border:2px solid #f9f9f9;"><div style="z-index:1; position:absolute;">[[File:{{{image|Generic_Logo.png}}}|center|244px|link={{{map|}}}]]</div>
<center style="border-top:1px solid #aaa; font-size:0.875em;>''{{{filename|}}}''</center>
+
<div style="width:244px; font-size:0.875em; z-index:2; position:absolute; margin-top:118px;">[[File:MapCard.png|center|link={{{map|}}}]]<center style="margin-top:-18px;>''{{{filename|}}}''</center></div>
 +
</div>
 
</div>
 
</div>
 
</div>
 
</div>
 
</includeonly><noinclude>{{documentation}}[[Category:Template]][[Category:Templates]]</noinclude>
 
</includeonly><noinclude>{{documentation}}[[Category:Template]][[Category:Templates]]</noinclude>

Revision as of 05:04, 1 April 2016

(view - edit) Documentation

Template:MapCard displays a 152x86px rectangular card containing a map image. For a smaller 100x56px image, you can use MapCardSmall.

Usage

{{MapCard |map|filename|image|superscript}}

  • map - name of the map. Displayed as the card's title/caption and image if no image parameter is entered. Is case-sensitive.
  • filename - optional, file name of the map. Displayed upon hovering. All letters should be lowercase.
  • image - optional, image of the map. Will override the image that is automatically shown by the map parameter. Should only be used if the image shown by the map parameter is not appropriate (e.g. shows an error, bad dimensions). Is not case-sensitive.
  • superscript - optional, adds a superscript after the map name. To use, you must also include the image parameter.

Examples

{{MapCard |Mojave}}

{{MapCard |Mojave|cp_mojave_b2|Reckoner.jpg|2}}