luci-theme-argon: sync with upstream source

Signed-off-by: Tianling Shen <cnsztl@project-openwrt.eu.org>
This commit is contained in:
jerrykuku 2021-02-15 23:38:03 +08:00 committed by Tianling Shen
parent 68c0a8986f
commit de5ec94e3a
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
4 changed files with 19 additions and 18 deletions

View File

@ -8,8 +8,8 @@ include $(TOPDIR)/rules.mk
LUCI_TITLE:=Argon Theme
LUCI_DEPENDS:=
PKG_VERSION:=2.2.5
PKG_RELEASE:=20200914
PKG_VERSION:=2.2.6
PKG_RELEASE:=20210215
include $(TOPDIR)/feeds/luci/luci.mk

View File

@ -0,0 +1,3 @@
/* Disable minification (remove `.min` from URL path) for more info */
(function(undefined) {}).call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});

View File

@ -114,7 +114,7 @@
<%=css %>
</style>
<% end -%>
<script src="https://cdn.polyfill.io/v2/polyfill.min.js"></script>
<script src="<%=media%>/js/polyfill.min.js"></script>
<script src="<%=url('admin/translations', luci.i18n.context.lang)%>?v=2.2.4"></script>
<script src="<%=resource%>/cbi.js?v=2.2.4"></script>
<script src="<%=resource%>/luci.js?v=2.2.4"></script>

View File

@ -82,25 +82,23 @@
}
})
</script>
<% else %>
<div class="main-bg" id="main-bg"
<%
if (bgcount == 0) then
local http = require "luci.sys"
<% else
local bg_url = media .. "/img/bg1.jpg"
local bing = "123"
if (bgcount == 0 ) then
local sys = require "luci.sys"
local json = require "luci.jsonc"
local bg_url = media .. "/img/bg1.jpg"
local bing = http.httpget("http://www.bing.com/HPImageArchive.aspx?format=js&idx=0&n=1&mkt=en-US")
local remote_bg_url="http://www.bing.com/HPImageArchive.aspx?format=js&idx=0&n=1&mkt=en-US"
--bing = sys.httpget(remote_bg_url)
bing = sys.exec("wget --timeout=0.5 -qO- '%s'" %remote_bg_url)
if (bing and bing ~= '') then
local bingjson = json.parse(bing)
bg_url = "https://www.bing.com" .. bingjson.images[1].url
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
%>
style="background-image:url(<%=bg_url%>)"
<% elseif (bgcount > 0 and currentBg["type"] ~= "mp4") then %>
style="background-image:url(<%=currentBg.url%>)"
<% end %>
></div>
<div class="main-bg" id="main-bg" style="background-image:url(<%=bg_url%>)"></div>
<% end %>
<div class="login-container">
<div class="login-form">