Шаблон:Пометка проекта: различия между версиями

мНет описания правки
мНет описания правки
 
(не показано 17 промежуточных версий 2 участников)
Строка 1: Строка 1:
{{#if:{{{ForText|}}}|
{{#vardefine:label|
  <div style="position:relative;padding:0 2px;">
  {{#switch:{{{1|}}}
     <div class="exclusive-next-text__icon">Next</div>
    | wl      = WL
     <div style="position:relative;margin-right:30px;">{{{1}}}</div>
    | cm      = CM
  </div>
     | frontier = Frontier
|
     | fallout  = Fallout
  <div class="exclusive-next" style="{{#switch:{{{posX|}}}|left=left:0;right:unset;|right=left:unset;right:0;|}}{{#switch:{{{posY|}}}|top=top:0;bottom:unset;|bottom=bottom:0;top:unset;}}>Next</div>
    | sw      = SW
}}<!--
    | wega    = Wega
    | goob    = Goob
    | #default = {{{1}}}
  }}
}}<!--  


-->{{#css:  
-->{{#vardefine:color|
.mw-parser-output *:has(.exclusive-next) {
  {{#switch:{{{1|}}}
     position: relative;
    | wl      = {{цвет|text|darksalmon}}
}
    | cm      = {{цвет|text|turquoise}}
    | frontier = {{цвет|text|violet}}
    | fallout  = {{цвет|text|silver}}
    | sw      = {{цвет|text|crimson}}
    | wega    = {{цвет|text|pink}}
    | goob    = {{цвет|text|blue}}
     | #default = {{цвет|text|blue}}
  }}
}}<!--


.exclusive-next,
-->{{#vardefine:background|
.exclusive-next-text__icon {
  {{#switch:{{{1|}}}
    position: absolute;
     | wl      = {{цвет|pastel-yellow|dark}}
   
     | frontier = {{цвет|violet|dark}}
    left:0;
     | fallout  = {{цвет|pastel-lime|dark}}
     top:0;
     | sw      = {{цвет|pastel-red|dark}}
 
     | wega     = {{цвет|pink|dark}}
    padding: 2px 4px;
     | goob     = {{цвет|blue|dark}}
    font-family: "noto sans";
     | #default = {{цвет|blue|dark}}
     font-size: 0.75em;
  }}
     font-weight: bold;
}}<!--
     color: #e5a50e;
    background: #e5a50e18;
    border-radius: 0.3em;
}
 
.exclusive-next-text__icon {
     right: 0;
     bottom: 0;
 
     text-align: right;
     border-radius: 0;
     color: #d9a938;
    background: #ffb30007;
}


}}<noinclude>{{doc}}</noinclude>
-->{{#if:{{{обрамить_текст|}}}
  | <!-- с обрамлением -->
    <div style="position:relative; padding:0 2px;">
          <span class="пометка-проекта__absolute пометка-проекта__wrapper" style="
            color: {{#var:color}};
            background: {{#var:background}};
          ">'''{{#var:label}}'''</span><div style="position:relative; margin-right:30px;">{{{2}}}</div>
    </div>
  | <!-- без обрамления -->
    {{#if:{{{absolute|}}}
      | <!-- плавающий абсолютный блок -->
        <div class="пометка-проекта__absolute" style="
          color: {{#var:color}};
          background: {{#var:background}};
          {{#switch:{{{posX|}}}| left=left:0; right:unset; | right=left:unset; right:0; }}
          {{#switch:{{{posY|}}}| top=top:0; bottom:unset; | bottom=bottom:0; top:unset; }}
        ">'''{{#var:label}}'''</div>
      | <!-- обычный суп -->
        <sup><span style="color: {{#var:color}};">'''{{#var:label}}'''</span></sup>
    }}
}}<templatestyles src="Пометка проекта/styles.css" /><noinclude>{{doc}}</noinclude>