Difference between revisions of "Template:Location mark~"

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

Revision as of 09:11, 5 December 2012

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

ru:Template:Location mark~