Introduce variable 'brand_name' to avoid code repeatition

Signed-off-by: Giovanni Giacobbi <giovanni@giacobbi.net>
This commit is contained in:
Giovanni Giacobbi 2021-01-21 11:47:33 +01:00
parent c0f98acfa9
commit a9664a63d4
No known key found for this signature in database
GPG Key ID: 63A98B68F17EE59B

View File

@ -49,6 +49,9 @@
mode = uci:get_first('argon', 'global', 'mode')
bar_color = mode == 'dark' and dark_primary or primary
end
-- Brand name
local brand_name = boardinfo.hostname or "?"
-%>
<!DOCTYPE html>
<html lang="<%=luci.i18n.context.lang%>">
@ -224,7 +227,7 @@
<div class="main">
<div class="main-left" id="mainmenu" style="display:none">
<div class="sidenav-header d-flex align-items-center">
<a class="brand" href="#"><%=boardinfo.hostname or "?"%></a>
<a class="brand" href="#"><%=brand_name%></a>
<div class="ml-auto">
<!-- Sidenav toggler -->
<div class="sidenav-toggler d-none d-xl-block active" data-action="sidenav-unpin"
@ -243,7 +246,7 @@
<div class="fill">
<div class="container">
<a class="showSide"></a>
<a class="brand" href="#"><%=boardinfo.hostname or "?"%></a>
<a class="brand" href="#"><%=brand_name%></a>
<div class="status" id="indicators">
<span id="xhr_poll_status" style="display:none" onclick="XHR.running() ? XHR.halt() : XHR.run()">
<span class="label success" id="xhr_poll_status_on"><span class="mobile-hide"><%:Auto Refresh%></span> <%:on%></span>