Шаблон:Rating: различия между версиями

Материал из Tau Ceti Station Wiki
Перейти к навигации Перейти к поиску
м
м
 
(не показаны 4 промежуточные версии этого же участника)
Строка 1: Строка 1:
<includeonly>
{{#css:
{{#css:
.cont {
display: flex;
}
.op {
.op {
opacity: 0.16;
opacity: 0.33;
}
}
.vert {
.vert {
transform: rotate(-45deg);
transform: rotate(-45deg);
font-size: 9px;
font-size: 9px;
}
}
}}
}}
<table style="clear: both; width: {{{width|auto}}}; color: {{{txcolor}}}; background: {{{bgcolor|#fafafa}}}; border-color: {{{bordercolor|#e22}}}; border-style: solid; border-width: 1px 1px 1px 10px; padding: 4px; margin: 1px auto; vertical-align: middle; text-align: left;">
<table style="clear: both; width: {{{width|auto}}}; color: {{{txcolor}}}; background: {{{bgcolor|#fafafa}}}; border-color: {{{bordercolor|#e22}}}; border-style: solid; border-width: 1px 1px 1px 1px; padding: 1px; margin: 1px auto; vertical-align: middle; text-align: left;">
<tr>
<tr>
<td width="{{#expr: {{{imgwidth|32}}}+8 }}px" height="{{{height|auto}}}"><div class="vert">{{{text|Легко333}}}</div></td>
<td width="{{#expr: {{{imgwidth|32}}}+8 }}px" height="{{{height|auto}}}"><div class="vert">{{{text|Легко}}}</div></td>
<td style="vertical-align: middle">  
<td style="vertical-align: middle">  
{{#if: {{{title|}}} | '''{{{title}}}'''}}
{{#if: {{{title|}}} | '''{{{title}}}'''}}
{{ #switch: {{{1}}}
{{ #switch: {{{1}}}
| 0 = <div class="op">[[image:{{{img|ohno.png}}}|32px]][[image:{{{img|ohno.png}}}|32px]][[image:{{{img|ohno.png}}}|32px]][[image:{{{img|ohno.png}}}|32px]][[image:{{{img|ohno.png}}}|32px]]</div>
| 0 = <div class="op">[[image:{{{img|ohno.png}}}|32px]][[image:{{{img|ohno.png}}}|32px]][[image:{{{img|ohno.png}}}|32px]][[image:{{{img|ohno.png}}}|32px]][[image:{{{img|ohno.png}}}|32px]]</div>
| 1 = [[image:{{{img|ohno.png}}}|32px]]<div class="op">[[image:{{{img|ohno.png}}}|32px]][[image:{{{img|ohno.png}}}|32px]][[image:{{{img|ohno.png}}}|32px]][[image:{{{img|ohno.png}}}|32px]]</div>
| 1 = <div class="cont">[[image:{{{img|ohno.png}}}|32px]]<div class="op">[[image:{{{img|ohno.png}}}|32px]][[image:{{{img|ohno.png}}}|32px]][[image:{{{img|ohno.png}}}|32px]][[image:{{{img|ohno.png}}}|32px]]</div></div>
| 2 = [[image:{{{img|ohno.png}}}|32px]][[image:{{{img|ohno.png}}}|32px]]<div class="op">[[image:{{{img|ohno.png}}}|32px]][[image:{{{img|ohno.png}}}|32px]][[image:{{{img|ohno.png}}}|32px]]</div>
| 2 = <div class="cont">[[image:{{{img|ohno.png}}}|32px]][[image:{{{img|ohno.png}}}|32px]]<div class="op">[[image:{{{img|ohno.png}}}|32px]][[image:{{{img|ohno.png}}}|32px]][[image:{{{img|ohno.png}}}|32px]]</div></div>
| 3 = [[image:{{{img|ohno.png}}}|32px]][[image:{{{img|ohno.png}}}|32px]][[image:{{{img|ohno.png}}}|32px]]<div class="op">[[image:{{{img|ohno.png}}}|32px]][[image:{{{img|ohno.png}}}|32px]]</div>
| 3 = <div class="cont">[[image:{{{img|ohno.png}}}|32px]][[image:{{{img|ohno.png}}}|32px]][[image:{{{img|ohno.png}}}|32px]]<div class="op">[[image:{{{img|ohno.png}}}|32px]][[image:{{{img|ohno.png}}}|32px]]</div></div>
| 4 = [[image:{{{img|ohno.png}}}|32px]][[image:{{{img|ohno.png}}}|32px]][[image:{{{img|ohno.png}}}|32px]][[image:{{{img|ohno.png}}}|32px]]<div class="op">[[image:{{{img|ohno.png}}}|32px]]</div>
| 4 = <div class="cont">[[image:{{{img|ohno.png}}}|32px]][[image:{{{img|ohno.png}}}|32px]][[image:{{{img|ohno.png}}}|32px]][[image:{{{img|ohno.png}}}|32px]]<div class="op">[[image:{{{img|ohno.png}}}|32px]]</div></div>
| 5 = [[image:{{{img|ohno.png}}}|32px]][[image:{{{img|ohno.png}}}|32px]][[image:{{{img|ohno.png}}}|32px]][[image:{{{img|ohno.png}}}|32px]][[image:{{{img|ohno.png}}}|32px]]
| 5 = [[image:{{{img|ohno.png}}}|32px]][[image:{{{img|ohno.png}}}|32px]][[image:{{{img|ohno.png}}}|32px]][[image:{{{img|ohno.png}}}|32px]][[image:{{{img|ohno.png}}}|32px]]
}}
}}
</td></tr></table>
</td></tr></table>
</includeonly>
<noinclude>
{{doc}}
</noinclude>

Текущая версия на 12:52, 23 марта 2022


Документация Документация
  • Параметры:
  • Первый параметр кол-во звездочек от 0 до 5
  • width - ширина колонки, стандартно: auto
  • txcolor - цвет текста
  • bgcolor - цвет фона, стандартно: fafafa
  • bordercolor - цвет обводки, стандартно: e22
  • imgwidth - размер иконки, стандартно 32(+8)px
  • height - высота картинки
  • text - текст, стандартно: Легко
  • img - иконка, стандартно: ohno.png

  • Пример: {{rating|3|text=Средне|bordercolor=#333333}}
  • Даст результат:
Средне
Ohno.pngOhno.pngOhno.png
Ohno.pngOhno.png