Merge pull request #166 from cartender/pr/whitespace_cleanup

Clean up trailing whitespace, file headers, indentation and end of file newlines
This commit is contained in:
老竭力 2021-01-21 21:14:38 +08:00 committed by GitHub
commit dcc62fae29
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 61 additions and 60 deletions

View File

@ -1,2 +1,2 @@
Drop background here! Drop background here!
accept jpg png gif and mp4 accept jpg png gif and mp4

View File

@ -7,7 +7,7 @@
* Have a bug? Please create an issue here on GitHub! * Have a bug? Please create an issue here on GitHub!
* https://github.com/jerrykuku/luci-theme-argon/issues * https://github.com/jerrykuku/luci-theme-argon/issues
* *
* luci-theme-material: * luci-theme-material:
* Copyright 2015 Lutty Yang <lutty@wcan.in> * Copyright 2015 Lutty Yang <lutty@wcan.in>
* https://github.com/LuttyYang/luci-theme-material/ * https://github.com/LuttyYang/luci-theme-material/
* *

View File

@ -24,7 +24,7 @@
* Login background * Login background
* https://unsplash.com/ * https://unsplash.com/
* *
* Licensed to the public under the Apache License 2.0 * Licensed to the public under the Apache License 2.0
*/ */
body { body {
background: #1e1e1e; background: #1e1e1e;

View File

@ -24,7 +24,7 @@
* Login background * Login background
* https://unsplash.com/ * https://unsplash.com/
* *
* Licensed to the public under the Apache License 2.0 * Licensed to the public under the Apache License 2.0
*/ */
@ -183,4 +183,4 @@
.icon-app:before { .icon-app:before {
content: "\e915"; content: "\e915";
} }

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -7,7 +7,7 @@
* Have a bug? Please create an issue here on GitHub! * Have a bug? Please create an issue here on GitHub!
* https://github.com/jerrykuku/luci-theme-argon/issues * https://github.com/jerrykuku/luci-theme-argon/issues
* *
* luci-theme-material: * luci-theme-material:
* Copyright 2015 Lutty Yang <lutty@wcan.in> * Copyright 2015 Lutty Yang <lutty@wcan.in>
* https://github.com/LuttyYang/luci-theme-material/ * https://github.com/LuttyYang/luci-theme-material/
* *

View File

@ -8,7 +8,7 @@
* Have a bug? Please create an issue here on GitHub! * Have a bug? Please create an issue here on GitHub!
* https://github.com/jerrykuku/luci-theme-argon/issues * https://github.com/jerrykuku/luci-theme-argon/issues
* *
* luci-theme-material: * luci-theme-material:
* Copyright 2015 Lutty Yang <lutty@wcan.in> * Copyright 2015 Lutty Yang <lutty@wcan.in>
* https://github.com/LuttyYang/luci-theme-material/ * https://github.com/LuttyYang/luci-theme-material/
* *
@ -3814,7 +3814,7 @@ pre.command-output {
display: inline-block; display: inline-block;
} }
.main>.main-left>.nav>.slide>.slide-menu>li>a { .main>.main-left>.nav>.slide>.slide-menu>li>a {
font-size: 0.8rem; font-size: 0.8rem;

View File

@ -25,7 +25,7 @@
* Login background * Login background
* https://unsplash.com/ * https://unsplash.com/
* *
* Licensed to the public under the Apache License 2.0 * Licensed to the public under the Apache License 2.0
*/ */
body { body {
@ -825,4 +825,4 @@ input,
} }
} }

View File

@ -7,13 +7,13 @@
Have a bug? Please create an issue here on GitHub! Have a bug? Please create an issue here on GitHub!
https://github.com/jerrykuku/luci-theme-argon/issues https://github.com/jerrykuku/luci-theme-argon/issues
luci-theme-material: luci-theme-material:
Copyright 2015 Lutty Yang <lutty@wcan.in> Copyright 2015 Lutty Yang <lutty@wcan.in>
Agron Theme
https://demos.creative-tim.com/argon-dashboard/index.html
Licensed to the public under the Apache License 2.0 Agron Theme
https://demos.creative-tim.com/argon-dashboard/index.html
Licensed to the public under the Apache License 2.0
-%> -%>
<% local ver = require "luci.version" %> <% local ver = require "luci.version" %>

View File

@ -7,13 +7,13 @@
Have a bug? Please create an issue here on GitHub! Have a bug? Please create an issue here on GitHub!
https://github.com/jerrykuku/luci-theme-argon/issues https://github.com/jerrykuku/luci-theme-argon/issues
luci-theme-material: luci-theme-material:
Copyright 2015 Lutty Yang <lutty@wcan.in> Copyright 2015 Lutty Yang <lutty@wcan.in>
Agron Theme
https://demos.creative-tim.com/argon-dashboard/index.html
Licensed to the public under the Apache License 2.0 Agron Theme
https://demos.creative-tim.com/argon-dashboard/index.html
Licensed to the public under the Apache License 2.0
-%> -%>
<% local ver = require "luci.version" %> <% local ver = require "luci.version" %>

View File

@ -5,19 +5,19 @@
Copyright 2020 Jerrykuku <jerrykuku@qq.com> Copyright 2020 Jerrykuku <jerrykuku@qq.com>
Have a bug? Please create an issue here on GitHub! Have a bug? Please create an issue here on GitHub!
https://github.com/jerrykuku/luci-theme-argon/issues https://github.com/jerrykuku/luci-theme-argon/issues
luci-theme-material: luci-theme-material:
Copyright 2015 Lutty Yang <lutty@wcan.in> Copyright 2015 Lutty Yang <lutty@wcan.in>
Agron Theme Argon Theme
https://demos.creative-tim.com/argon-dashboard/index.html https://demos.creative-tim.com/argon-dashboard/index.html
Licensed to the public under the Apache License 2.0 Licensed to the public under the Apache License 2.0
-%> -%>
<% <%
local sys = require "luci.sys" local sys = require "luci.sys"
local util = require "luci.util" local util = require "luci.util"
local http = require "luci.http" local http = require "luci.http"
local disp = require "luci.dispatcher" local disp = require "luci.dispatcher"
@ -25,15 +25,16 @@
local boardinfo = util.ubus("system", "board") local boardinfo = util.ubus("system", "board")
local node = disp.context.dispatched local node = disp.context.dispatched
local fs = require "nixio.fs" local fs = require "nixio.fs"
local nutil = require "nixio.util" local nutil = require "nixio.util"
local uci = require 'luci.model.uci'.cursor() local uci = require 'luci.model.uci'.cursor()
-- send as HTML5 -- send as HTML5
http.prepare_content("text/html") http.prepare_content("text/html")
math.randomseed(os.time()) math.randomseed(os.time())
-- Custom settings -- Custom settings
local mode = 'normal' local mode = 'normal'
local dark_css = fs.readfile('/www/luci-static/argon/css/dark.css') local dark_css = fs.readfile('/www/luci-static/argon/css/dark.css')
@ -54,7 +55,7 @@
<html lang="<%=luci.i18n.context.lang%>"> <html lang="<%=luci.i18n.context.lang%>">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title> <title>
<%=striptags( (boardinfo.hostname or "?") .. ( (node and node.title) and ' - ' .. translate(node.title) or '')) %> <%=striptags( (boardinfo.hostname or "?") .. ( (node and node.title) and ' - ' .. translate(node.title) or '')) %>
- LuCI</title> - LuCI</title>

View File

@ -1,39 +1,41 @@
<%# <%#
edge is a clean HTML5 theme for LuCI. It is based on luci-theme-material edge Template Argon is a clean HTML5 theme for LuCI. It is based on luci-theme-material Argon Template
luci-theme-edge luci-theme-argon
Copyright 2020 Jerrykuku <jerrykuku@qq.com> Copyright 2020 Jerrykuku <jerrykuku@qq.com>
Have a bug? Please create an issue here on GitHub! Have a bug? Please create an issue here on GitHub!
https://github.com/jerrykuku/luci-theme-edge/issues https://github.com/jerrykuku/luci-theme-argon/issues
luci-theme-material: luci-theme-material:
Copyright 2015 Lutty Yang <lutty@wcan.in> Copyright 2015 Lutty Yang <lutty@wcan.in>
Agron Theme Argon Theme
https://demos.creative-tim.com/edge-dashboard/index.html https://demos.creative-tim.com/argon-dashboard/index.html
Licensed to the public under the Apache License 2.0 Licensed to the public under the Apache License 2.0
-%> -%>
<% <%
local sys = require "luci.sys" local sys = require "luci.sys"
local util = require "luci.util" local util = require "luci.util"
local http = require "luci.http" local http = require "luci.http"
local disp = require "luci.dispatcher" local disp = require "luci.dispatcher"
local boardinfo = util.ubus("system", "board") local boardinfo = util.ubus("system", "board")
local node = disp.context.dispatched local node = disp.context.dispatched
local fs = require "nixio.fs"
local nutil = require "nixio.util" local fs = require "nixio.fs"
local uci = require 'luci.model.uci'.cursor() local nutil = require "nixio.util"
local uci = require 'luci.model.uci'.cursor()
-- send as HTML5 -- send as HTML5
http.prepare_content("text/html") http.prepare_content("text/html")
math.randomseed(tonumber(tostring(os.time()):reverse():sub(1, 9)))
-- Custom settings math.randomseed(tonumber(tostring(os.time()):reverse():sub(1, 9)))
-- Custom settings
local mode = 'normal' local mode = 'normal'
local dark_css = fs.readfile('/www/luci-static/argon/css/dark.css') local dark_css = fs.readfile('/www/luci-static/argon/css/dark.css')
local bar_color = '#5e72e4' local bar_color = '#5e72e4'
@ -47,8 +49,7 @@
blur_opacity_dark = uci:get_first('argon', 'global', 'transparency_dark') blur_opacity_dark = uci:get_first('argon', 'global', 'transparency_dark')
mode = uci:get_first('argon', 'global', 'mode') mode = uci:get_first('argon', 'global', 'mode')
bar_color = mode == 'dark' and dark_primary or primary bar_color = mode == 'dark' and dark_primary or primary
end end
-%> -%>
<!DOCTYPE html> <!DOCTYPE html>
<html lang="<%=luci.i18n.context.lang%>"> <html lang="<%=luci.i18n.context.lang%>">
@ -114,10 +115,9 @@
<script src="<%=resource%>/cbi.js<%# ?v=PKG_VERSION %>"></script> <script src="<%=resource%>/cbi.js<%# ?v=PKG_VERSION %>"></script>
<script src="<%=resource%>/xhr.js<%# ?v=PKG_VERSION %>"></script> <script src="<%=resource%>/xhr.js<%# ?v=PKG_VERSION %>"></script>
<script src="<%=media%>/js/jquery.min.js<%# ?v=PKG_VERSION %>"></script> <script src="<%=media%>/js/jquery.min.js<%# ?v=PKG_VERSION %>"></script>
</head> </head>
<body <body
class="lang_<%=luci.i18n.context.lang%> <% if node then %><%= striptags( node.title ) %><% end %> <% if luci.dispatcher.context.authsession then %>logged-in<% end %>" class="lang_<%=luci.i18n.context.lang%> <% if node then %><%= striptags( node.title ) %><% end %> <% if luci.dispatcher.context.authsession then %>logged-in<% end %>"
data-page="<%= table.concat(disp.context.requestpath, "-") %>"> data-page="<%= table.concat(disp.context.requestpath, "-") %>">

View File

@ -14,8 +14,8 @@
MUI: MUI:
https://github.com/muicss/mui https://github.com/muicss/mui
Agron Theme Argon Theme
https://demos.creative-tim.com/argon-dashboard/index.html https://demos.creative-tim.com/argon-dashboard/index.html
Licensed to the public under the Apache License 2.0 Licensed to the public under the Apache License 2.0
@ -25,7 +25,7 @@
<% <%
local util = require "luci.util" local util = require "luci.util"
local boardinfo = util.ubus("system", "board") local boardinfo = util.ubus("system", "board")
local fs = require "nixio.fs" local fs = require "nixio.fs"
local nutil = require "nixio.util" local nutil = require "nixio.util"
function glob(...) function glob(...)
@ -60,7 +60,7 @@
end end
if bgcount > 0 then if bgcount > 0 then
currentBg = bgs[math.random(1,bgcount)] currentBg = bgs[math.random(1,bgcount)]
end end
%> %>
<div class="login-page"> <div class="login-page">
@ -83,9 +83,9 @@
}) })
</script> </script>
<% else %> <% else %>
<div class="main-bg" id="main-bg" <div class="main-bg" id="main-bg"
<% <%
if (bgcount == 0 ) then if (bgcount == 0) then
local http = require "luci.sys" local http = require "luci.sys"
local json = require "luci.jsonc" local json = require "luci.jsonc"
local bg_url = media .. "/img/bg1.jpg" local bg_url = media .. "/img/bg1.jpg"
@ -96,11 +96,11 @@
end end
%> %>
style="background-image:url(<%=bg_url%>)" style="background-image:url(<%=bg_url%>)"
<% elseif (bgcount > 0 and currentBg["type"] ~= "mp4") then %> <% elseif (bgcount > 0 and currentBg["type"] ~= "mp4") then %>
style="background-image:url(<%=currentBg.url%>)" style="background-image:url(<%=currentBg.url%>)"
<% end %> <% end %>
></div> ></div>
<% end %> <% end %>
<div class="login-container"> <div class="login-container">
<div class="login-form"> <div class="login-form">