Difference between revisions of "Template:Minimap"

From FreewarWiki
Jump to: navigation, search
m
(-)
 
(10 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<includeonly>{{TN}}</includeonly>
 
 
 
<!-- Variablen-Setup
 
<!-- Variablen-Setup
-->{{MapMetaDatas|}}<!--
+
    Abstand Unterkante Felseninsel/Unterkante Belpharia-Inseln sind 12 Felder; *Height* entsprechend angepasst
-->{{#vardefine:Width|{{#expr:{{#var:BottomRightX}} - {{#var:TopLeftX}}}}}}<!--
+
-->{{MapsMetaData|}}<!--
-->{{#vardefine:Height|{{#expr:{{#var:BottomRightY}} - {{#var:TopLeftY}}}}}}<!--
 
-->{{#vardefine:narubiaWidth|{{#expr:{{#var:narubiaBottomRightX}} - {{#var:narubiaTopLeftX}}}}}}<!--
 
-->{{#vardefine:narubiaHeight|{{#expr:{{#var:narubiaBottomRightY}} - {{#var:narubiaTopLeftY}}}}}}<!--
 
-->{{#vardefine:iceisleWidth|{{#expr:{{#var:iceisleBottomRightX}} - {{#var:iceisleTopLeftX}}}}}}<!--
 
-->{{#vardefine:iceisleHeight|{{#expr:{{#var:iceisleBottomRightY}} - {{#var:iceisleTopLeftY}}}}}}<!--
 
 
-->{{#vardefine:prefix|{{#var:prefix{{{Area}}}}}}}<!--
 
-->{{#vardefine:prefix|{{#var:prefix{{{Area}}}}}}}<!--
  
    From this point onwards the original code
+
/* Start of the Code */
 +
 
 
-->
 
-->
{{#expandafter:div|class="minimap" style="position:relative; padding:1px; width:{{#expr:({{#var:Width}} + 3) * {{{Size|5}}}}}px; height:{{#expr:({{#var:Height}} + 3) * {{{Size|5}}}}}px; overflow:visible;"|
+
<div class="minimap" style="position:relative; padding:1px; width:{{#expr:({{#var:belphariaOffsetX}} + {{#var:belphariaWidth}} + 3) * {{{Size|5}}}}}px; height:{{#expr:({{#var:belphariaOffsetY}} + {{#var:belphariaHeight}} + 3) * {{{Size|5}}}}}px; overflow:visible;">
{{#expandafter:div|style="position:absolute; left:{{#expr:{{#var:OffsetX}} * {{{Size|5}}}}}px; top:{{#expr:{{#var:OffsetY}} * {{{Size|5}}}}}px;"|[[File:{{{File|Whole continent (automatically generated).jpg}}}|{{#expr:({{#var:Width}} + 3) * {{{Size|5}}}}}px]]<div style="position:absolute; left:0; top:0; right:0; bottom:0;"></div>}}
+
<div style="position:absolute; left:{{#expr:{{#var:OffsetX}} * {{{Size|5}}}}}px; top:{{#expr:{{#var:OffsetY}} * {{{Size|5}}}}}px;">[[Image:{{{Image|Gesamtkarte Kontinent (automatisch generiert).jpg}}}|{{#expr:({{#var:Width}} + 3) * {{{Size|5}}}}}px]]<div style="position:absolute; left:0; top:0; right:0; bottom:0;"></div></div>
{{#expandafter:div|style="position:absolute; left:{{#expr:{{#var:narubiaOffsetX}} * {{{Size|5}}}}}px; top:{{#expr:{{#var:narubiaOffsetY}} * {{{Size|5}}}}}px;"|[[File:{{{narubiaImage|Map Narubia (automatically generated).jpg}}}|{{#expr:({{#var:narubiaWidth}} + 3) * {{{Size|5}}}}}px]]<div style="position:absolute; left:0; top:0; right:0; bottom:0;"></div>}}
+
 
{{#expandafter:div|style="position:absolute; left:{{#expr:{{#var:eisinselOffsetX}} * {{{Size|5}}}}}px; top:{{#expr:{{#var:eisinselOffsetY}} * {{{Size|5}}}}}px;"|[[File:{{{eisinselBild|Map Ice Isle (automatically generated).jpg}}}|{{#expr:({{#var:eisinselWidth}} + 3) * {{{Size|5}}}}}px]]<div style="position:absolute; left:0; top:0; right:0; bottom:0;"></div>}}
+
<div style="position:absolute; left:{{#expr:{{#var:narubiaOffsetX}} * {{{Size|5}}}}}px; top:{{#expr:{{#var:narubiaOffsetY}} * {{{Size|5}}}}}px;">[[Image:{{{narubiaImage|Map Narubia (automatically generated).jpg}}}|{{#expr:({{#var:narubiaWidth}} + 3) * {{{Size|5}}}}}px]]<div style="position:absolute; left:0; top:0; right:0; bottom:0;"></div></div>
 +
 
 +
<div style="position:absolute; left:{{#expr:{{#var:itolosOffsetX}} * {{{Size|5}}}}}px; top:{{#expr:{{#var:itolosOffsetY}} * {{{Size|5}}}}}px;">[[Image:{{{itolosImage|Map Itolos (automatically generated).jpg}}}|{{#expr:({{#var:itolosWidth}} + 3) * {{{Size|5}}}}}px]]<div style="position:absolute; left:0; top:0; right:0; bottom:0;"></div></div>
 +
 
 +
<div style="position:absolute; left:{{#expr:{{#var:frozenislandOffsetX}} * {{{Size|5}}}}}px; top:{{#expr:{{#var:frozenislandOffsetY}} * {{{Size|5}}}}}px;">[[Image:{{{frozenislandImage|Map Frozen Island (automatically generated).jpg}}}|{{#expr:({{#var:frozenislandWidth}} + 3) * {{{Size|5}}}}}px]]<div style="position:absolute; left:0; top:0; right:0; bottom:0;"></div></div>
 +
 
 +
<div style="position:absolute; left:{{#expr:{{#var:belphariaOffsetX}} * {{{Size|5}}}}}px; top:{{#expr:{{#var:belphariaOffsetY}} * {{{Size|5}}}}}px;">[[Image:{{{belphariaImage|Map Belpharia Islands (automatically generated).jpg}}}|{{#expr:({{#var:belphariaWidth}} + 3) * {{{Size|5}}}}}px]]<div style="position:absolute; left:0; top:0; right:0; bottom:0;"></div></div>
 +
 
 +
<div style="position:absolute; left:{{#expr:{{#var:darkfrostislandOffsetX}} * {{{Size|5}}}}}px; top:{{#expr:{{#var:darkfrostislandOffsetY}} * {{{Size|5}}}}}px;">[[Image:{{{darkfrostislandImage|Map Darkfrost Island (automatically generated).jpg}}}|{{#expr:({{#var:darkfrostislandWidth}} + 3) * {{{Size|5}}}}}px]]<div style="position:absolute; left:0; top:0; right:0; bottom:0;"></div></div>
 +
 
 
{{{1}}}
 
{{{1}}}
}}
+
</div><noinclude>{{Documentation}}
 +
 
 +
[[Category:Map templates|{{PAGENAME}}]]
 +
 
 +
[[de:Vorlage:Minimap]]
 +
</noinclude>

Latest revision as of 04:01, 9 April 2018


Gesamtkarte Kontinent (automatisch generiert).jpg
Map Narubia (automatically generated).jpg
Map Itolos (automatically generated).jpg
Map Frozen Island (automatically generated).jpg
Map Belpharia Islands (automatically generated).jpg
Map Darkfrost Island (automatically generated).jpg

{{{1}}}


[Edit] Documentation

This template creates a minimap of Freewar, combining several image files into a single image.

Usage

This template can be include with {{Minimap|"1"|"Area"|"Size"|"Image"|"itolosImage"|"frozenislandImage"|"belphariaImage"}}.

Parameter

  • 1: Optional placeholder for own additions.
  • Area: Specifies an optional prefix for an area.
  • Size: Sets an alternative size, by default 5px.
  • Image: Specifies an alternate image file for the main continent of Freewar.
  • itolosImage: Sets an alternative image file for the area Itolos.
  • frozenislandImage: Sets an alternative image file for the area Frozen Island.
  • belphariaImage: Sets an alternative image file for the area Belpharia.