Merge Mainline
This commit is contained in:
commit
f0fa1207de
@ -8,8 +8,8 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
LUCI_TITLE:=Argon Theme
|
||||
LUCI_DEPENDS:=
|
||||
PKG_VERSION:=1.6.4
|
||||
PKG_RELEASE:=20200727
|
||||
PKG_VERSION:=1.6.5
|
||||
PKG_RELEASE:=20200731
|
||||
|
||||
include $(TOPDIR)/feeds/luci/luci.mk
|
||||
|
||||
|
||||
@ -127,6 +127,20 @@ li {
|
||||
background-size: cover;
|
||||
transition: all 0.5s;
|
||||
}
|
||||
.login-page .video {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-color: #000;
|
||||
overflow: hidden;
|
||||
}
|
||||
.login-page .video video {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
.login-page .login-container {
|
||||
height: 100%;
|
||||
margin-left: 4.5rem;
|
||||
@ -558,7 +572,7 @@ footer a {
|
||||
}
|
||||
.main .main-left .nav li.slide .menu[data-title=VPN]:before {
|
||||
content: "\e90b";
|
||||
color: #5603ad;
|
||||
color: #aaad03;
|
||||
}
|
||||
.main .main-left .nav li.slide .menu[data-title=Network]:before {
|
||||
content: "\e908";
|
||||
@ -2676,6 +2690,10 @@ input[name="nslookup"] {
|
||||
float: right;
|
||||
margin-top: 0rem !important;
|
||||
}
|
||||
.login-page .video video {
|
||||
width: auto !important;
|
||||
height: 100% !important;
|
||||
}
|
||||
.login-page .login-container {
|
||||
margin-left: 0rem !important;
|
||||
width: 100%;
|
||||
|
||||
@ -147,6 +147,21 @@ li {
|
||||
background-size: cover;
|
||||
transition: all 0.5s;
|
||||
|
||||
.video {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-color: #000;
|
||||
overflow: hidden;
|
||||
video {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.login-container {
|
||||
height: 100%;
|
||||
margin-left: 4.5rem;
|
||||
@ -664,7 +679,7 @@ footer {
|
||||
|
||||
.menu[data-title=VPN]:before {
|
||||
content: "\e90b";
|
||||
color: #5603ad;
|
||||
color: #aaad03;
|
||||
}
|
||||
|
||||
.menu[data-title=Network]:before {
|
||||
@ -3370,6 +3385,12 @@ input[name="nslookup"] {
|
||||
float: right;
|
||||
margin-top: 0rem !important;
|
||||
}
|
||||
.login-page .video {
|
||||
video {
|
||||
width: auto !important;
|
||||
height: 100% !important;
|
||||
}
|
||||
}
|
||||
|
||||
.login-page .login-container {
|
||||
margin-left: 0rem !important;
|
||||
|
||||
@ -37,28 +37,12 @@
|
||||
local category = request[1]
|
||||
local tree = disp.node()
|
||||
local categories = disp.node_childs(tree)
|
||||
local ipkg = require "luci.model.ipkg"
|
||||
|
||||
function split( str,reps )
|
||||
local resultStrList = {}
|
||||
string.gsub(str,'[^'..reps..']+',function ( w )
|
||||
table.insert(resultStrList,w)
|
||||
end)
|
||||
return resultStrList
|
||||
end
|
||||
|
||||
local themepkg = ipkg.info("luci-theme-argon*")
|
||||
local theme_info
|
||||
for k,v in pairs(themepkg) do
|
||||
theme_info = v
|
||||
end
|
||||
local theme_version = split(theme_info["Version"],"-")
|
||||
%>
|
||||
</div>
|
||||
<footer class="mobile-hide">
|
||||
<div>
|
||||
<a class="luci-link" href="https://github.com/openwrt/luci">Powered by <%= ver.luciname %> (<%= ver.luciversion %>)</a> /
|
||||
<a href="https://github.com/jerrykuku/luci-theme-argon">ArgonTheme v<%=theme_version[1]%></a> /
|
||||
<a href="https://github.com/jerrykuku/luci-theme-argon">ArgonTheme v1.6.5</a> /
|
||||
<%= ver.distversion %>
|
||||
<% if #categories > 1 then %>
|
||||
<ul class="breadcrumb pull-right" id="modemenu">
|
||||
|
||||
@ -26,9 +26,9 @@
|
||||
local util = require "luci.util"
|
||||
local http = require "luci.http"
|
||||
local disp = require "luci.dispatcher"
|
||||
local fs = require "nixio.fs"
|
||||
local nutil = require "nixio.util"
|
||||
|
||||
local fs = require "nixio.fs"
|
||||
local nutil = require "nixio.util"
|
||||
local boardinfo = util.ubus("system", "board")
|
||||
|
||||
local request = disp.context.path
|
||||
@ -187,7 +187,7 @@
|
||||
end
|
||||
|
||||
math.randomseed(os.time())
|
||||
|
||||
|
||||
-%>
|
||||
|
||||
<!DOCTYPE html>
|
||||
@ -233,12 +233,49 @@
|
||||
<% if css then %>
|
||||
<style title="text/css"><%=css %></style>
|
||||
<% end -%>
|
||||
<script src="<%=resource%>/cbi.js"></script>
|
||||
<script src="<%=resource%>/xhr.js"></script>
|
||||
<script src="<%=media%>/js/jquery.min.js"></script>
|
||||
<script src="<%=resource%>/cbi.js?v=1.6.4"></script>
|
||||
<script src="<%=resource%>/xhr.js?v=1.6.4"></script>
|
||||
<script src="<%=media%>/js/jquery.min.js?v=1.6.4"></script>
|
||||
</head>
|
||||
|
||||
<body class="<%- if node then %><%= striptags( node.title ) %><%- end %> <% if luci.dispatcher.context.authsession then %>logged-in<% end %> lang_<%=luci.i18n.context.lang%> ">
|
||||
<div class="login-page">
|
||||
<%
|
||||
function glob(...)
|
||||
local iter, code, msg = fs.glob(...)
|
||||
if iter then
|
||||
return nutil.consume(iter)
|
||||
else
|
||||
return nil, code, msg
|
||||
end
|
||||
end
|
||||
function getExtension(str)
|
||||
return str:match(".+%.(%w+)$")
|
||||
end
|
||||
local videocount = 0
|
||||
local attr = {}
|
||||
local vvits = {}
|
||||
local theme_dir = "/luci-static/argon/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 == "mp4" then
|
||||
vvits[videocount] = theme_dir .. fs.basename(f)
|
||||
videocount = videocount + 1
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
if videocount > 0 then
|
||||
%>
|
||||
<div class="video">
|
||||
<video autoplay="" loop="" muted="" >
|
||||
<source src="<%=vvits[math.random(0,videocount-1)]%>" type="video/mp4">
|
||||
</video>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="login-container">
|
||||
<div class="login-form">
|
||||
@ -25,7 +25,9 @@
|
||||
end
|
||||
|
||||
local bgcount = 0
|
||||
local inits, attr = {}
|
||||
local videocount = 0
|
||||
local inits,attr = {}
|
||||
local vvits = {}
|
||||
local theme_dir = "/luci-static/argon/background/"
|
||||
for i, f in ipairs(glob("/www" .. theme_dir .. "*")) do
|
||||
attr = fs.stat(f)
|
||||
@ -34,6 +36,9 @@
|
||||
if ext == "jpg" or ext == "png" or ext == "gif" then
|
||||
inits[bgcount] = theme_dir .. fs.basename(f)
|
||||
bgcount = bgcount + 1
|
||||
elseif ext == "mp4" then
|
||||
vvits[videocount] = theme_dir .. fs.basename(f)
|
||||
videocount = videocount + 1
|
||||
end
|
||||
|
||||
end
|
||||
@ -68,16 +73,19 @@
|
||||
|
||||
<%
|
||||
|
||||
if bgcount == 0 then
|
||||
if (bgcount == 0 and videocount == 0) then
|
||||
local bingjson = "{}"
|
||||
local bing = string.gsub(luci.sys.exec("content=`wget --no-check-certificate -q -O - 'http://www.bing.com/HPImageArchive.aspx?format=js&idx=0&n=1&mkt=en-US'`;echo $content"), "\n", "")
|
||||
if (bing and bing ~= '') then
|
||||
bingjson = bing
|
||||
end
|
||||
%>
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
var input = document.getElementsByName('luci_password')[0];
|
||||
if (input)
|
||||
input.focus();
|
||||
|
||||
try {
|
||||
var bing = <%=bing%>;
|
||||
var bing = <%=bingjson%>;
|
||||
var bg = "https://www.bing.com" + bing.images[0].url;
|
||||
$(".login-page").css("background-image", "url(" + bg + ")");
|
||||
} catch{
|
||||
@ -86,7 +94,7 @@ if bgcount == 0 then
|
||||
}
|
||||
|
||||
//]]></script>
|
||||
<% else -%>
|
||||
<% elseif videocount == 0 then%>
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
console.log("can not access bing api");
|
||||
$(".login-page").css("background-image", "url(<%=inits[math.random(0,bgcount-1)]%>)");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user