luci-app-alpha-config: Add theme configure
This commit is contained in:
parent
bd6a92977b
commit
06ef56c223
|
@ -33,7 +33,7 @@ local icon = {
|
||||||
|
|
||||||
local function getLink(nav)
|
local function getLink(nav)
|
||||||
local link = config[nav]
|
local link = config[nav]
|
||||||
return (link ~= "none") and link or nil
|
return (link and link ~= "none") and link or nil
|
||||||
end
|
end
|
||||||
|
|
||||||
local num_links = 0
|
local num_links = 0
|
||||||
|
@ -46,14 +46,23 @@ for i = 1, 6 do
|
||||||
end
|
end
|
||||||
|
|
||||||
local link_width = string.format("calc(100%% / %d)", num_links)
|
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
|
||||||
%>
|
%>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
@media screen and (max-width: 720px) {
|
.main>.main-left, .cbi-section, .cbi-section-error, #iptables, .Firewall form, #cbi-network>.cbi-section-node, #cbi-wireless>.cbi-section-node, #cbi-wireless>#wifi_assoclist_table, [data-tab-title], [data-page^="admin-system-admin"]:not(.node-main-login) .cbi-map:not(#cbi-dropbear), [data-page="admin-system-opkg"] #maincontent>.container, .tabs, .cbi-tabmenu, .cbi-tooltip {
|
||||||
.navbar a {
|
background-color: <%=background_color%>;
|
||||||
width: <%= link_width %>;
|
backdrop-filter: <%=link_blur%>;
|
||||||
}
|
-webkit-backdrop-filter: <%=link_blur%>;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: 720px) {
|
||||||
|
.navbar a {
|
||||||
|
width: <%=link_width%>;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue