Difference between revisions of "Template:Map box"

From Birocapedia
Jump to navigationJump to search
 
(69 intermediate revisions by the same user not shown)
Line 1: Line 1:
<div style="margin-bottom: .5em; border-style: solid; border-color: white; width: auto; clear: {{{align|right}}}; float: {{{align|right}}}; {{#ifeq: {{{align|right}}} | left | margin-right: .5em; |  }}; border-width: .5em {{#ifeq: {{{align|right}}} | right | 0 .8em 1.4em | 1.4em .8em 0 }};"><div style="width:{{#expr: {{{width|200}}} + 2}}px; border: 1px solid #ccc; padding: 3px !important; background-color: #f9f9f9; font-size: 94%; text-align: center; overflow: hidden;"><div style="width:{{{width|200}}}px; border: 1px solid #ccc;">{{{content}}}</div><div style="border: none; text-align: left; line-height: 1.4em; padding: 3px !important; font-size: 94%;">
+
<table style="width:1px; {{#ifeq: {{{align|right}}} | right | clear: right; float: right; border-width: .5em 0 .8em 1.4em; | float: left; clear: left; margin-right: .5em; border-width: .5em 1.4em .8em 0;}}">
{{{caption}}}</div></div></div>
+
<tr>{{#ifeq: {{{align|right}}} | right | <td width="80%"><!--push col 2 back--></td> | }}
 +
<td style="border: 1px solid #ccc; padding: 3px !important; background-color: #f9f9f9; font-size: 94%; text-align: center; overflow: hidden;"><div class="thumbimage">{{{content}}}</div>{{#if: {{{caption|}}} | <div class="thumbcaption">{{{caption}}}</div> | }}</td>{{#ifeq: {{{align|right}}} | right |  | <td width="80%"><!--push col 2 back--></td>}}</tr></table><noinclude>
  
<noinclude>
 
 
== Purpose ==
 
== Purpose ==
  
Makes a box that looks like the box around a thumbnail but with any content you want, for example a map.
+
Makes a box that looks like the box around a thumbnail around a map.
  
 
== Usage ==
 
== Usage ==
Line 11: Line 11:
 
<pre>{{Thumbnail box
 
<pre>{{Thumbnail box
 
|align=
 
|align=
|width=
 
 
|content=
 
|content=
 
|caption=}}</pre>
 
|caption=}}</pre>
  
Note that if you want the box aligned to the right then you do not need to specify the align value, you can leave it blank just like with a thumbnail. The width value also has a default of 200 pixels.
+
Note that if you want the box aligned to the right then you do not need to specify the align value, you can leave it blank just like with a thumbnail. You can leave the caption field blank.
  
 
== Example ==
 
== Example ==
Line 21: Line 20:
 
<pre>{{Thumbnail box
 
<pre>{{Thumbnail box
 
|align=left
 
|align=left
|width=600
 
 
|content=
 
|content=
 
<googlemap version="0.9" lat="44.327256" lon="-70.680027" type="terrain" zoom="15" width="600">
 
<googlemap version="0.9" lat="44.327256" lon="-70.680027" type="terrain" zoom="15" width="600">
Line 29: Line 27:
 
{{Thumbnail box
 
{{Thumbnail box
 
|align=left
 
|align=left
|width=600
+
|content=<googlemap version="0.9" lat="44.327256" lon="-70.680027" type="terrain" zoom="15" width="600"></googlemap>
|content=
 
<googlemap version="0.9" lat="44.327256" lon="-70.680027" type="terrain" zoom="15" width="600">
 
</googlemap>
 
 
|caption=Overset Pond and Overset Mountain. [[Lake McWain]] is due south.}}
 
|caption=Overset Pond and Overset Mountain. [[Lake McWain]] is due south.}}
 
</noinclude>
 
</noinclude>

Latest revision as of 23:44, 13 November 2009

{{#ifeq: right | right | | }} {{#ifeq: right | right | | }}
{{{content}}}
{{#if: |
{{{caption}}}
| }}

Purpose

Makes a box that looks like the box around a thumbnail around a map.

Usage

{{Thumbnail box
|align=
|content=
|caption=}}

Note that if you want the box aligned to the right then you do not need to specify the align value, you can leave it blank just like with a thumbnail. You can leave the caption field blank.

Example

{{Thumbnail box
|align=left
|content=
<googlemap version="0.9" lat="44.327256" lon="-70.680027" type="terrain" zoom="15" width="600">
</googlemap>
|caption=Overset Pond and Overset Mountain. [[Lake McWain]] is due south.}}

Gives:

{{#ifeq: left | right | | }} {{#ifeq: left | right | | }}
<googlemap version="0.9" lat="44.327256" lon="-70.680027" type="terrain" zoom="15" width="600"></googlemap>
{{#if: Overset Pond and Overset Mountain. Lake McWain is due south. |
Overset Pond and Overset Mountain. Lake McWain is due south.
| }}