Difference between revisions of "Template:Location mark~"

From blackwiki
Jump to navigation Jump to search
imported>Droll
m (tweaked)
imported>Droll
(tweaked)
Line 1: Line 1:
<includeonly><div style="position: absolute; z-index: 2; height: 0; width: 0; margin: 0; padding: 0;
+
<includeonly>{{#if:{{{x|}}}{{{y|}}}{{{x%|}}}{{{y%|}}}
top:  {{#if:{{{y%|}}}
+
| <div style="position: absolute; z-index: 2; height: 0; width: 0; margin: 0; padding: 0;
      | {{{y%|}}}%;
+
  top:  {{#if:{{{y%|}}}
      | {{#expr:{{ifempty|{{{width|}}}|220}} * {{{y|}}} e -3 round 0 }}px; }}
+
        | {{{y%|}}}%;
left: {{#if:{{{x%|}}}
+
        | {{#expr:{{ifempty|{{{width|}}}|220}} * {{{y|}}} e -3 round 0 }}px; }}
      | {{{x%|}}}%;
+
  left: {{#if:{{{x%|}}}
      | {{#expr:{{ifempty|{{{width|}}}|220}} * {{{x|}}} e -3 round 0 }}px; }} ">
+
        | {{{x%|}}}%;
 +
        | {{#expr:{{ifempty|{{{width|}}}|220}} * {{{x|}}} e -3 round 0 }}px; }} ">
  
  <div style="position: relative; z-index: 3;  
+
  <div style="position: relative; z-index: 3;  
  width: {{ifempty|{{{mark_width|}}}|8}}px;
+
  width: {{ifempty|{{{mark_width|}}}|8}}px;
  left: -{{#expr:{{ifempty|{{{mark_width|}}}|8}} / 2 round 2}}px;
+
  left: -{{#expr:{{ifempty|{{{mark_width|}}}|8}} / 2 round 2}}px;
  top:  -{{#expr:{{ifempty|{{{mark_width|}}}|8}} / 2 round 2}}px;"><!--
+
  top:  -{{#expr:{{ifempty|{{{mark_width|}}}|8}} / 2 round 2}}px;"><!--
 +
  -->[[File:{{ifempty|{{{mark|}}}|Red pog.svg}}|{{ifempty|{{{mark_width|}}}|8}}px|{{{label|}}}<!--
 +
    -->{{#if:{{{alt|}}}{{{mark_alt|}}}{{{label|}}}|{{!}}alt={{ifempty|{{{alt|}}}|{{{mark_alt|}}}|{{{label|}}} }} }}<!--
 +
    -->{{#if:{{{link|}}}{{{mark_link|}}}|{{!}}link={{ifempty|{{{mark_link|}}}|{{{link|}}} }} }}]]</div>
  
  -->[[File:{{ifempty|{{{mark|}}}|Red pog.svg}}|{{ifempty|{{{mark_width|}}}|8}}px|{{{label|}}}<!--
+
  {{#if:{{{label|}}}
      -->{{#if:{{{alt|}}}{{{mark_alt|}}}{{{label|}}}|{{!}}alt={{ifempty|{{{alt|}}}|{{{mark_alt|}}}|{{{label|}}} }} }}<!--
+
  | <div style="position: relative; z-index: 4; font-size: {{ifempty|{{{font_size|}}}|90}}%; line-height: 111%; width: 6em;
      -->{{#if:{{{link|}}}{{{mark_link|}}}|{{!}}link={{ifempty|{{{mark_link|}}}|{{{link|}}} }} }}]]</div>
+
  {{#switch: {{{position|}}}
 
+
  | left  = top: -1.5em;  left: -6.5em; text-align: right;
  {{#if:{{{label|}}}
+
  | right  = top: -1.5em;  left:  0.5em; text-align: left;
  | <div style="position: relative; z-index: 4; font-size: {{ifempty|{{{font_size|}}}|90}}%; line-height: 111%; width: 6em;
+
  | top    = top: -2.65em; left: -3em;  text-align: center;
  {{#switch: {{{position|}}}
+
  | bottom = top: -0.15em; left: -3em;  text-align: center;
  | left  = top: -1.5em;  left: -6.5em; text-align: right;
+
  |#default= {{#ifexpr:({{ifempty|{{{x|}}}|0}}>700) or ({{ifempty|{{{x%|}}}|0}}>70)
  | right  = top: -1.5em;  left:  0.5em; text-align: left;
+
    | top: -1.5em; left: -6.5em; text-align: right;
  | top    = top: -2.65em; left: -3em;  text-align: center;
+
    | top: -1.5em; left:  0.5em; text-align: left;}}
  | bottom = top: -0.15em; left: -3em;  text-align: center;
+
  }}"><span style="padding: 1px; {{#if:{{{background|}}}|background-color: {{{background|}}}; }}">{{{label|}}}</span></div>}}
  |#default= {{#ifexpr:({{ifempty|{{{x|}}}|0}}>700) or ({{ifempty|{{{x%|}}}|0}}>70)
+
</div>}}</includeonly><noinclude>
    | top: -1.5em; left: -6.5em; text-align: right;
 
    | top: -1.5em; left:  0.5em; text-align: left;}}
 
    }}"><span style="padding: 1px; {{#if:{{{background|}}}|background-color: {{{background|}}}; }}">{{{label|}}}</span></div>}}
 
</div></includeonly><noinclude>
 
 
{{documentation}}
 
{{documentation}}
 
<!--
 
<!--

Revision as of 19:58, 23 April 2012

50px Template documentation[view] [edit] [history] [purge]

ru:Template:Location mark~