Difference between revisions of "Template:Canada provinces map"

From blackwiki
Jump to navigation Jump to search
imported>Primefac
m (Protected "Template:Canada provinces map": semi-protection of high-usage templates to combat systematic vandalism ([Edit=Require autoconfirmed or confirmed access] (indefinite) [Move=Require autoconfirmed or confirmed access] (indef...)
imported>MapGrid
(New map that does not clip or truncate Lake Erie and Lake Michigan)
 
Line 6: Line 6:
 
   }}">
 
   }}">
 
<div class="{{#ifeq:{{{border|}}}|none||thumbinner}}" style="width:{{#expr:{{#invoke:string|replace|{{if empty|{{{width|}}}|280px}}|px|}}|+2}}px"><div style="position: relative; width:{{if empty|{{{width|}}}|280px}};">
 
<div class="{{#ifeq:{{{border|}}}|none||thumbinner}}" style="width:{{#expr:{{#invoke:string|replace|{{if empty|{{{width|}}}|280px}}|px|}}|+2}}px"><div style="position: relative; width:{{if empty|{{{width|}}}|280px}};">
<div style="position: absolute; font-size: 88%; left: 7.4%; top: 59.4%; padding: 0;">'''{{#if:{{{BC|}}}|[[{{{BC}}}|BC]]|{{#ifexist:{{{prefix|}}} British Columbia|[[{{{prefix|}}} British Columbia|BC]]|BC}}}}'''</div>
+
<div style="position: absolute; font-size: 88%; left: 7.9%; top: 59.4%; padding: 0;">'''{{#if:{{{BC|}}}|[[{{{BC}}}|BC]]|{{#ifexist:{{{prefix|}}} British Columbia|[[{{{prefix|}}} British Columbia|BC]]|BC}}}}'''</div>
 
<div style="position: absolute; font-size: 88%; left: 18.4%; top: 62.2%; padding: 0;">'''{{#if:{{{AB|}}}|[[{{{AB}}}|AB]]|{{#ifexist:{{{prefix|}}} Alberta|[[{{{prefix|}}} Alberta|AB]]|AB}}}}'''</div>
 
<div style="position: absolute; font-size: 88%; left: 18.4%; top: 62.2%; padding: 0;">'''{{#if:{{{AB|}}}|[[{{{AB}}}|AB]]|{{#ifexist:{{{prefix|}}} Alberta|[[{{{prefix|}}} Alberta|AB]]|AB}}}}'''</div>
 
<div style="position: absolute; font-size: 88%; left: 27.8%; top: 67%; padding: 0;">'''{{#if:{{{SK|}}}|[[{{{SK}}}|SK]]|{{#ifexist:{{{prefix|}}} Saskatchewan|[[{{{prefix|}}} Saskatchewan|SK]]|SK}}}}'''</div>
 
<div style="position: absolute; font-size: 88%; left: 27.8%; top: 67%; padding: 0;">'''{{#if:{{{SK|}}}|[[{{{SK}}}|SK]]|{{#ifexist:{{{prefix|}}} Saskatchewan|[[{{{prefix|}}} Saskatchewan|SK]]|SK}}}}'''</div>
Line 15: Line 15:
 
<div style="position: absolute; font-size: 88%; left: 83.9%; top: 70.8%; padding: 0;">'''{{#if:{{{PE|}}}|[[{{{PE}}}|PE]]|{{#ifexist:{{{prefix|}}} Prince Edward Island|[[{{{prefix|}}} Prince Edward Island|PE]]|PE}}}}'''</div>
 
<div style="position: absolute; font-size: 88%; left: 83.9%; top: 70.8%; padding: 0;">'''{{#if:{{{PE|}}}|[[{{{PE}}}|PE]]|{{#ifexist:{{{prefix|}}} Prince Edward Island|[[{{{prefix|}}} Prince Edward Island|PE]]|PE}}}}'''</div>
 
<div style="position: absolute; font-size: 88%; left: 86.8%; top: 77%; padding: 0;">'''{{#if:{{{NS|}}}|[[{{{NS}}}|NS]]|{{#ifexist:{{{prefix|}}} Nova Scotia|[[{{{prefix|}}} Nova Scotia|NS]]|NS}}}}'''</div>
 
<div style="position: absolute; font-size: 88%; left: 86.8%; top: 77%; padding: 0;">'''{{#if:{{{NS|}}}|[[{{{NS}}}|NS]]|{{#ifexist:{{{prefix|}}} Nova Scotia|[[{{{prefix|}}} Nova Scotia|NS]]|NS}}}}'''</div>
<div style="position: absolute; font-size: 88%; left: 90.8%; top: 63.8%; padding: 0;">'''{{#if:{{{NL|}}}|[[{{{NL}}}|NL]]|{{#ifexist:{{{prefix|}}} Newfoundland and Labrador|[[{{{prefix|}}} Newfoundland and Labrador|NL]]|NL}}}}'''</div>
+
<div style="position: absolute; font-size: 88%; left: 90.4%; top: 62.7%; padding: 0;">'''{{#if:{{{NL|}}}|[[{{{NL}}}|NL]]|{{#ifexist:{{{prefix|}}} Newfoundland and Labrador|[[{{{prefix|}}} Newfoundland and Labrador|NL]]|NL}}}}'''</div>
<div style="position: absolute; font-size: 88%; left: 7%; top: 32.5%; padding: 0;">'''{{#if:{{{YT|{{{YU|}}}}}}|[[{{{YT|{{{YU}}}}}}|YT]]|{{#ifexist:{{{prefix|}}} Yukon|[[{{{prefix|}}} Yukon|YT]]|YT}}}}'''</div>
+
<div style="position: absolute; font-size: 88%; left: 8%; top: 32.5%; padding: 0;">'''{{#if:{{{YT|{{{YU|}}}}}}|[[{{{YT|{{{YU}}}}}}|YT]]|{{#ifexist:{{{prefix|}}} Yukon|[[{{{prefix|}}} Yukon|YT]]|YT}}}}'''</div>
 
