Template:Location map many: Difference between revisions
From Zoophilia Wiki
Jump to navigationJump to search
meta>Wikid77 expanded with 6 more markers #4-#9 |
meta>Wikid77 completed code for marker #9; noted 9 markers (so far) allowed |
||
Line 1: | Line 1: | ||
<includeonly><!-- | <includeonly><!-- | ||
-- Template for image with markers/labels (see bottom NOTES) | -- Template for image with markers/labels (see bottom "NOTES") | ||
--> | --> | ||
<includeonly><div style="width: {{#expr: {{{width|240}}} + 2 }}px; {{#if: {{{caption|}}} | <includeonly><div style="width: {{#expr: {{{width|240}}} + 2 }}px; {{#if: {{{caption|}}} | ||
Line 337: | Line 337: | ||
}}</div><!--end-div point#8-- | }}</div><!--end-div point#8-- | ||
================================================= Marker/Label #9 | ================================================= Marker/Label #9 | ||
--><div style="position: relative; text-align: center; {{#if: {{{mark9size|}}} | |||
| left: -{{#expr: {{{mark9size}}} / 2 round 0 }}px; top: -{{#expr: {{{mark9size}}} / 2 round 0 }}px; width: {{{mark9size}}}px; font-size: {{{mark9size}}}px; | |||
| left: -{{#expr: {{#if: {{Location map {{{1}}}|mark9size}}|{{Location map {{{1}}}|mark9size}}|8}} / 2 round 0 }}px; top: -{{#expr: {{#if: {{Location map {{{1}}}|mark9size}}|{{Location map {{{1}}}|mark9size}}|8}} / 2 round 0 }}px; width: {{#if: {{Location map {{{1}}}|mark9size}}|{{Location map {{{1}}}|mark9size}}|8}}px; font-size: {{#if: {{Location map {{{1}}}|mark9size}}|{{Location map {{{1}}}|mark9size}}|8}}px; | |||
}}"><!-- specify marker#9 -->[[Image:{{#if: {{{mark9|}}} | |||
| {{{mark9}}} | |||
| {{#if: {{Location map {{{1}}}|mark9}}|{{Location map {{{1}}}|mark9}}|Red pog.svg}} | |||
}}|{{#if: {{{mark9size|}}} | |||
| {{{mark9size}}}x{{{mark9size}}} | |||
| {{#if: {{Location map {{{1}}}|mark9size}}|{{Location map {{{1}}}|mark9size}}|8}}x{{#if: {{Location map {{{1}}}|mark9size}}|{{Location map {{{1}}}|mark9size}}|8}} | |||
}}px|{{#if: {{{label9|}}} | |||
| {{{label9}}} | |||
--><div style="position: relative; text-align: center; {{#if: {{{ | |||
| left: -{{#expr: {{{ | |||
| left: -{{#expr: {{#if: {{Location map {{{1}}}| | |||
}}"><!-- specify marker# | |||
| {{{ | |||
| {{#if: {{Location map {{{1}}}| | |||
}}|{{#if: {{{ | |||
| {{{ | |||
| {{#if: {{Location map {{{1}}}| | |||
}}px|{{#if: {{{ | |||
| {{{ | |||
| {{PAGENAME}} | | {{PAGENAME}} | ||
}}]]</div><!-- end-div | }}]]</div><!-- end-div marker9 | ||
---------------------------------------------- Label #9 | -------------------------------------------------- Label #9 | ||
-->{{#ifeq: {{{ | -->{{#ifeq: {{{position9|}}} | none | ||
| | | | ||
|<div style="font-size: {{{ | |<div style="font-size: {{{label9_size|90}}}%; line-height: 110%; position: relative; top: -1.5em; width: 6em; {{#switch: {{{position9}}} | ||
|left = left: -6.5em; text-align: right; | |left = left: -6.5em; text-align: right; | ||
|right = left: 0.5em; text-align: left; | |right = left: 0.5em; text-align: left; | ||
|top = top:-2.65em; left:-3em; text-align: center; | |top = top:-2.65em; left:-3em; text-align: center; | ||
|bottom = top:-0.15em; left: -3em; text-align: center; | |bottom = top:-0.15em; left: -3em; text-align: center; | ||
|left: 0.5em; text-align: left; | |left: 0.5em; text-align: left;<!-- default --> | ||
}}"><span style="padding: 1px; {{#if: {{{ | }}"><span style="padding: 1px; {{#if: {{{background9|}}} | ||
| background-color: {{{ | | background-color: {{{background9}}}; | ||
}}">{{{ | }}">{{{label9|}}}</span></div><!-- end-div label9 --> | ||
}}</div><!--end-div point# | }}</div><!--end-div point#9-- | ||
--------------------------------------------------------- --> | |||
</div><!-- end-div whole map? --> | </div><!-- end-div whole map? --> | ||
</div></div></div><!--force any divisions closed --> | <!-- </div></div></div><!--force any divisions closed --> | ||
</includeonly><noinclude><!-- | </includeonly><noinclude><!-- | ||
-- | -- | ||
Line 382: | Line 371: | ||
-- This code generates an HTML division to show the map image, | -- This code generates an HTML division to show the map image, | ||
-- overlayed with a marker-image division & label division, | -- overlayed with a marker-image division & label division, | ||
-- for each pair of | -- for each pair of up to 9 marker/label points. | ||
-- | -- | ||
-- The "map image" can be any image, allowing markers/labels | -- The "map image" can be any image, allowing markers/labels |