Template:Pushpin: Difference between revisions
imported>Hardvice adjust |
imported>Ryangibsonstewart missing option |
||
| (55 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
<div style="position: relative; height: 25px; width: 25px; overflow: hidden;"> |
<includeonly><div style="background-color: transparent; position: absolute; left: {{{left|0}}}px; top: {{{top|0}}}px;z-index: 3;"><div style="position: relative; height: 25px; width: 25px; overflow: hidden;"> |
||
<div align="center" style="position: absolute; top: 0px; left: |
<div align="center" style="position: absolute; top: 0px; left: -10px; font-size: 28pt; overflow: hidden; width: 30px; height: 25px; line-height: 25px; z-index: 3; link-hover: none; text-decoration:none;">{{#ifexist:{{{link|}}}|[[{{{link}}}{{pipe}} ]]|<span title="{{{link|Link}}}"> </span>}}</div> |
||
<div style="position: absolute; top: 0px; left: 0px; z-index: 2"><center><span style="font-size: |
<div style="position: absolute; top: 0px; left: 0px; z-index: 2"><center><span style="font-size:22pt; color:black; text-decoration;none;">•</span></center></div><div style="position: absolute; top: -2px; left: -1px; z-index: 2"><center><span style="font-size:21pt; color:{{{color|red}}}; text-decoration;none;">•</span></center></div></div>{{#if:{{{label|}}}|<div style="position: absolute; top: {{{labeltop|-2}}}px; left: {{{labelleft|20}}}px; width: {{{labelwidth|auto}}}; z-index: 2; background-color: white;">{{#ifexist:{{{link|}}}|[[{{{link}}}{{pipe}}{{{override|{{{link}}}}}}]]|{{{override|{{{link}}}}}}}}</div>}}</div></includeonly><noinclude> |
||
==Example== |
|||
{| |
|||
| |
|||
<div style="border: thin black solid; height:200px; width:200px; position: relative; background-color: silver;"> |
|||
{{pushpin|color=red|link=This is a pushpin|left=40|top=40|label=y|override=This is a label|labelwidth=85px}} |
|||
{{pushpin|color=lime|link=Louisiana|left=120|top=120|label=y|override=This one links to Louisiana|labelleft=-60|labelwidth=60px}} |
|||
{{pushpin|color=fuchsia|link=This one has no label and no link|left=180|top=180|}} |
|||
{{pushpin|color=cyan|link=Claire Bennet|left=180|top=30|}} |
|||
{{pushpin|color=yellow|link=Claire Bennet|left=10|top=70|label=y}} |
|||
</div> |
|||
| |
|||
<nowiki>{{pushpin | color=red | link=This is a pushpin | left=40 | top=40 | label=y | override=This is a label | labelwidth=85px}}</nowiki> |
|||
<nowiki>{{pushpin | color=lime | link=Louisiana | left=120 | top=120 | label=y | override=This one links to Louisiana | labelleft=-60 | labelwidth=60px}}</nowiki> |
|||
<nowiki>{{pushpin | color=fuchsia | link=This one has no label and no link | left=180 | top=180}}</nowiki> |
|||
<nowiki>{{pushpin | color=cyan | link=Claire Bennet | left=180 | top=30}}</nowiki> |
|||
<nowiki>{{pushpin | color=yellow | link=Claire Bennet | left=10 | top=70 | label=y}}</nowiki> |
|||
|} |
|||
==Usage== |
==Usage== |
||
Creates a colored dot which links to an article. For use on [[Template:Locationmap]]. |
Creates a colored dot which links to an article. For use on [[Template:Locationmap]]. |
||
To prevent overlap, pushpins should be used left to right, top to bottom within the image map. This will prevent very close pushpins from blocking one another's links. |
|||
<pre>{{pushpin|color=|link=}}</pre> |
|||
<pre>{{pushpin|color=|link=|left=|top=|label=|override=|labeltop=|labelleft=|labelwidth=}}</pre> |
|||
{| class=wikitable |
|||
! Option !! Purpose !! Example |
|||
|- |
|||
| color= || Pushpin color || <code>Green</code>, <code>#CCC</code>, <code>#CCCCCC</code> |
|||
|- |
|||
| link= || Article name of location || <code>New York, NY</code> |
|||
|- |
|||
| left= || Left coordinate || <code>264</code> |
|||
|- |
|||
| top= || Top coordinate || <code>210</code> |
|||
|- |
|||
| label= || OPTIONAL Labels the pushpin || anything |
|||
|- |
|||
| override= || OPTIONAL Text override for label || <code>NYC</code> |
|||
|- |
|||
| labeltop= || OPTIONAL Top coordinate for label relative to pin || <code>10</code> |
|||
|- |
|||
| labelleft= || OPTIONAL Left coordinate for label relative to pin || <code>10</code> |
|||
|- |
|||
| labelwidth= || OPTIONAL Force width of label || <code>100px</code> |
|||
|} |
|||
[[Category:Image Maps]] |
[[Category:Image Maps]] |
||
</noinclude> |
|||
Latest revision as of 19:53, 30 August 2008
Example
|
{{pushpin | color=red | link=This is a pushpin | left=40 | top=40 | label=y | override=This is a label | labelwidth=85px}} {{pushpin | color=lime | link=Louisiana | left=120 | top=120 | label=y | override=This one links to Louisiana | labelleft=-60 | labelwidth=60px}} {{pushpin | color=fuchsia | link=This one has no label and no link | left=180 | top=180}} {{pushpin | color=cyan | link=Claire Bennet | left=180 | top=30}} {{pushpin | color=yellow | link=Claire Bennet | left=10 | top=70 | label=y}} |
Usage
Creates a colored dot which links to an article. For use on Template:Locationmap.
To prevent overlap, pushpins should be used left to right, top to bottom within the image map. This will prevent very close pushpins from blocking one another's links.
{{pushpin|color=|link=|left=|top=|label=|override=|labeltop=|labelleft=|labelwidth=}}
| Option | Purpose | Example |
|---|---|---|
| color= | Pushpin color | Green, #CCC, #CCCCCC
|
| link= | Article name of location | New York, NY
|
| left= | Left coordinate | 264
|
| top= | Top coordinate | 210
|
| label= | OPTIONAL Labels the pushpin | anything |
| override= | OPTIONAL Text override for label | NYC
|
| labeltop= | OPTIONAL Top coordinate for label relative to pin | 10
|
| labelleft= | OPTIONAL Left coordinate for label relative to pin | 10
|
| labelwidth= | OPTIONAL Force width of label | 100px
|