<%# Alpha os is made from me for all .. especially for indo wrt members and fan of OpenWrt or DBAI Community luci-theme-alpha Copyright 2024 derisamedia Have a bug? Please create an issue here on GitHub! luci-theme-material Copyright 2015 Lutty Yang luci-theme-bootstrap: Copyright 2008 Steven Barth Copyright 2008 Jo-Philipp Wich Copyright 2012 David Menting MUI: https://github.com/muicss/mui Licensed to the public under the Apache License 2.0 -%> <% local ver = require "luci.version" local uci = require "luci.model.uci".cursor() local config = uci:get_all("alpha", "config") local icon = { ['/cgi-bin/luci/admin/status/overview'] = '/gaya/icon/navbar/status.png', ['/cgi-bin/luci/admin/services/ttyd'] = '/gaya/icon/navbar/terminal.png', ['/cgi-bin/luci/admin/services/openclash'] = '/gaya/icon/navbar/oc.png', ['/cgi-bin/luci/admin/nas/tinyfm'] = '/gaya/icon/navbar/nas.png', ['/cgi-bin/luci/admin/modem/main'] = '/gaya/icon/navbar/modem.png', ['/cgi-bin/luci/admin/network/network'] = '/gaya/icon/navbar/interface.png', ['/cgi-bin/luci/admin/services/neko'] = '/gaya/icon/navbar/neko.png' } local function getLink(nav) local link = config[nav] return (link and link ~= "none") and link or nil end local num_links = 0 for i = 1, 6 do local nav_key = 'nav_0' .. i local link = getLink(nav_key) if link then num_links = num_links + 1 end end local link_width = string.format("calc(100%% / %d)", num_links) local blur_value = tonumber(config.blur) local link_blur = string.format("blur(%dpx)", blur_value) local background_color = config.color %>