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 | |
parent | 0d857282fe8df38f1cddffda78487cefbf21f3a2 (diff) |
refactoring
-rw-r--r-- | web/index.pug | 9 | ||||
-rw-r--r-- | web/kvm/navbar-health.pug | 4 | ||||
-rw-r--r-- | web/kvm/navbar.pug | 7 |
3 files changed, 8 insertions, 12 deletions
diff --git a/web/index.pug b/web/index.pug index 6dbb7df9..470f4927 100644 --- a/web/index.pug +++ b/web/index.pug @@ -12,17 +12,14 @@ block start img(class="svg-gray" src=`${svg_dir}/logo.svg` alt="Open Source Hardware" height="40") td(valign="top") table - tr - td(colspan="2" class="title") Open Source & Open Hardware IP-KVM - tr - td(colspan="2" class="copyright") Copyright © 2018 Pi-KVM Developers Team + tr #[td(colspan="2" class="title") Open Source & Open Hardware IP-KVM] + tr #[td(colspan="2" class="copyright") Copyright © 2018 Pi-KVM Developers Team] hr table td(class="server") td Server: - td - a(id="kvmd-meta-server-host" target="_blank" href="/api/info") + td #[a(id="kvmd-meta-server-host" target="_blank" href="/api/info")] hr div(id="apps-box") 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 |