<div style="position: absolute; font-size: 88%; left: 21.4%; top: 40.2%; padding: 0;">'''{{#if:{{{NT|}}}|[[{{{NT}}}|NT]]|{{#ifexist:{{{prefix|}}} {{#if:{{{the|}}}|the}} Northwest Territories|[[{{{prefix|}}} {{#if:{{{the|}}}|the}} Northwest Territories|NT]]|NT}}}}'''</div>
 
<div style="position: absolute; font-size: 88%; left: 21.4%; top: 40.2%; padding: 0;">'''{{#if:{{{NT|}}}|[[{{{NT}}}|NT]]|{{#ifexist:{{{prefix|}}} {{#if:{{{the|}}}|the}} Northwest Territories|[[{{{prefix|}}} {{#if:{{{the|}}}|the}} Northwest Territories|NT]]|NT}}}}'''</div>
 
<div style="position: absolute; font-size: 88%; left: 39.3%; top: 42.9%; padding: 0;">'''{{#if:{{{NU|}}}|[[{{{NU}}}|NU]]|{{#ifexist:{{{prefix|}}} Nunavut|[[{{{prefix|}}} Nunavut|NU]]|NU}}}}'''</div>
 
<div style="position: absolute; font-size: 88%; left: 39.3%; top: 42.9%; padding: 0;">'''{{#if:{{{NU|}}}|[[{{{NU}}}|NU]]|{{#ifexist:{{{prefix|}}} Nunavut|[[{{{prefix|}}} Nunavut|NU]]|NU}}}}'''</div>
[[File:{{if empty|{{{map|{{{Map|}}}}}}|Blank map of Canada.svg}}|{{if empty|{{{width|}}}|280px}}{{#if:{{{map|{{{Map|}}}}}}||{{!}}link=}}|Canadian Provinces and Territories]]</div>{{#if:{{{caption|}}}|<div class="thumbcaption">{{{caption}}}</div>}}</div>
+
[[File:{{if empty|{{{map|{{{Map|}}}}}}|Canada location map 2 - lite.svg}}|{{if empty|{{{width|}}}|280px}}{{#if:{{{map|{{{Map|}}}}}}||{{!}}link=}}|Canadian Provinces and Territories]]</div>{{#if:{{{caption|}}}|<div class="thumbcaption">{{{caption}}}</div>}}</div>
 
</div>{{#ifeq:{{{align|}}}|center|</div>}}<noinclude>
 
</div>{{#ifeq:{{{align|}}}|center|</div>}}<noinclude>
 
<!--
 
<!--

Latest revision as of 23:07, 22 November 2020

<div class="thumbinner" style="width:Expression error: Unexpected < operator.px"><div style="position: relative; width:Script error: No such module "If empty".;">

BC
AB
SK
MB
ON
QC
NB
PE
NS
NL
YT
NT
NU
[[File:Script error: No such module "If empty".|Script error: No such module "If empty".|link=|Canadian Provinces and Territories]]
Template documentation[view] [edit] [history] [purge]

Usage

Add {{Canada provinces map}} in articles pertaining provinces and territories of Canada.

Simple syntax:

{{Canada provinces map
|align = right
|map=
|prefix = 
|width = 
}}

A Canada provinces map with linked labels will be rendered.

Complete syntax:

{{Canada provinces map
|align = right
|map=
|prefix = 
|BC = British Columbia
|
|SK = Saskatchewan
|MB = Manitoba
|
|
|NB = New Brunswick
|PE = Prince Edward Island
|NS = Nova Scotia
|NL = Newfoundland and Labrador
|
|
|
|width = 220px
|border = <!-- none -->
|caption = 
}}

Parameters

The prefix and XY parameters are used to adjust the wikilinks for the provinces and territories.

Parameter Default Usage
align right Possible values are left, right, center, and none
map Canada-provinces layout.png Any image can be used, but be careful to make sure the labels are aligned with the provinces and territories
prefix blank text to use to prefix each link (for example, Geography of)
BC British Columbia name of an article (overrides the prefix parameter)
SK Saskatchewan name of an article (overrides the prefix parameter)
MB Manitoba name of an article (overrides the prefix parameter)
NB New Brunswick name of an article (overrides the prefix parameter)
PE Prince Edward Island name of an article (overrides the prefix parameter)
NS Nova Scotia name of an article (overrides the prefix parameter)
NL Newfoundland and Labrador name of an article (overrides the prefix parameter)
width 280px
border blank set to none to remove the border (which is useful when there is no image, and the map is embedded in a table or sidebar)
caption blank use to add a caption to the image

See also