<%# 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", "theme") -- Table to store navbar icons local icon = {} -- Iterate through all navbar entries uci:foreach("alpha", "navbar", function(section) local address = section.address local icon_url = section.icon if address and icon_url then -- Remove '/www/luci-static/alpha/' from icon_url icon_url = string.gsub(icon_url, "^/www/luci%-static/alpha/", "") icon[address] = icon_url end end) -- Check navbar enable status local navbar_enabled = config.navbar == "1" -- Calculate number of enabled navbar links local num_links = 0 uci:foreach("alpha", "navbar", function(section) if section.enable == "Enable" then num_links = num_links + 1 end end) -- Calculate link width for responsive design local link_width = string.format("calc(100%% / %d)", num_links) -- Retrieve theme properties local background_color = config.color or '#2222359a' local blur_value = tonumber(config.blur) or 20 local link_blur = string.format("blur(%dpx)", blur_value) %>