Template:Location map+: Difference between revisions

From Zoophilia Wiki
Jump to navigationJump to search
meta>Plastikspork
(float center)
meta>Plastikspork
(Code update from User:Droll at Template talk:Location map)
Line 1: Line 1:
<includeonly><div style="{{#if: {{{caption|}}}
<includeonly>{{#ifeq:{{{float|}}}|center|<div class="center">
  | width:{{#expr:{{#if:{{{width|}}}|{{{width}}}|240}} + 2 }}px; padding: 3px;{{#ifeq: {{{border|}}} | none || border: 1px solid {{#if: {{{border|}}} | {{{border}}} | #CCC }};}} margin: 3px;
}}<div {{#if:{{{caption|}}}|class="thumb {{#switch:{{{float|}}}
  | width:{{#if:{{{width|}}}|{{{width}}}|240}}px;
  | "left"  | left    = tleft
}} float:{{#switch:{{{float|}}}|"center"|center=none|"left"|left=left|"right"|right=right|"none"|none=none|right}}; clear:{{#switch:{{{float|}}}|"center"|center=both; margin-left: auto; margin-right: auto|"left"|left=left|"right"|right=right|"none"|none=none|right}};{{#if: {{{caption|}}} | background:#F9F9F9; }}"><div style="position: relative;{{#if: {{{caption|}}}
  | "right"  | right  = tright
  | {{#ifeq: {{{border|}}} | none || border: 1px solid {{#if: {{{border|}}} | {{{border}}} | #CCC}};}}
  | "center" | center  = tnone
}} padding: 0px; width:{{#if:{{{width|}}}|{{{width}}}|240}}px">[[File:{{#if: {{{AlternativeMap|}}}|{{{AlternativeMap}}} |{{#if: {{{relief|}}}|{{#if: {{Location map {{{1}}}|image1}}|{{Location map {{{1}}}|image1}}|{{Location map {{{1|}}}|image}} }}|{{Location map {{{1|}}}|image}} }} }}|{{#if:{{{width|}}}|{{{width}}}|240}}px|{{#if:{{{alt|}}}|{{{alt}}}|{{#if:{{{label|}}}|{{{label}}}|{{PAGENAME}}}} is located in {{Location map {{{1}}}|name}}}}]]<br />{{#if:{{{overlay_image|}}}|<div style="position:absolute; z-index: 1; top: 0; left: 0;">[[File:{{{overlay_image}}} |{{#if:{{{width|}}}|{{{width}}}|240}}px|link=File:{{#if: {{{AlternativeMap|}}}|{{{AlternativeMap}}} |{{#if: {{{relief|}}}|{{#if: {{Location map {{{1}}}|image1}}|{{Location map {{{1}}}|image1}}|{{Location map {{{1|}}}|image}} }}|{{Location map {{{1|}}}|image}} }} }}]]</div>}}{{{places}}}</div><div style="font-size: 90%">{{{caption|{{#if: {{{label|}}}
  | "none"  | none    = tnone
  | {{{label}}}
  | #default = tnone }}"
  | {{PAGENAME}}
| style="width:{{#if:{{{width|}}}|{{{width}}}|240}}px; {{#switch:{{{float|}}}
}} ({{Location map {{{1}}}|name}})}}}</div></div></includeonly><noinclude>
  | "left"   | left     = float: left; clear: left
  | "right" | right   = float: right; clear: right
  | "center" | center   = float: none; clear: both; margin-left: auto; margin-right: auto
  | "none"   | none     = float: none; clear: none
  | #default = float: right; clear: right}}"
}}>
<div {{#if:{{{caption|}}}
| class="thumbinner" style="width:{{#expr:{{#if:{{{width|}}}|{{{width}}}|240}} + 2 }}px; {{#if:{{{border|}}}|{{#ifeq:{{{border|}}}|none|border: none|border-color:{{{border}}}}};}}
| width:{{#if:{{{width|}}}|{{{width}}}|240}}px; padding:0;"
}}">
<div style="position: relative; {{#if:{{{caption|}}}
  | {{#if:{{{border|}}}
    | {{#ifeq:{{{border|}}}|none||border: 1px solid lightgray}}
| border: 1px solid lightgray}}}}"><!--
-->[[file:{{#if:{{{AlternativeMap|}}}|{{{AlternativeMap}}}|{{#if:{{{relief|}}}|{{#if:{{Location map {{{1}}}|image1}}|{{Location map {{{1}}}|image1}}|{{Location map {{{1|}}}|image}} }}|{{Location map {{{1|}}}|image}} }} }}|{{#if:{{{width|}}}|{{{width}}}|240}}px|{{#if:{{{alt|}}}|{{{alt}}}|{{#if:{{{label|}}}|{{{label}}}|{{PAGENAME}}}} is located in {{Location map {{{1}}}|name}}}}]]<!--
-->{{#if:{{{overlay_image|}}}
  | <div style="position:absolute; z-index: 1; top: 0; left: 0;">[[File:{{{overlay_image}}} |{{#if:{{{width|}}}|{{{width}}}|240}}px|link=file:{{#if: {{{AlternativeMap|}}}|{{{AlternativeMap}}} |{{#if: {{{relief|}}}|{{#if: {{Location map {{{1}}}|image1}}|{{Location map {{{1}}}|image1}}|{{Location map {{{1|}}}|image}} }}|{{Location map {{{1|}}}|image}} }} }}]]</div>}}<!--
 
-->{{{places|}}}<!--
 
--></div>
<div {{#if:{{{caption|}}}|class="thumbcaption"|style="font-size: 90%; padding-top:3px;"}}>{{#if:{{{caption_undefined|}}}
  | {{#if: {{{label|}}}
    | {{{label}}}
    | {{PAGENAME}}
    }} ({{Location map {{{1}}}|name}})
  | {{{caption|{{#if: {{{label|}}}
    | {{{label}}}
    | {{PAGENAME}}
    }} ({{Location map {{{1}}}|name}}) }}}
}}
</div>
</div>
</div>{{#ifeq:{{{float|}}}|center|
</div>}}</includeonly><noinclude>
{{documentation}}
{{documentation}}
</noinclude>
</noinclude>

Revision as of 01:17, 27 April 2011