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

мНет описания правки
мНет описания правки
 
(не показано 25 промежуточных версий 2 участников)
Строка 1: Строка 1:
<div class="exclusive-next__content" 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><!--
{{#vardefine:label|
  {{#switch:{{{1|}}}
    | wl      = WL
    | cm      = CM
    | frontier = Frontier
    | fallout  = Fallout
    | sw      = SW
    | wega    = Wega
    | goob    = Goob
    | #default = {{{1}}}
  }}
}}<!--  


-->{{#if:{{{ForText|}}}|<div class="exclusive-next-text__content">Next</div>}}<!--
-->{{#vardefine:color|
  {{#switch:{{{1|}}}
    | wl      = {{цвет|text|darksalmon}}
    | cm      = {{цвет|text|turquoise}}
    | frontier = {{цвет|text|violet}}
    | fallout  = {{цвет|text|silver}}
    | sw      = {{цвет|text|crimson}}
    | wega    = {{цвет|text|pink}}
    | goob    = {{цвет|text|blue}}
    | #default = {{цвет|text|blue}}
  }}
}}<!--  


-->{{#css:  
-->{{#vardefine:background|
.mw-parser-output *:has(.exclusive-next__content, .exclusive-next-text__content) {
  {{#switch:{{{1|}}}
     position: relative;
    | wl      = {{цвет|pastel-yellow|dark}}
}
    | frontier = {{цвет|violet|dark}}
    | fallout  = {{цвет|pastel-lime|dark}}
    | sw      = {{цвет|pastel-red|dark}}
    | wega    = {{цвет|pink|dark}}
     | goob    = {{цвет|blue|dark}}
    | #default = {{цвет|blue|dark}}
  }}
}}<!--


.exclusive-next__content {
-->{{#if:{{{обрамить_текст|}}}
     position: absolute;
  | <!-- с обрамлением -->
   
     <div style="position:relative; padding:0 2px;">
    left:0;
          <span class="пометка-проекта__absolute пометка-проекта__wrapper" style="
    top:0;
            color: {{#var:color}};
 
            background: {{#var:background}};
    padding: 2px 4px;
          ">'''{{#var:label}}'''</span><div style="position:relative; margin-right:30px;">{{{2}}}</div>
    font-family: "noto sans";
     </div>
    font-size: 0.7em;
  | <!-- без обрамления -->
     font-weight: bold;
    {{#if:{{{absolute|}}}
    color: #d9a938;
      | <!-- плавающий абсолютный блок -->
    background: #d9a93815;
        <div class="пометка-проекта__absolute" style="
    border-radius: 0.3em;
          color: {{#var:color}};
}
          background: {{#var:background}};
 
          {{#switch:{{{posX|}}}| left=left:0; right:unset; | right=left:unset; right:0; }}
.exclusive-next-text__content {
          {{#switch:{{{posY|}}}| top=top:0; bottom:unset; | bottom=bottom:0; top:unset; }}
    position: absolute;
        ">'''{{#var:label}}'''</div>
    top: 0;
      | <!-- обычный суп -->
    right: 0;
        <sup><span style="color: {{#var:color}};">'''{{#var:label}}'''</span></sup>
    bottom: 0;
     }}
    left: 0;
}}<templatestyles src="Пометка проекта/styles.css" /><noinclude>{{doc}}</noinclude>
 
    padding: 2px 4px;
    font-family: "noto sans";
    font-size: 0.7em;
    font-weight: bold;
    color: #d9a938;
    background: #d9a93809;
     text-align: right;
}
 
}}<noinclude>{{doc}}</noinclude>