Difference between revisions of "Template:MapCardSmall"

From comp.tf
Jump to navigation Jump to search
(Small version of map cards)
 
(Remove padding for easier legibility with smaller template)
 
Line 1: Line 1:
<includeonly>{| style="border:1px solid #aaa; padding:1px; border-spacing:0; margin:1em 0; text-align:center; position:relative; background-color:#f9f9f9"
+
<includeonly>{| style="border:1px solid #aaa; border-spacing:0; margin:1em 0; text-align:center; position:relative; background-color:#f9f9f9"
 
|+ style="font-weight:bold" | [[{{{1|}}}]]{{#if:{{{4|}}}|<sup style="font-weight:normal">{{{4|}}}</sup>|}}
 
|+ style="font-weight:bold" | [[{{{1|}}}]]{{#if:{{{4|}}}|<sup style="font-weight:normal">{{{4|}}}</sup>|}}
 
  | class="comptf-cardbg mapcard-img" | [[File:{{#if:{{{3|}}}|{{{3|}}}|{{#ifexist:File:{{{1|}}}.jpg|{{{1|}}}.jpg|{{#ifexist:File:{{{1|}}}.png|{{{1|}}}.png}}}}}}|center|100px|link={{{1|}}}]]
 
  | class="comptf-cardbg mapcard-img" | [[File:{{#if:{{{3|}}}|{{{3|}}}|{{#ifexist:File:{{{1|}}}.jpg|{{{1|}}}.jpg|{{#ifexist:File:{{{1|}}}.png|{{{1|}}}.png}}}}}}|center|100px|link={{{1|}}}]]
 
<div class="comptf-cardfg" style="display:none; position:absolute; bottom:1px; right:1px; left:1px; background-color:rgba(249,249,249,0.9); padding-bottom:1px"><small><code>{{{2|}}}</code></small></div>
 
<div class="comptf-cardfg" style="display:none; position:absolute; bottom:1px; right:1px; left:1px; background-color:rgba(249,249,249,0.9); padding-bottom:1px"><small><code>{{{2|}}}</code></small></div>
 
|}</includeonly><noinclude>{{Documentation}}[[Category:Template]][[Category:Templates]]</noinclude>
 
|}</includeonly><noinclude>{{Documentation}}[[Category:Template]][[Category:Templates]]</noinclude>

Latest revision as of 00:39, 1 October 2022

(view - edit) Documentation

Template:MapCardSmall displays a smaller version of a MapCard, a rectangular card containing a map image. The image size is 100x56. Usage is the same except for the name:

Usage

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

{{MapCardSmall |Mojave|cp_mojave_b2}}

Mojave
Mojave.jpg

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

Mojave2
Reckoner.jpg