Difference between revisions of "Template:GraticuleH"

From Geohashing
imported>Joannac
(Graticules split horizontally)
 
m (Replacing http://wiki.xkcd.com/wgh/index.php?title=Template:GraticuleH/Documentation&action=edit with {{canonicalurl:Template:GraticuleH/Documentation|action=edit}})
 
(6 intermediate revisions by one other user not shown)
Line 1: Line 1:
<table class="infobox" cellspacing="5" style="width: 22em; text-align: left; font-size: 88%; line-height: 1.5em; border: 1px solid #aaa; background-color: #f9f9f9; color: black; margin: 0.5em 0 0.5em 1em; padding: 0.2em; float: right; clear: right;">
+
<includeonly><table class="infobox" cellspacing="5" style="width: 22em; text-align: left; font-size: 88%; line-height: 1.5em; border: 1px solid #aaa; background-color: #f9f9f9; color: black; margin: 0.5em 0 0.5em 1em; padding: 0.2em; float: right; clear: right;">
{{#if:{{{maponly|}}}|| <!-- Put any extra headings below here. -->
+
{{#if:{{{maponly|}}}||<!-- Put any extra headings below here. -->
 
<tr>
 
<tr>
     <td style="text-align:left;width:7em" width="7em"><b>{{#if:{{{nww|}}} | {{{nww}}} | - }}</b></td>
+
     <td style="text-align:left;width:7em">'''{{{nw|-}}}'''</td>
     <td style="text-align:left;width:7em" width="7em"><b>{{#if:{{{nw|}}} | {{{nw}}} | - }}</b></td>
+
     <td style="text-align:center;width:8em">'''{{{wn|{{{n|-}}}}}}'''</td>
     <td style="text-align:center;width:8em" width="8em"><b>{{#if:{{{n|}}} | {{{n}}} | - }}</b></td>
+
     <td style="text-align:center;width:8em">'''{{{en|{{{n|-}}}}}}'''</td>
     <td style="text-align:right;width:7em" width="7em"><b>{{#if:{{{ne|}}} | {{{ne}}} | - }}</b></td>
+
     <td style="text-align:right;width:7em">'''{{{ne|-}}}'''</td>
 
</tr>
 
</tr>
 
<tr>
 
<tr>
     <td style="text-align:left;width:7em" width="7em"><b>{{#if:{{{w|}}} | {{{w}}} | - }}</b></td>
+
     <td style="text-align:left;width:7em">'''{{{w|-}}}'''</td>
    <td style="text-align:center;width:8em" width="8em"><b>{{{name|{{PAGENAME}}}}}</b></td>
+
    {{#if:{{{name-both|}}}|<td style="text-align:center;width:16em;background-color:#f3f3f3;" colspan="2">'''{{{name-both}}}'''</td>|<td style="text-align:center;width:8em">'''{{{namew|{{{name|{{PAGENAME}}}}} West}}}'''</td>
     <td style="text-align:center;width:8em" width="8em"><b>{{{name|{{PAGENAME}}}}}</b></td>
+
     <td style="text-align:center;width:8em" width="8em">'''{{{namee|{{{name|{{PAGENAME}}}}} East}}}'''</td>}}
     <td style="text-align:right;width:7em" width="7em"><b>{{#if:{{{e|}}} | {{{e}}} | - }}</b></td>
+
     <td style="text-align:right;width:7em">'''{{{e|-}}}'''</td>
 
</tr>
 
</tr>
 
<tr>
 
<tr>
     <td style="text-align:left;width:7em" width="7em"><b>{{#if:{{{sww|}}} | {{{sww}}} | - }}</b></td>
+
     <td style="text-align:left;width:7em">'''{{{sw|-}}}'''</td>
     <td style="text-align:left;width:7em" width="7em"><b>{{#if:{{{sw|}}} | {{{sw}}} | - }}</b></td>
+
     <td style="text-align:center;width:8em">'''{{{ws|{{{s|-}}}}}}'''</td>
     <td style="text-align:center;width:8em" width="8em"><b>{{#if:{{{s|}}} | {{{s}}} | - }}</b></td>
+
     <td style="text-align:center;width:8em">'''{{{es|{{{s|-}}}}}}'''</td>
     <td style="text-align:right;width:7em" width="7em"><b>{{#if:{{{se|}}} | {{{se}}} | - }}</b></td>
+
     <td style="text-align:right;width:7em">'''{{{se|-}}}'''</td>
 
</tr>
 
</tr>
 
<!-- Put any additional fields above here.
 
<!-- Put any additional fields above here.
-->}}
+
-->}}{{#if:{{{mapw|}}}{{{mape|}}}|
<tr><td colspan="4" style="text-align:center;">{{{map|<includeonly><span style='font-size: 125%; color:red'>'''No map available.'''</span></includeonly><noinclude><map lat="51" lon="0" /></noinclude>}}}</td></tr>
+
<tr><td colspan="2" style="text-align:center;">{{{mapw|<span style='font-size: 125%; color:red'>'''No map available.'''</span>}}}</td>
</table><noinclude>
+
<td colspan="2" style="text-align:center;">{{{mape|<span style='font-size: 125%; color:red'>'''No map available.'''</span>}}}</td></tr>
{{GraticuleH/Documentation}} <!-- Documentation is elsewhere -->
+
|
 +
<tr><td colspan="4" style="text-align:center;">{{{map|<span style='font-size: 125%; color:red'>'''No map available.'''</span>}}}</td></tr>
 +
}}
 +
{{#if:{{{caption|}}}
 +
|<tr><td colspan="4" style="text-align:left;">{{{caption}}}</td></tr>
 +
|}}
 +
</table></includeonly><noinclude>
 +
{{Template:GraticuleH/Documentation}}
 +
 
 +
&rarr; [{{canonicalurl:Template:GraticuleH/Documentation|action=edit}} Edit Documentation]
 
</noinclude>
 
</noinclude>

Latest revision as of 13:18, 19 February 2020

nw wn en ne
w namew namee e
sw ws es se
mapw mape
Full Example
nw n n ne
w name West name East e
sw s s se
map
Minimal Example
Westerland Flensburg Kiel Rødby, Denmark
Bremen Hamburg West Hamburg East Schwerin
Bielefeld Hannover Braunschweig Magdeburg
Germany Hamburg Graticule.png
Real Example

A more awesome version of Template:Graticule, designed for cities that occupy horizontally adjacent graticules.

Originally made by Joannac, rewritten and overcomplicated by Matty.

Parameters

(refer to the Full Example at right to see where each parameter goes)

mapw, mape
what to draw for the western/eastern map.
map
what to draw for the entire map.
Only used if both mapw and mape are left out.
maponly
(optional) if specified, only draws the map and caption (if any).
namew, namee
What to write in the western/eastern mid section of the legend.
name-both
A single name that fills the entire mid-section of the legend. (Overrides namew and namee)
name
Default text to use, if namew, namee, and name-both are all left out.
Automatically gets West and East appended where appropriate.
w, e
ne, nw, se, sw
Neighbouring graticules in the simple directions.
en, es, wn, ws
Neighbouring graticules to the north and south.
The first letter (w or e) determines weather the neighbour is adjacent to the western or eastern part of the twin graticule.
n, s
Default values for otherwise unspecified east/west graticules.
caption
Extra stuff to include at the bottom of the box, like the caption text of an Image.

Example

{{GraticuleH
| map = [[Image:Germany_Hamburg_Graticule.png]]
| name = Hamburg
| nw = [[54,8|Westerland]]
| wn = [[54,9|Flensburg]]
| en = [[Kiel,_Germany|Kiel]]
| ne = [[54,11|Rødby, Denmark]]
| e = [[Schwerin, Germany|Schwerin]]
| se =  [[Magdeburg, Germany|Magdeburg]]
| es = [[Braunschweig, Germany|Braunschweig]]
| ws = [[Hannover, Germany|Hannover]]
| sw = [[Bielefeld, Germany|Bielefeld]]
| w = [[Bremen,_Germany|Bremen]]
}}

See Also: Template:Graticule, Template:GraticuleV, Template:GraticuleQ

Edit Documentation