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

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


{{#switch:{{{posX|}}}|left=left:0;right:unset;|right=left:unset;right:0;|}}
-->{{#vardefine:color|
{{#switch:{{{posY|}}}|top=top:0;bottom:unset;|bottom=bottom:0;top:unset;}}>Next</div>
  {{#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}}
  }}
}}<!--


{{#if:{{{ForText|}}}|<div class="exclusive-next-text__content">Next</div>}}
-->{{#vardefine:background|
<!--
  {{#switch:{{{1|}}}
    | wl      = {{цвет|pastel-yellow|dark}}
    | frontier = {{цвет|violet|dark}}
    | fallout  = {{цвет|pastel-lime|dark}}
    | sw      = {{цвет|pastel-red|dark}}
    | wega    = {{цвет|pink|dark}}
    | goob    = {{цвет|blue|dark}}
    | #default = {{цвет|blue|dark}}
  }}
}}<!--


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