Template:Location map many: Difference between revisions
From Zoophilia Wiki
Jump to navigationJump to search
meta>Wikid77 reverted to original one-marker code to avoid nested crap |
meta>Wikid77 commented code for marker/label #1 |
||
Line 7: | Line 7: | ||
| #CCCCCC | | #CCCCCC | ||
}}; margin: 3px; | }}; margin: 3px; | ||
}} float:{{#switch:{{{float|}}}|"center"=none|center=none|"left"=left|"right"=right|left=left|right=right|"none"=none|none=none|right}}; clear:{{#switch:{{{float|}}}|"center"=both|center=both|"left"=left|"right"=right|left=left|right=right|"none"=none|none=none|right}}; {{#if: {{{caption|}}} | ;background:#F9F9F9"|" }}><div style="position: relative;{{#ifeq: {{{border|}}} | none | | }} float:{{#switch:{{{float|}}}|"center"=none|center=none|"left"=left|"right"=right|left=left|right=right|"none"=none|none=none|right}}; clear:{{#switch:{{{float|}}}|"center"=both|center=both|"left"=left|"right"=right|left=left|right=right|"none"=none|none=none|right}}; {{#if: {{{caption|}}} | ;background:#F9F9F9"|" }}><!-- | ||
----------------------------------------------------- Map division | |||
--><div style="position: relative;{{#ifeq: {{{border|}}} | none | | |||
|border: 1px solid {{#if: {{{border|}}} | |border: 1px solid {{#if: {{{border|}}} | ||
| {{{border}}} | | {{{border}}} | ||
| {{#if:{{{caption|}}}|#CCCCCC|none}} | | {{#if:{{{caption|}}}|#CCCCCC|none}} | ||
}}; | }}; | ||
}} padding: 0px; width: {{{width|240}}}px">[[image:{{#if: {{{AlternativeMap|}}} | {{{AlternativeMap}}} | {{Location map {{{1}}}|image}} }}|{{{width|240}}}px|{{#if: {{{label|}}} | }} padding: 0px; width: {{{width|240}}}px"><!-- specify Map -->[[image:{{#if: {{{AlternativeMap|}}} | {{{AlternativeMap}}} | {{Location map {{{1}}}|image}} }}|{{{width|240}}}px|{{#if: {{{label|}}} | ||
| {{{label}}} | | {{{label}}} | ||
| {{PAGENAME}} | | {{PAGENAME}} | ||
Line 25: | Line 27: | ||
| {{{long|0}}} | | {{{long|0}}} | ||
}} - {{Location map {{{1}}}|left}}) / ({{Location map {{{1}}}|right}} - {{Location map {{{1}}}|left}}) round 1 | }} - {{Location map {{{1}}}|left}}) / ({{Location map {{{1}}}|right}} - {{Location map {{{1}}}|left}}) round 1 | ||
}}%; height: 0; width: 0; margin: 0; padding: 0;"><div style="position: relative; text-align: center; {{#if: {{{marksize|}}} | }}%; height: 0; width: 0; margin: 0; padding: 0;"><!-- | ||
====================================================== Marker/Label #1 | |||
--><div style="position: relative; text-align: center; {{#if: {{{marksize|}}} | |||
| left: -{{#expr: {{{marksize}}} / 2 round 0 }}px; top: -{{#expr: {{{marksize}}} / 2 round 0 }}px; width: {{{marksize}}}px; font-size: {{{marksize}}}px; | | left: -{{#expr: {{{marksize}}} / 2 round 0 }}px; top: -{{#expr: {{{marksize}}} / 2 round 0 }}px; width: {{{marksize}}}px; font-size: {{{marksize}}}px; | ||
| left: -{{#expr: {{#if: {{Location map {{{1}}}|marksize}}|{{Location map {{{1}}}|marksize}}|8}} / 2 round 0 }}px; top: -{{#expr: {{#if: {{Location map {{{1}}}|marksize}}|{{Location map {{{1}}}|marksize}}|8}} / 2 round 0 }}px; width: {{#if: {{Location map {{{1}}}|marksize}}|{{Location map {{{1}}}|marksize}}|8}}px; font-size: {{#if: {{Location map {{{1}}}|marksize}}|{{Location map {{{1}}}|marksize}}|8}}px; | | left: -{{#expr: {{#if: {{Location map {{{1}}}|marksize}}|{{Location map {{{1}}}|marksize}}|8}} / 2 round 0 }}px; top: -{{#expr: {{#if: {{Location map {{{1}}}|marksize}}|{{Location map {{{1}}}|marksize}}|8}} / 2 round 0 }}px; width: {{#if: {{Location map {{{1}}}|marksize}}|{{Location map {{{1}}}|marksize}}|8}}px; font-size: {{#if: {{Location map {{{1}}}|marksize}}|{{Location map {{{1}}}|marksize}}|8}}px; | ||
}}">[[Image:{{#if: {{{mark|}}} | }}"><!-- specify marker#1 -->[[Image:{{#if: {{{mark|}}} | ||
| {{{mark}}} | | {{{mark}}} | ||
| {{#if: {{Location map {{{1}}}|mark}}|{{Location map {{{1}}}|mark}}|Red pog.svg}} | | {{#if: {{Location map {{{1}}}|mark}}|{{Location map {{{1}}}|mark}}|Red pog.svg}} | ||
Line 37: | Line 41: | ||
| {{{label}}} | | {{{label}}} | ||
| {{PAGENAME}} | | {{PAGENAME}} | ||
}}]]</div>{{#ifeq: {{{position|}}} | none | }}]]</div><!-- end-div marker1 | ||
---------------------------------------------- Label #1 | |||
-->{{#ifeq: {{{position|}}} | none | |||
| | | | ||
|<div style="font-size: {{{label_size|90}}}%; line-height: 110%; position: relative; top: -1.5em; width: 6em; {{#switch: {{{position}}} | |<div style="font-size: {{{label_size|90}}}%; line-height: 110%; position: relative; top: -1.5em; width: 6em; {{#switch: {{{position}}} | ||
Line 47: | Line 53: | ||
}}"><span style="padding: 1px; {{#if: {{{background|}}} | }}"><span style="padding: 1px; {{#if: {{{background|}}} | ||
| background-color: {{{background}}}; | | background-color: {{{background}}}; | ||
}}">{{{label|}}}</span></div> | }}">{{{label|}}}</span></div><!-- end-div label1 --> | ||
}}</div></div><div style="font-size: 90%">{{{caption|{{#if: {{{label|}}} | }}<!-- | ||
====================================================== Marker/Label #2 | |||
--> | |||
</div> | |||
</div><!-- | |||
------------------------------------------------------ Caption division | |||
--><div style="font-size: 90%">{{{caption|{{#if: {{{label|}}} | |||
| {{{label}}} | | {{{label}}} | ||
| {{PAGENAME}} | | {{PAGENAME}} |