diff options
author | Maxim Devaev <[email protected]> | 2023-10-26 08:41:27 +0300 |
---|---|---|
committer | Maxim Devaev <[email protected]> | 2023-10-26 08:41:27 +0300 |
commit | e2ac3412db1335e90bf51405054112e37bdbf638 (patch) | |
tree | 68861ffcdcc05a56dc304381737f6fe94796049d /web/kvm/navbar.pug | |
parent | 7bb553110068fa0ae5a5ed230d58322ded385ade (diff) |
refactoring
Diffstat (limited to 'web/kvm/navbar.pug')
-rw-r--r-- | web/kvm/navbar.pug | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/web/kvm/navbar.pug b/web/kvm/navbar.pug index 98456765..ac3f0a04 100644 --- a/web/kvm/navbar.pug +++ b/web/kvm/navbar.pug @@ -13,9 +13,19 @@ mixin menu_message(icon, short, classes="") sup(style="line-height:1") block -mixin menu_switch_notable(id, title, enabled, checked, classes="") - td(class=`${classes}`) #{title}: - td(class=`${classes}` align="right") +mixin menu_switch_notable_gpio(channel, title, confirm_off="") + td #{title}: + td(align="right") + div(class="switch-box") + input(disabled type="checkbox" id=`gpio-switch-${channel}` class="gpio-switch" + data-channel=channel data-confirm-off=confirm_off) + label(for=`gpio-switch-${channel}`) + span(class="switch-inner") + span(class="switch") + +mixin menu_switch_notable(id, title, enabled, checked) + td #{title}: + td(align="right") div(class="switch-box") input(checked=checked disabled=!enabled type="checkbox" id=id) label(for=id) |