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

Материал из Space Station 14 Вики
Нет описания правки
Нет описания правки
 
(не показано 12 промежуточных версий этого же участника)
Строка 1: Строка 1:
<div class="outer-wrapper">
<div class="js-checkbox-generator"
<div class="checkbox-wrapper">
    data-cbox-class="{{{class|}}}"
<div class="{{#switch: {{{1}}}}} checkbox-container">
    data-cbox-checked="{{{checked|}}}"
<!-- Здесь создаться чекбокс, с помощью JS -->
    data-cbox-label="{{{label|}}}"
</div></div></div>
    data-cbox-name="{{{name|}}}"
 
    data-cbox-id="{{{id|}}}"
 
    data-cbox-disabled="{{{disabled|}}}"
<div class="customCSS" style="display:none">.outer-wrapper{display:flex;justify-content:left;align-items:left;font-family:Arial,sans-serif}
    data-cbox-items="{{{items|}}}">
.checkbox-wrapper{padding:20px;border:2px solid #007BFF;border-radius:10px;background-color:#fff;box-shadow:0 4px 8px rgba(0,0,0,0.1)}
<!-- Здесь создаться чекбокс с помощью JS -->
.checkbox-container{display:flex;align-items:center;cursor:pointer}
</div>
.checkbox-container label{margin-right:10px}
.checkbox-container input[type="checkbox"]{appearance:none;width:20px;height:20px;border:2px solid #007BFF;border-radius:4px;position:relative;display:flex;justify-content:center;align-items:center}
.checkbox-container input[type="checkbox"]::after{content:'';width:10px;height:10px;background-color:#007BFF;border-radius:2px;opacity:0;transition:opacity 0.2s ease}
.checkbox-container input[type="checkbox"]:checked::after{opacity:1}</div>

Текущая версия от 19:37, 14 марта 2026