diff options
author | Devaev Maxim <[email protected]> | 2020-07-16 11:04:03 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2020-07-16 11:04:03 +0300 |
commit | 5613a7b2b5774a3d2b9773dd68880140f8e89d31 (patch) | |
tree | ada18371321ac99ef4f78f1624fb55b7ea4d92fd /web/kvm | |
parent | 0d857282fe8df38f1cddffda78487cefbf21f3a2 (diff) |
refactoring
Diffstat (limited to 'web/kvm')
-rw-r--r-- | web/kvm/navbar-health.pug | 4 | ||||
-rw-r--r-- | web/kvm/navbar.pug | 7 |
2 files changed, 5 insertions, 6 deletions
diff --git a/web/kvm/navbar-health.pug b/web/kvm/navbar-health.pug index e7689704..277c45de 100644 --- a/web/kvm/navbar-health.pug +++ b/web/kvm/navbar-health.pug @@ -1,8 +1,8 @@ div(id="hw-health-dropdown" class="hidden") li(class="left") a(class="menu-button" href="#") - img(data-dont-hide-menu id="hw-health-undervoltage-led" class="hidden" src=`${svg_dir}/led-undervoltage.svg`) - img(data-dont-hide-menu id="hw-health-overheating-led" class="hidden" src=`${svg_dir}/led-overheating.svg`) + +navbar_led("hw-health-undervoltage-led", "led-undervoltage", "hidden") + +navbar_led("hw-health-overheating-led", "led-overheating", "hidden") | ↴ div(data-dont-hide-menu class="menu") +menu_message("warning", "Raspberry Pi's health is at risk") diff --git a/web/kvm/navbar.pug b/web/kvm/navbar.pug index 5d713193..3e38c93b 100644 --- a/web/kvm/navbar.pug +++ b/web/kvm/navbar.pug @@ -1,13 +1,12 @@ -mixin navbar_led(id, icon) - img(data-dont-hide-menu id=id, class="led-gray" src=`${svg_dir}/${icon}.svg`) +mixin navbar_led(id, icon, cls="led-gray") + img(data-dont-hide-menu id=id, class=cls src=`${svg_dir}/${icon}.svg`) mixin menu_message(icon, short, classes="") div(class="text") table tr td(rowspan="2") #[img(class=`sign ${classes}` src=`${svg_dir}/${icon}.svg`)] - td(style="line-height:1.5") - | #[b #{short}] + td(style="line-height:1.5") #[b #{short}] if block tr td |