luci-theme-argonv3: update to 1.7.2
This commit is contained in:
parent
109c08604d
commit
54e9e5a6c1
@ -8,8 +8,8 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
LUCI_TITLE:=Argon Theme
|
||||
LUCI_DEPENDS:=
|
||||
PKG_VERSION:=1.7.1
|
||||
PKG_RELEASE:=20210215
|
||||
PKG_VERSION:=1.7.2
|
||||
PKG_RELEASE:=20210309
|
||||
|
||||
include $(TOPDIR)/feeds/luci/luci.mk
|
||||
|
||||
|
||||
@ -2731,6 +2731,9 @@ input[name="nslookup"] {
|
||||
.node-network-diagnostics input {
|
||||
margin: 0.25rem !important;
|
||||
}
|
||||
.node-network-wireless .cbi-button-add {
|
||||
margin-left: 0;
|
||||
}
|
||||
/* fix nlbw/display*/
|
||||
#detail-bubble.in {
|
||||
z-index: 500;
|
||||
|
||||
@ -240,7 +240,7 @@
|
||||
$(".cbi-section-table-titles, .cbi-section-table-descr, .cbi-section-descr").each(function () {
|
||||
var that = $(this);
|
||||
if (that.text().trim() == "") {
|
||||
that.css("display", "none");
|
||||
that.css("padding", "0px");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@ -3388,6 +3388,9 @@ input[name="nslookup"] {
|
||||
margin: 0.25rem !important;
|
||||
}
|
||||
|
||||
.node-network-wireless .cbi-button-add{
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@ -27,7 +27,8 @@
|
||||
local boardinfo = util.ubus("system", "board")
|
||||
local fs = require "nixio.fs"
|
||||
local nutil = require "nixio.util"
|
||||
|
||||
local uci = require 'luci.model.uci'.cursor()
|
||||
local theme_dir = media .. "/background/"
|
||||
function glob(...)
|
||||
local iter, code, msg = fs.glob(...)
|
||||
if iter then
|
||||
@ -41,30 +42,42 @@
|
||||
return str:match(".+%.(%w+)$")
|
||||
end
|
||||
|
||||
local bgcount = 0
|
||||
local currentBg = {}
|
||||
local bgs,attr = {}
|
||||
local theme_dir = media .. "/background/"
|
||||
for i, f in ipairs(glob("/www" .. theme_dir .. "*")) do
|
||||
attr = fs.stat(f)
|
||||
if attr then
|
||||
local ext = getExtension(fs.basename(f))
|
||||
if ext == "jpg" or ext == "png" or ext == "gif" or ext == "mp4" then
|
||||
local bg = {}
|
||||
bg.type = ext
|
||||
bg.url = theme_dir .. fs.basename(f)
|
||||
table.insert(bgs,bg)
|
||||
bgcount = bgcount + 1
|
||||
function fetchMedia(path)
|
||||
local bgArr = {}
|
||||
local numBg = 0
|
||||
for i, f in ipairs(glob(path)) do
|
||||
attr = fs.stat(f)
|
||||
if attr then
|
||||
local ext = getExtension(fs.basename(f))
|
||||
if ext == "jpg" or ext == "png" or ext == "gif" or ext == "mp4" then
|
||||
local bg = {}
|
||||
bg.type = ext
|
||||
bg.url = theme_dir .. fs.basename(f)
|
||||
table.insert(bgArr,bg)
|
||||
numBg = numBg + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
return bgArr,numBg
|
||||
end
|
||||
|
||||
if bgcount > 0 then
|
||||
currentBg = bgs[math.random(1,bgcount)]
|
||||
end
|
||||
local bgcount = 0
|
||||
local currentBg = {}
|
||||
local bgs = {}
|
||||
local theme_dir = media .. "/background/"
|
||||
local bing_background = fs.access('/etc/config/argon') and uci:get_first('argon', 'global', 'bing_background') or 0
|
||||
bgs,bgcount=fetchMedia("/www" .. theme_dir .. "*")
|
||||
%>
|
||||
<div class="login-page">
|
||||
<% if (bgcount > 0 and currentBg.type == "mp4") then %>
|
||||
|
||||
<%
|
||||
local bg_url = media .. "/img/bg1.jpg"
|
||||
if ( bing_background == "0" ) then
|
||||
if bgcount > 0 then
|
||||
currentBg = bgs[math.random(1,bgcount)]
|
||||
end
|
||||
if ( bgcount > 0 and currentBg.type == "mp4" ) then
|
||||
%>
|
||||
<div class="video">
|
||||
<video autoplay loop muted id="video">
|
||||
<source src="<%=currentBg.url%>" type="video/mp4">
|
||||
@ -82,10 +95,11 @@
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<% else
|
||||
local bg_url = media .. "/img/bg1.jpg"
|
||||
local bing = "123"
|
||||
if (bgcount == 0 ) then
|
||||
<% elseif ( bgcount > 0 and currentBg["type"] ~= "mp4") then
|
||||
bg_url = currentBg.url
|
||||
end
|
||||
else
|
||||
local bing = "123"
|
||||
local sys = require "luci.sys"
|
||||
local json = require "luci.jsonc"
|
||||
local remote_bg_url="http://www.bing.com/HPImageArchive.aspx?format=js&idx=0&n=1&mkt=en-US"
|
||||
@ -94,10 +108,9 @@
|
||||
if (bing and bing ~= '') then
|
||||
bg_url = "https://www.bing.com" .. json.parse(bing).images[1].url
|
||||
end
|
||||
elseif (bgcount > 0 and currentBg["type"] ~= "mp4") then
|
||||
bg_url = currentBg.url
|
||||
end
|
||||
%>
|
||||
<% if(currentBg["type"] ~= "mp4") then %>
|
||||
<div class="main-bg" id="main-bg" style="background-image:url(<%=bg_url%>)"></div>
|
||||
<% end %>
|
||||
<div class="login-container">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user