package lienol: sync packages
@ -8,8 +8,8 @@ include $(TOPDIR)/rules.mk
|
||||
LUCI_TITLE:=LuCI support for IPSec VPN Server
|
||||
LUCI_DEPENDS:=+strongswan +strongswan-minimal +strongswan-mod-xauth-generic
|
||||
LUCI_PKGARCH:=all
|
||||
PKG_VERSION:=1.0
|
||||
PKG_RELEASE:=13-20191213
|
||||
PKG_VERSION:=1.1
|
||||
PKG_RELEASE:=2
|
||||
|
||||
include $(TOPDIR)/feeds/luci/luci.mk
|
||||
|
||||
|
||||
@ -22,33 +22,17 @@ clientip.description = translate(
|
||||
clientip.optional = false
|
||||
clientip.rmempty = false
|
||||
|
||||
--[[
|
||||
clientdns = s:option(Value, "clientdns", translate("VPN Client DNS"))
|
||||
clientdns.datatype = "ip4addr"
|
||||
clientdns.description = translate("DNS using in VPN tunnel.")
|
||||
clientdns.optional = false
|
||||
clientdns.rmempty = false
|
||||
]]--
|
||||
|
||||
secret = s:option(Value, "secret", translate("Secret Pre-Shared Key"))
|
||||
secret.password = true
|
||||
|
||||
o = s:option(Flag, "is_nat", translate("is_nat"))
|
||||
o.rmempty = false
|
||||
|
||||
o = s:option(ListValue, "export_interface", translate("Interface"),
|
||||
translate("Specify interface forwarding traffic."))
|
||||
o:value("default", translate("default"))
|
||||
for _, iface in ipairs(ifaces) do
|
||||
if (iface:match("^br*") or iface:match("^eth*") or iface:match("^pppoe*") or
|
||||
iface:match("wlan*")) then
|
||||
local nets = net:get_interface(iface)
|
||||
nets = nets and nets:get_networks() or {}
|
||||
for k, v in pairs(nets) do nets[k] = nets[k].sid end
|
||||
nets = table.concat(nets, ",")
|
||||
o:value(iface, ((#nets > 0) and "%s (%s)" % {iface, nets} or iface))
|
||||
end
|
||||
end
|
||||
o:depends("is_nat", "1")
|
||||
|
||||
function mp.on_save(self)
|
||||
require "luci.model.uci"
|
||||
require "luci.sys"
|
||||
|
||||
@ -1,11 +1,9 @@
|
||||
|
||||
config service 'ipsec'
|
||||
option secret 'ipsec'
|
||||
option clientip '192.168.100.1/24'
|
||||
option is_nat '1'
|
||||
option export_interface 'default'
|
||||
option clientdns '208.67.222.222'
|
||||
option enabled '0'
|
||||
option secret 'ipsec'
|
||||
option clientip '192.168.100.10/24'
|
||||
option clientdns '192.168.1.1'
|
||||
|
||||
config users
|
||||
option enabled '1'
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
# Copyright (C) 2018-2019 Lienol <lawlienol@gmail.com>
|
||||
|
||||
START=90
|
||||
STOP=10
|
||||
@ -47,7 +46,7 @@ remove_includes() {
|
||||
do_include() {
|
||||
local conf="$1"
|
||||
local uciconf="$2"
|
||||
local backup=`mktemp -t -p /tmp/ ipsec-init-XXXXXX`
|
||||
local backup=$(mktemp -t -p /tmp/ ipsec-init-XXXXXX)
|
||||
|
||||
[ ! -f "${conf}" ] && rm -rf "${conf}"
|
||||
touch "${conf}"
|
||||
@ -242,7 +241,7 @@ config_remote() {
|
||||
local ipdest
|
||||
|
||||
[ "$remote_gateway" = "%any" ] && ipdest="1.1.1.1" || ipdest="$remote_gateway"
|
||||
local_gateway=`ip route get $ipdest | awk -F"src" '/src/{gsub(/ /,"");print $2}'`
|
||||
local_gateway=$(ip route get $ipdest | awk -F"src" '/src/{gsub(/ /,"");print $2}')
|
||||
}
|
||||
|
||||
[ -n "$local_identifier" ] && secret_xappend -n "$local_identifier " || secret_xappend -n "$local_gateway "
|
||||
@ -339,7 +338,7 @@ service_running() {
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
local bool vt_enabled=`uci get ipsec.@service[0].enabled 2>/dev/null`
|
||||
local bool vt_enabled=$(uci get ipsec.@service[0].enabled 2>/dev/null)
|
||||
[ "$vt_enabled" = 0 ] && /etc/init.d/ipsecvpn stop > /dev/null 2>&1 && return
|
||||
running && {
|
||||
prepare_env
|
||||
@ -368,12 +367,11 @@ service_triggers() {
|
||||
|
||||
start_service() {
|
||||
fw3 reload
|
||||
local vt_enabled=`uci get ipsec.@service[0].enabled 2>/dev/null`
|
||||
local vt_clientip=`uci get ipsec.@service[0].clientip`
|
||||
local vt_clientdns=`uci get ipsec.@service[0].clientdns`
|
||||
local vt_secret=`uci get ipsec.@service[0].secret 2>/dev/null`
|
||||
local vt_is_nat=`uci get ipsec.@service[0].is_nat 2>/dev/null`
|
||||
local vt_export_interface=`uci get ipsec.@service[0].export_interface 2>/dev/null`
|
||||
local vt_enabled=$(uci -q get ipsec.@service[0].enabled)
|
||||
local vt_clientip=$(uci -q get ipsec.@service[0].clientip)
|
||||
local vt_clientdns=$(uci -q get ipsec.@service[0].clientdns)
|
||||
[ -z "$vt_clientdns" ] && local vt_clientdns="8.8.4.4"
|
||||
local vt_secret=$(uci -q get ipsec.@service[0].secret)
|
||||
|
||||
[ "$vt_enabled" = 0 ] && /etc/init.d/ipsecvpn stop > /dev/null 2>&1 && return
|
||||
|
||||
|
||||
@ -1,45 +1,37 @@
|
||||
#!/bin/sh
|
||||
|
||||
iptables -D INPUT -p udp -m multiport --dports 500,4500 -m comment --comment "Rule For IPSec VPN Server" -j ACCEPT 2> /dev/null
|
||||
ipsec_nums=`iptables -t nat -L POSTROUTING 2> /dev/null|grep -c "Rule For IPSec VPN Server"`
|
||||
iptables -D INPUT -p udp -m multiport --dports 500,4500 -m comment --comment "IPSec VPN Server" -j ACCEPT 2> /dev/null
|
||||
ipsec_nums=$(iptables -t nat -L POSTROUTING 2> /dev/null | grep -c "IPSec VPN Server")
|
||||
if [ -n "$ipsec_nums" ]; then
|
||||
until [ "$ipsec_nums" = 0 ]
|
||||
do
|
||||
rules=`iptables -t nat -L POSTROUTING --line-num 2> /dev/null|grep "Rule For IPSec VPN Server" |awk '{print $1}'`
|
||||
rules=$(iptables -t nat -L POSTROUTING --line-num 2> /dev/null | grep "IPSec VPN Server" |awk '{print $1}')
|
||||
for rule in $rules
|
||||
do
|
||||
iptables -t nat -D POSTROUTING $rule 2> /dev/null
|
||||
break
|
||||
done
|
||||
ipsec_nums=`expr $ipsec_nums - 1`
|
||||
ipsec_nums=$(expr $ipsec_nums - 1)
|
||||
done
|
||||
fi
|
||||
nums=`iptables -L forwarding_rule 2> /dev/null|grep -c "Rule For IPSec VPN Server"`
|
||||
nums=$(iptables -L forwarding_rule 2> /dev/null | grep -c "IPSec VPN Server")
|
||||
if [ -n "$nums" ]; then
|
||||
until [ "$nums" = 0 ]
|
||||
do
|
||||
rules=`iptables -L forwarding_rule --line-num 2> /dev/null|grep "Rule For IPSec VPN Server" |awk '{print $1}'`
|
||||
rules=$(iptables -L forwarding_rule --line-num 2> /dev/null | grep "IPSec VPN Server" |awk '{print $1}')
|
||||
for rule in $rules
|
||||
do
|
||||
iptables -D forwarding_rule $rule 2> /dev/null
|
||||
break
|
||||
done
|
||||
nums=`expr $nums - 1`
|
||||
nums=$(expr $nums - 1)
|
||||
done
|
||||
fi
|
||||
|
||||
enable=$(uci get ipsec.ipsec.enabled)
|
||||
if [ $enable -eq 1 ]; then
|
||||
is_nat=$(uci get ipsec.ipsec.is_nat)
|
||||
if [ "$is_nat" -eq 1 ];then
|
||||
clientip=$(uci get ipsec.ipsec.clientip)
|
||||
export_interface=$(uci get ipsec.ipsec.export_interface)
|
||||
if [ "$export_interface" != "default" ];then
|
||||
iptables -t nat -I POSTROUTING -s ${clientip%.*}.0/24 -o ${export_interface} -m comment --comment "Rule For IPSec VPN Server" -j MASQUERADE
|
||||
else
|
||||
iptables -t nat -I POSTROUTING -s ${clientip%.*}.0/24 -m comment --comment "Rule For IPSec VPN Server" -j MASQUERADE
|
||||
fi
|
||||
iptables -I forwarding_rule -s ${clientip%.*}.0/24 -m comment --comment "Rule For IPSec VPN Server" -j ACCEPT
|
||||
fi
|
||||
iptables -I INPUT -p udp -m multiport --dports 500,4500 -m comment --comment "Rule For IPSec VPN Server" -j ACCEPT
|
||||
enable=$(uci -q get ipsec.ipsec.enabled)
|
||||
if [ -n "$enable" -a "$enable" == 1 ]; then
|
||||
clientip=$(uci -q get ipsec.ipsec.clientip)
|
||||
iptables -t nat -I POSTROUTING -s ${clientip%.*}.0/24 -m comment --comment "IPSec VPN Server" -j MASQUERADE
|
||||
iptables -I forwarding_rule -s ${clientip%.*}.0/24 -m comment --comment "IPSec VPN Server" -j ACCEPT
|
||||
iptables -I INPUT -p udp -m multiport --dports 500,4500 -m comment --comment "IPSec VPN Server" -j ACCEPT
|
||||
fi
|
||||
|
||||
@ -1,16 +0,0 @@
|
||||
# Copyright (C) 2008-2019 Jerrykuku
|
||||
# Copyright (C) 2019 Lienol
|
||||
#
|
||||
# This is free software, licensed under the Apache License, Version 2.0 .
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
LUCI_TITLE:=Argon Magic Change Theme
|
||||
LUCI_DEPENDS:=
|
||||
PKG_VERSION:=1.3
|
||||
PKG_RELEASE:=03-20191206
|
||||
|
||||
include $(TOPDIR)/feeds/luci/luci.mk
|
||||
|
||||
# call BuildPackage - OpenWrt buildroot signature
|
||||
@ -1,7 +0,0 @@
|
||||
/*!
|
||||
Pure v1.0.1
|
||||
Copyright 2013 Yahoo!
|
||||
Licensed under the BSD License.
|
||||
https://github.com/pure-css/pure/blob/master/LICENSE.md
|
||||
*/
|
||||
.pure-g{letter-spacing:-.31em;text-rendering:optimizespeed;font-family:FreeSans,Arimo,"Droid Sans",Helvetica,Arial,sans-serif;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-flow:row wrap;-ms-flex-flow:row wrap;flex-flow:row wrap;-webkit-align-content:flex-start;-ms-flex-line-pack:start;align-content:flex-start}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){table .pure-g{display:block}}.opera-only :-o-prefocus,.pure-g{word-spacing:-.43em}.pure-u,.pure-u-1,.pure-u-1-1,.pure-u-1-12,.pure-u-1-2,.pure-u-1-24,.pure-u-1-3,.pure-u-1-4,.pure-u-1-5,.pure-u-1-6,.pure-u-1-8,.pure-u-10-24,.pure-u-11-12,.pure-u-11-24,.pure-u-12-24,.pure-u-13-24,.pure-u-14-24,.pure-u-15-24,.pure-u-16-24,.pure-u-17-24,.pure-u-18-24,.pure-u-19-24,.pure-u-2-24,.pure-u-2-3,.pure-u-2-5,.pure-u-20-24,.pure-u-21-24,.pure-u-22-24,.pure-u-23-24,.pure-u-24-24,.pure-u-3-24,.pure-u-3-4,.pure-u-3-5,.pure-u-3-8,.pure-u-4-24,.pure-u-4-5,.pure-u-5-12,.pure-u-5-24,.pure-u-5-5,.pure-u-5-6,.pure-u-5-8,.pure-u-6-24,.pure-u-7-12,.pure-u-7-24,.pure-u-7-8,.pure-u-8-24,.pure-u-9-24{display:inline-block;zoom:1;letter-spacing:normal;word-spacing:normal;vertical-align:top;text-rendering:auto}.pure-g [class*=pure-u]{font-family:sans-serif}.pure-u-1-24{width:4.1667%}.pure-u-1-12,.pure-u-2-24{width:8.3333%}.pure-u-1-8,.pure-u-3-24{width:12.5%}.pure-u-1-6,.pure-u-4-24{width:16.6667%}.pure-u-1-5{width:20%}.pure-u-5-24{width:20.8333%}.pure-u-1-4,.pure-u-6-24{width:25%}.pure-u-7-24{width:29.1667%}.pure-u-1-3,.pure-u-8-24{width:33.3333%}.pure-u-3-8,.pure-u-9-24{width:37.5%}.pure-u-2-5{width:40%}.pure-u-10-24,.pure-u-5-12{width:41.6667%}.pure-u-11-24{width:45.8333%}.pure-u-1-2,.pure-u-12-24{width:50%}.pure-u-13-24{width:54.1667%}.pure-u-14-24,.pure-u-7-12{width:58.3333%}.pure-u-3-5{width:60%}.pure-u-15-24,.pure-u-5-8{width:62.5%}.pure-u-16-24,.pure-u-2-3{width:66.6667%}.pure-u-17-24{width:70.8333%}.pure-u-18-24,.pure-u-3-4{width:75%}.pure-u-19-24{width:79.1667%}.pure-u-4-5{width:80%}.pure-u-20-24,.pure-u-5-6{width:83.3333%}.pure-u-21-24,.pure-u-7-8{width:87.5%}.pure-u-11-12,.pure-u-22-24{width:91.6667%}.pure-u-23-24{width:95.8333%}.pure-u-1,.pure-u-1-1,.pure-u-24-24,.pure-u-5-5{width:100%}
|
||||
|
Before Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 69 KiB |
@ -1,16 +0,0 @@
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<metadata>Generated by IcoMoon</metadata>
|
||||
<defs>
|
||||
<font id="icomoon" horiz-adv-x="1024">
|
||||
<font-face units-per-em="1024" ascent="960" descent="-64" />
|
||||
<missing-glyph horiz-adv-x="1024" />
|
||||
<glyph unicode=" " horiz-adv-x="512" d="" />
|
||||
<glyph unicode="" glyph-name="expand_less" d="M512 596.667l256-256-60-60-196 196-196-196-60 60z" />
|
||||
<glyph unicode="" glyph-name="expand_more" d="M708 572.667l60-60-256-256-256 256 60 60 196-196z" />
|
||||
<glyph unicode="" glyph-name="menu" d="M128 682.667h768v-86h-768v86zM128 384.667v84h768v-84h-768zM128 170.667v86h768v-86h-768z" />
|
||||
<glyph unicode="" glyph-name="favorite" d="M512 28.667l-62 56q-106 96-154 142t-107 114-81 123-22 113q0 98 67 166t167 68q116 0 192-90 76 90 192 90 100 0 167-68t67-166q0-78-52-162t-113-146-199-186z" />
|
||||
<glyph unicode="" glyph-name="spinner9" d="M512 960c-278.748 0-505.458-222.762-511.848-499.974 5.92 241.864 189.832 435.974 415.848 435.974 229.75 0 416-200.576 416-448 0-53.020 42.98-96 96-96s96 42.98 96 96c0 282.77-229.23 512-512 512zM512-64c278.748 0 505.458 222.762 511.848 499.974-5.92-241.864-189.832-435.974-415.848-435.974-229.75 0-416 200.576-416 448 0 53.020-42.98 96-96 96s-96-42.98-96-96c0-282.77 229.23-512 512-512z" />
|
||||
<glyph unicode="" glyph-name="question-circle" horiz-adv-x="878" d="M512 164.571v109.714q0 8-5.143 13.143t-13.143 5.143h-109.714q-8 0-13.143-5.143t-5.143-13.143v-109.714q0-8 5.143-13.143t13.143-5.143h109.714q8 0 13.143 5.143t5.143 13.143zM658.286 548.571q0 50.286-31.714 93.143t-79.143 66.286-97.143 23.429q-138.857 0-212-121.714-8.571-13.714 4.571-24l75.429-57.143q4-3.429 10.857-3.429 9.143 0 14.286 6.857 30.286 38.857 49.143 52.571 19.429 13.714 49.143 13.714 27.429 0 48.857-14.857t21.429-33.714q0-21.714-11.429-34.857t-38.857-25.714q-36-16-66-49.429t-30-71.714v-20.571q0-8 5.143-13.143t13.143-5.143h109.714q8 0 13.143 5.143t5.143 13.143q0 10.857 12.286 28.286t31.143 28.286q18.286 10.286 28 16.286t26.286 20 25.429 27.429 16 34.571 7.143 46.286zM877.714 438.857q0-119.429-58.857-220.286t-159.714-159.714-220.286-58.857-220.286 58.857-159.714 159.714-58.857 220.286 58.857 220.286 159.714 159.714 220.286 58.857 220.286-58.857 159.714-159.714 58.857-220.286z" />
|
||||
</font></defs></svg>
|
||||
|
Before Width: | Height: | Size: 2.4 KiB |
@ -1,12 +0,0 @@
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<metadata>Generated by IcoMoon</metadata>
|
||||
<defs>
|
||||
<font id="icomoon" horiz-adv-x="1024">
|
||||
<font-face units-per-em="1024" ascent="960" descent="-64" />
|
||||
<missing-glyph horiz-adv-x="1024" />
|
||||
<glyph unicode=" " horiz-adv-x="512" d="" />
|
||||
<glyph unicode="" glyph-name="angle-right" d="M704.6 414l-272-272c-18.8-18.8-49.2-18.8-67.8 0l-45.2 45.2c-18.8 18.8-18.8 49.2 0 67.8l192.8 192.8-192.8 192.8c-18.8 18.8-18.8 49.2 0 67.8l45 45.6c18.8 18.8 49.2 18.8 67.8 0l272-272c19-18.8 19-49.2 0.2-68z" />
|
||||
<glyph unicode="" glyph-name="password_unlock" d="M196.923 603.569v0zM827.077 507.077h-512v92.554c0 104.369 78.769 196.923 183.138 202.831 96.492 5.908 177.231-55.138 202.831-141.785 1.969-7.877 9.846-15.754 19.692-15.754h80.738c11.815 0 21.662 11.815 19.692 23.631-31.508 149.662-165.415 259.938-324.923 252.062-167.385-7.877-295.385-151.631-299.323-317.046v-96.492c-43.323 0-78.769-35.446-78.769-78.769v-374.154c0-43.323 35.446-78.769 78.769-78.769h630.154c43.323 0 78.769 35.446 78.769 78.769v374.154c0 43.323-35.446 78.769-78.769 78.769zM602.585 119.138c3.938-11.815-5.908-25.6-19.692-25.6h-143.754c-13.785 0-23.631 11.815-19.692 25.6l35.446 118.154c-29.538 19.692-47.262 55.138-39.385 94.523 7.877 37.415 37.415 66.954 76.8 74.831 63.015 11.815 118.154-33.477 118.154-92.554 0-31.508-15.754-61.046-41.354-76.8l33.477-118.154z" />
|
||||
</font></defs></svg>
|
||||
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 75 KiB |
|
Before Width: | Height: | Size: 166 KiB |
|
Before Width: | Height: | Size: 156 KiB |
@ -1,288 +0,0 @@
|
||||
/**
|
||||
* Argon is a clean HTML5 theme for LuCI. It is based on luci-theme-material and Argon Template
|
||||
*
|
||||
* luci-theme-argon
|
||||
* Copyright 2019 Jerrykuku <jerrykuku@qq.com>
|
||||
*
|
||||
* Have a bug? Please create an issue here on GitHub!
|
||||
* https://github.com/jerrykuku/luci-theme-argon/issues
|
||||
*
|
||||
* luci-theme-bootstrap:
|
||||
* Copyright 2008 Steven Barth <steven@midlink.org>
|
||||
* Copyright 2008 Jo-Philipp Wich <jow@openwrt.org>
|
||||
* Copyright 2012 David Menting <david@nut-bolt.nl>
|
||||
*
|
||||
* MUI:
|
||||
* https://github.com/muicss/mui
|
||||
*
|
||||
* luci-theme-material:
|
||||
* https://github.com/LuttyYang/luci-theme-material/
|
||||
*
|
||||
* Agron Theme
|
||||
* https://demos.creative-tim.com/argon-dashboard/index.html
|
||||
*
|
||||
* Login background
|
||||
* https://unsplash.com/
|
||||
*
|
||||
* Licensed to the public under the Apache License 2.0
|
||||
*/
|
||||
|
||||
/*
|
||||
* Font generate by Icomoon<icomoon.io>
|
||||
*/
|
||||
(function ($) {
|
||||
$(".main > .loading").hide();
|
||||
$(".main > .loading").fadeOut();
|
||||
|
||||
/**
|
||||
* trim text, Remove spaces, wrap
|
||||
* @param text
|
||||
* @returns {string}
|
||||
*/
|
||||
function trimText(text) {
|
||||
return text.replace(/[ \t\n\r]+/g, " ");
|
||||
}
|
||||
|
||||
|
||||
var lastNode = undefined;
|
||||
var mainNodeName = undefined;
|
||||
|
||||
var nodeUrl = "";
|
||||
(function (node) {
|
||||
if (node[0] == "admin") {
|
||||
luciLocation = [node[1], node[2]];
|
||||
} else {
|
||||
luciLocation = node;
|
||||
}
|
||||
|
||||
for (var i in luciLocation) {
|
||||
nodeUrl += luciLocation[i];
|
||||
if (i != luciLocation.length - 1) {
|
||||
nodeUrl += "/";
|
||||
}
|
||||
}
|
||||
})(luciLocation);
|
||||
|
||||
/**
|
||||
* get the current node by Burl (primary)
|
||||
* @returns {boolean} success?
|
||||
*/
|
||||
function getCurrentNodeByUrl() {
|
||||
var ret = false;
|
||||
if (!$('body').hasClass('logged-in')) {
|
||||
luciLocation = ["Main", "Login"];
|
||||
return true;
|
||||
}
|
||||
$(".main > .main-left > .nav > .slide > .active").next(".slide-menu").stop(true).slideUp("fast");
|
||||
$(".main > .main-left > .nav > .slide > .menu").removeClass("active");
|
||||
$(".main > .main-left > .nav > .slide > .menu").each(function () {
|
||||
var ulNode = $(this);
|
||||
|
||||
ulNode.next().find("a").each(function () {
|
||||
var that = $(this);
|
||||
var href = that.attr("href");
|
||||
|
||||
if (href.indexOf(nodeUrl) != -1) {
|
||||
ulNode.click();
|
||||
ulNode.next(".slide-menu").stop(true, true);
|
||||
lastNode = that.parent();
|
||||
lastNode.addClass("active");
|
||||
ret = true;
|
||||
return true;
|
||||
}
|
||||
});
|
||||
});
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* menu click
|
||||
*/
|
||||
$(".main > .main-left > .nav > .slide > .menu").click(function () {
|
||||
var ul = $(this).next(".slide-menu");
|
||||
var menu = $(this);
|
||||
if (!menu.hasClass("exit")) {
|
||||
$(".main > .main-left > .nav > .slide > .active").next(".slide-menu").stop(true).slideUp("fast");
|
||||
$(".main > .main-left > .nav > .slide > .menu").removeClass("active");
|
||||
if (!ul.is(":visible")) {
|
||||
menu.addClass("active");
|
||||
ul.addClass("active");
|
||||
ul.stop(true).slideDown("fast");
|
||||
} else {
|
||||
ul.stop(true).slideUp("fast", function () {
|
||||
menu.removeClass("active");
|
||||
ul.removeClass("active");
|
||||
});
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
// define what element should be observed by the observer
|
||||
// and what types of mutations trigger the callback
|
||||
if ($("#cbi-dhcp-lan-ignore").length > 0) {
|
||||
observer.observe(document.getElementById("cbi-dhcp-lan-ignore"), {
|
||||
subtree: true,
|
||||
attributes: true
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* hook menu click and add the hash
|
||||
*/
|
||||
$(".main > .main-left > .nav > .slide > .slide-menu > li > a").click(function () {
|
||||
if (lastNode != undefined)
|
||||
lastNode.removeClass("active");
|
||||
$(this).parent().addClass("active");
|
||||
$(".main > .loading").fadeIn("fast");
|
||||
return true;
|
||||
});
|
||||
|
||||
/**
|
||||
* fix menu click
|
||||
*/
|
||||
$(".main > .main-left > .nav > .slide > .slide-menu > li").click(function () {
|
||||
if (lastNode != undefined)
|
||||
lastNode.removeClass("active");
|
||||
$(this).addClass("active");
|
||||
$(".main > .loading").fadeIn("fast");
|
||||
window.location = $($(this).find("a")[0]).attr("href");
|
||||
return false;
|
||||
});
|
||||
|
||||
/**
|
||||
* fix submenu click
|
||||
*/
|
||||
$("#maincontent > .container > .tabs > li").click(function () {
|
||||
$(".main > .loading").fadeIn("fast");
|
||||
window.location = $($(this).find("a")[0]).attr("href");
|
||||
return false;
|
||||
});
|
||||
|
||||
/**
|
||||
* get current node and open it
|
||||
*/
|
||||
if (getCurrentNodeByUrl()) {
|
||||
mainNodeName = "node-" + luciLocation[0] + "-" + luciLocation[1];
|
||||
mainNodeName = mainNodeName.replace(/[ \t\n\r\/]+/g, "_").toLowerCase();
|
||||
$("body").addClass(mainNodeName);
|
||||
}
|
||||
$(".cbi-button-up").val("");
|
||||
$(".cbi-button-down").val("");
|
||||
|
||||
|
||||
/**
|
||||
* hook other "A Label" and add hash to it.
|
||||
*/
|
||||
$("#maincontent > .container").find("a").each(function () {
|
||||
var that = $(this);
|
||||
var onclick = that.attr("onclick");
|
||||
if (onclick == undefined || onclick == "") {
|
||||
that.click(function () {
|
||||
var href = that.attr("href");
|
||||
if (href.indexOf("#") == -1) {
|
||||
$(".main > .loading").fadeIn("fast");
|
||||
return true;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Sidebar expand
|
||||
*/
|
||||
var showSide = false;
|
||||
$(".showSide").click(function () {
|
||||
if (showSide) {
|
||||
$(".darkMask").stop(true).fadeOut("fast");
|
||||
$(".main-left").stop(true).animate({
|
||||
width: "0"
|
||||
}, "fast");
|
||||
$(".main-right").css("overflow-y", "auto");
|
||||
showSide = false;
|
||||
} else {
|
||||
$(".darkMask").stop(true).fadeIn("fast");
|
||||
$(".main-left").stop(true).animate({
|
||||
width: "15rem"
|
||||
}, "fast");
|
||||
$(".main-right").css("overflow-y", "hidden");
|
||||
showSide = true;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$(".darkMask").click(function () {
|
||||
if (showSide) {
|
||||
showSide = false;
|
||||
$(".darkMask").stop(true).fadeOut("fast");
|
||||
$(".main-left").stop(true).animate({
|
||||
width: "0"
|
||||
}, "fast");
|
||||
$(".main-right").css("overflow-y", "auto");
|
||||
}
|
||||
});
|
||||
|
||||
$(window).resize(function () {
|
||||
if ($(window).width() > 921) {
|
||||
$(".main-left").css("width", "");
|
||||
$(".darkMask").stop(true);
|
||||
$(".darkMask").css("display", "none");
|
||||
showSide = false;
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* fix legend position
|
||||
*/
|
||||
$("legend").each(function () {
|
||||
var that = $(this);
|
||||
that.after("<span class='panel-title'>" + that.text() + "</span>");
|
||||
});
|
||||
|
||||
$(".cbi-section-table-titles, .cbi-section-table-descr, .cbi-section-descr").each(function () {
|
||||
var that = $(this);
|
||||
if (that.text().trim() == "") {
|
||||
that.css("display", "none");
|
||||
}
|
||||
});
|
||||
|
||||
$(".node-main-login > .main .cbi-value.cbi-value-last .cbi-input-text").focus(function () {
|
||||
//$(".node-main-login > .main > .main-right > .login-bg").addClass("blur");
|
||||
});
|
||||
$(".node-main-login > .main .cbi-value.cbi-value-last .cbi-input-text").blur(function () {
|
||||
//$(".node-main-login > .main > .main-right > .login-bg").removeClass("blur");
|
||||
});
|
||||
|
||||
|
||||
$(".main-right").focus();
|
||||
$(".main-right").blur();
|
||||
$("input").attr("size", "0");
|
||||
|
||||
if (mainNodeName != undefined) {
|
||||
console.log(mainNodeName);
|
||||
switch (mainNodeName) {
|
||||
case "node-status-system_log":
|
||||
case "node-status-kernel_log":
|
||||
$("#syslog").focus(function () {
|
||||
$("#syslog").blur();
|
||||
$(".main-right").focus();
|
||||
$(".main-right").blur();
|
||||
});
|
||||
break;
|
||||
case "node-status-firewall":
|
||||
var button = $(".node-status-firewall > .main fieldset li > a");
|
||||
button.addClass("cbi-button cbi-button-reset a-to-btn");
|
||||
break;
|
||||
case "node-system-reboot":
|
||||
var button = $(".node-system-reboot > .main > .main-right p > a");
|
||||
button.addClass("cbi-button cbi-input-reset a-to-btn");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
})(jQuery);
|
||||
|
Before Width: | Height: | Size: 6.6 KiB |
|
Before Width: | Height: | Size: 2.4 KiB |
@ -1,16 +0,0 @@
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<metadata>Generated by IcoMoon</metadata>
|
||||
<defs>
|
||||
<font id="icomoon" horiz-adv-x="1024">
|
||||
<font-face units-per-em="1024" ascent="960" descent="-64" />
|
||||
<missing-glyph horiz-adv-x="1024" />
|
||||
<glyph unicode=" " horiz-adv-x="512" d="" />
|
||||
<glyph unicode="" glyph-name="expand_less" d="M512 596.667l256-256-60-60-196 196-196-196-60 60z" />
|
||||
<glyph unicode="" glyph-name="expand_more" d="M708 572.667l60-60-256-256-256 256 60 60 196-196z" />
|
||||
<glyph unicode="" glyph-name="menu" d="M128 682.667h768v-86h-768v86zM128 384.667v84h768v-84h-768zM128 170.667v86h768v-86h-768z" />
|
||||
<glyph unicode="" glyph-name="favorite" d="M512 28.667l-62 56q-106 96-154 142t-107 114-81 123-22 113q0 98 67 166t167 68q116 0 192-90 76 90 192 90 100 0 167-68t67-166q0-78-52-162t-113-146-199-186z" />
|
||||
<glyph unicode="" glyph-name="spinner9" d="M512 960c-278.748 0-505.458-222.762-511.848-499.974 5.92 241.864 189.832 435.974 415.848 435.974 229.75 0 416-200.576 416-448 0-53.020 42.98-96 96-96s96 42.98 96 96c0 282.77-229.23 512-512 512zM512-64c278.748 0 505.458 222.762 511.848 499.974-5.92-241.864-189.832-435.974-415.848-435.974-229.75 0-416 200.576-416 448 0 53.020-42.98 96-96 96s-96-42.98-96-96c0-282.77 229.23-512 512-512z" />
|
||||
<glyph unicode="" glyph-name="question-circle" horiz-adv-x="878" d="M512 164.571v109.714q0 8-5.143 13.143t-13.143 5.143h-109.714q-8 0-13.143-5.143t-5.143-13.143v-109.714q0-8 5.143-13.143t13.143-5.143h109.714q8 0 13.143 5.143t5.143 13.143zM658.286 548.571q0 50.286-31.714 93.143t-79.143 66.286-97.143 23.429q-138.857 0-212-121.714-8.571-13.714 4.571-24l75.429-57.143q4-3.429 10.857-3.429 9.143 0 14.286 6.857 30.286 38.857 49.143 52.571 19.429 13.714 49.143 13.714 27.429 0 48.857-14.857t21.429-33.714q0-21.714-11.429-34.857t-38.857-25.714q-36-16-66-49.429t-30-71.714v-20.571q0-8 5.143-13.143t13.143-5.143h109.714q8 0 13.143 5.143t5.143 13.143q0 10.857 12.286 28.286t31.143 28.286q18.286 10.286 28 16.286t26.286 20 25.429 27.429 16 34.571 7.143 46.286zM877.714 438.857q0-119.429-58.857-220.286t-159.714-159.714-220.286-58.857-220.286 58.857-159.714 159.714-58.857 220.286 58.857 220.286 159.714 159.714 220.286 58.857 220.286-58.857 159.714-159.714 58.857-220.286z" />
|
||||
</font></defs></svg>
|
||||
|
Before Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 24 KiB |
@ -1,251 +0,0 @@
|
||||
/**
|
||||
* Material is a clean HTML5 theme for LuCI. It is based on luci-theme-bootstrap and MUI
|
||||
*
|
||||
* luci-theme-material
|
||||
* Copyright 2015 Lutty Yang <lutty@wcan.in>
|
||||
*
|
||||
* Have a bug? Please create an issue here on GitHub!
|
||||
* https://github.com/LuttyYang/luci-theme-material/issues
|
||||
*
|
||||
* luci-theme-bootstrap:
|
||||
* Copyright 2008 Steven Barth <steven@midlink.org>
|
||||
* Copyright 2008 Jo-Philipp Wich <jow@openwrt.org>
|
||||
* Copyright 2012 David Menting <david@nut-bolt.nl>
|
||||
*
|
||||
* MUI:
|
||||
* https://github.com/muicss/mui
|
||||
*
|
||||
* Licensed to the public under the Apache License 2.0
|
||||
*/
|
||||
|
||||
|
||||
(function ($) {
|
||||
$(".main > .loading").fadeOut();
|
||||
|
||||
/**
|
||||
* trim text, Remove spaces, wrap
|
||||
* @param text
|
||||
* @returns {string}
|
||||
*/
|
||||
function trimText(text) {
|
||||
return text.replace(/[ \t\n\r]+/g, " ");
|
||||
}
|
||||
|
||||
|
||||
var lastNode = undefined;
|
||||
var mainNodeName = undefined;
|
||||
|
||||
var nodeUrl = "";
|
||||
(function(node){
|
||||
if (node[0] == "admin"){
|
||||
luciLocation = [node[1], node[2]];
|
||||
}else{
|
||||
luciLocation = node;
|
||||
}
|
||||
|
||||
for(var i in luciLocation){
|
||||
nodeUrl += luciLocation[i];
|
||||
if (i != luciLocation.length - 1){
|
||||
nodeUrl += "/";
|
||||
}
|
||||
}
|
||||
})(luciLocation);
|
||||
|
||||
/**
|
||||
* get the current node by Burl (primary)
|
||||
* @returns {boolean} success?
|
||||
*/
|
||||
function getCurrentNodeByUrl() {
|
||||
var ret = false;
|
||||
if (!$('body').hasClass('logged-in')) {
|
||||
luciLocation = ["Main", "Login"];
|
||||
return true;
|
||||
}
|
||||
|
||||
$(".main > .main-left > .nav > .slide > .menu").each(function () {
|
||||
var ulNode = $(this);
|
||||
ulNode.next().find("a").each(function () {
|
||||
var that = $(this);
|
||||
var href = that.attr("href");
|
||||
|
||||
if (href.indexOf(nodeUrl) != -1) {
|
||||
ulNode.click();
|
||||
ulNode.next(".slide-menu").stop(true, true);
|
||||
lastNode = that.parent();
|
||||
lastNode.addClass("active");
|
||||
ret = true;
|
||||
return true;
|
||||
}
|
||||
});
|
||||
});
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* menu click
|
||||
*/
|
||||
$(".main > .main-left > .nav > .slide > .menu").click(function () {
|
||||
var ul = $(this).next(".slide-menu");
|
||||
var menu = $(this);
|
||||
if (!ul.is(":visible")) {
|
||||
menu.addClass("active");
|
||||
ul.addClass("active");
|
||||
ul.stop(true).slideDown("fast");
|
||||
} else {
|
||||
ul.stop(true).slideUp("fast", function () {
|
||||
menu.removeClass("active");
|
||||
ul.removeClass("active");
|
||||
});
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
/**
|
||||
* hook menu click and add the hash
|
||||
*/
|
||||
$(".main > .main-left > .nav > .slide > .slide-menu > li > a").click(function () {
|
||||
if (lastNode != undefined) lastNode.removeClass("active");
|
||||
$(this).parent().addClass("active");
|
||||
$(".main > .loading").fadeIn("fast");
|
||||
return true;
|
||||
});
|
||||
|
||||
/**
|
||||
* fix menu click
|
||||
*/
|
||||
$(".main > .main-left > .nav > .slide > .slide-menu > li").click(function () {
|
||||
if (lastNode != undefined) lastNode.removeClass("active");
|
||||
$(this).addClass("active");
|
||||
$(".main > .loading").fadeIn("fast");
|
||||
window.location = $($(this).find("a")[0]).attr("href");
|
||||
return false;
|
||||
});
|
||||
|
||||
/**
|
||||
* fix submenu click
|
||||
*/
|
||||
$("#maincontent > .container > .tabs > li").click(function () {
|
||||
console.log("sub");
|
||||
$(".main > .loading").fadeIn("fast");
|
||||
window.location = $($(this).find("a")[0]).attr("href");
|
||||
return false;
|
||||
});
|
||||
/**
|
||||
* get current node and open it
|
||||
*/
|
||||
if (getCurrentNodeByUrl()) {
|
||||
mainNodeName = "node-" + luciLocation[0] + "-" + luciLocation[1];
|
||||
mainNodeName = mainNodeName.replace(/[ \t\n\r\/]+/g, "_").toLowerCase();
|
||||
$("body").addClass(mainNodeName);
|
||||
}
|
||||
$(".cbi-button-up").val("");
|
||||
$(".cbi-button-down").val("");
|
||||
|
||||
|
||||
/**
|
||||
* hook other "A Label" and add hash to it.
|
||||
*/
|
||||
$("#maincontent > .container").find("a").each(function () {
|
||||
var that = $(this);
|
||||
var href = that.attr("href");
|
||||
if (href != undefined && href.indexOf("javascript") != -1) {
|
||||
return true;
|
||||
}
|
||||
var onclick = that.attr("onclick");
|
||||
if (onclick == undefined || onclick == "") {
|
||||
that.click(function () {
|
||||
var href = that.attr("href");
|
||||
if (href.indexOf("#") == -1) {
|
||||
$(".main > .loading").fadeIn("fast");
|
||||
return true;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Sidebar expand
|
||||
*/
|
||||
var showSide = false;
|
||||
$(".showSide").click(function () {
|
||||
if (showSide) {
|
||||
$(".darkMask").stop(true).fadeOut("fast");
|
||||
$(".main-left").stop(true).animate({
|
||||
width: "0"
|
||||
}, "fast");
|
||||
$(".main-right").css("overflow-y", "auto");
|
||||
showSide = false;
|
||||
} else {
|
||||
$(".darkMask").stop(true).fadeIn("fast");
|
||||
$(".main-left").stop(true).animate({
|
||||
width: "15rem"
|
||||
}, "fast");
|
||||
$(".main-right").css("overflow-y", "hidden");
|
||||
showSide = true;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$(".darkMask").click(function () {
|
||||
if (showSide) {
|
||||
showSide = false;
|
||||
$(".darkMask").stop(true).fadeOut("fast");
|
||||
$(".main-left").stop(true).animate({
|
||||
width: "0"
|
||||
}, "fast");
|
||||
$(".main-right").css("overflow-y", "auto");
|
||||
}
|
||||
});
|
||||
|
||||
$(window).resize(function () {
|
||||
if ($(window).width() > 921) {
|
||||
$(".main-left").css("width", "");
|
||||
$(".darkMask").stop(true);
|
||||
$(".darkMask").css("display", "none");
|
||||
showSide = false;
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* fix legend position
|
||||
*/
|
||||
$("legend").each(function () {
|
||||
var that = $(this);
|
||||
that.after("<span class='panel-title'>" + that.text() + "</span>");
|
||||
});
|
||||
|
||||
/* $(".cbi-section-table-titles, .cbi-section-table-descr, .cbi-section-descr").each(function () {
|
||||
var that = $(this);
|
||||
if (that.text().trim() == ""){
|
||||
that.css("display", "none");
|
||||
}
|
||||
}); */
|
||||
|
||||
|
||||
$(".main-right").focus();
|
||||
$(".main-right").blur();
|
||||
$("input").attr("size", "0");
|
||||
|
||||
if (mainNodeName != undefined) {
|
||||
console.log(mainNodeName);
|
||||
switch (mainNodeName) {
|
||||
case "node-status-system_log":
|
||||
case "node-status-kernel_log":
|
||||
$("#syslog").focus(function () {
|
||||
$("#syslog").blur();
|
||||
$(".main-right").focus();
|
||||
$(".main-right").blur();
|
||||
});
|
||||
break;
|
||||
case "node-status-firewall":
|
||||
var button = $(".node-status-firewall > .main fieldset li > a");
|
||||
button.addClass("cbi-button cbi-button-reset a-to-btn");
|
||||
break;
|
||||
case "node-system-reboot":
|
||||
var button = $(".node-system-reboot > .main > .main-right p > a");
|
||||
button.addClass("cbi-button cbi-input-reset a-to-btn");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
})(jQuery);
|
||||
|
Before Width: | Height: | Size: 2.2 KiB |
@ -1,63 +0,0 @@
|
||||
<%#
|
||||
Argon is a clean HTML5 theme for LuCI. It is based on luci-theme-material and Argon Template
|
||||
|
||||
luci-theme-argon
|
||||
Copyright 2019 Jerrykuku <jerrykuku@qq.com>
|
||||
|
||||
Have a bug? Please create an issue here on GitHub!
|
||||
https://github.com/jerrykuku/luci-theme-argon/issues
|
||||
|
||||
luci-theme-bootstrap:
|
||||
Copyright 2008 Steven Barth <steven@midlink.org>
|
||||
Copyright 2008-2016 Jo-Philipp Wich <jow@openwrt.org>
|
||||
Copyright 2012 David Menting <david@nut-bolt.nl>
|
||||
|
||||
MUI:
|
||||
https://github.com/muicss/mui
|
||||
|
||||
luci-theme-material:
|
||||
https://github.com/LuttyYang/luci-theme-material/
|
||||
|
||||
Agron Theme
|
||||
https://demos.creative-tim.com/argon-dashboard/index.html
|
||||
|
||||
Login background
|
||||
https://unsplash.com/
|
||||
|
||||
Font generate by Icomoon
|
||||
https://icomoon.io/
|
||||
|
||||
Licensed to the public under the Apache License 2.0
|
||||
-%>
|
||||
|
||||
<%
|
||||
local ver = require "luci.version"
|
||||
local disp = require "luci.dispatcher"
|
||||
local request = disp.context.path
|
||||
local category = request[1]
|
||||
local tree = disp.node()
|
||||
local categories = disp.node_childs(tree)
|
||||
%>
|
||||
</div>
|
||||
<footer class="mobile-hide">
|
||||
<a href="https://github.com/openwrt/luci">Powered by <%= ver.luciname %> (<%= ver.luciversion %>)</a> /
|
||||
<%= ver.distversion %>
|
||||
<% if #categories > 1 then %>
|
||||
<ul class="breadcrumb pull-right" id="modemenu">
|
||||
<% for i, r in ipairs(categories) do %>
|
||||
<li<% if request[1] == r then %> class="active"<%end%>><a href="<%=controller%>/<%=r%>/"><%=striptags(translate(tree.nodes[r].title))%></a> <span class="divider">|</span></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% end %>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// thanks for Jo-Philipp Wich <jow@openwrt.org>
|
||||
var luciLocation = <%= luci.http.write_json(luci.dispatcher.context.path) %>;
|
||||
</script>
|
||||
|
||||
<script src="<%=media%>/js/script.js?v=<%=math.random(1,100000)%>"></script>
|
||||
</body>
|
||||
</html>
|
||||
@ -1,301 +0,0 @@
|
||||
<%#
|
||||
Argon is a clean HTML5 theme for LuCI. It is based on luci-theme-bootstrap and MUI and Argon Template
|
||||
|
||||
luci-theme-argon
|
||||
Copyright 2019 Jerrykuku <jerrykuku@qq.com>
|
||||
|
||||
Have a bug? Please create an issue here on GitHub!
|
||||
https://github.com/jerrykuku/luci-theme-argon/issues
|
||||
|
||||
luci-theme-bootstrap:
|
||||
Copyright 2008 Steven Barth <steven@midlink.org>
|
||||
Copyright 2008-2016 Jo-Philipp Wich <jow@openwrt.org>
|
||||
Copyright 2012 David Menting <david@nut-bolt.nl>
|
||||
|
||||
MUI:
|
||||
https://github.com/muicss/mui
|
||||
|
||||
Agron Theme
|
||||
https://demos.creative-tim.com/argon-dashboard/index.html
|
||||
|
||||
Licensed to the public under the Apache License 2.0
|
||||
-%>
|
||||
|
||||
<%
|
||||
local sys = require "luci.sys"
|
||||
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 boardinfo = util.ubus("system", "board")
|
||||
|
||||
local request = disp.context.path
|
||||
local request2 = disp.context.request
|
||||
|
||||
local category = request[1]
|
||||
local cattree = category and disp.node(category)
|
||||
|
||||
local leaf = request2[#request2]
|
||||
|
||||
local tree = disp.node()
|
||||
local node = disp.context.dispatched
|
||||
|
||||
local categories = disp.node_childs(tree)
|
||||
|
||||
local c = tree
|
||||
local i, r
|
||||
|
||||
function glob(...)
|
||||
local iter, code, msg = fs.glob(...)
|
||||
if iter then
|
||||
return nutil.consume(iter)
|
||||
else
|
||||
return nil, code, msg
|
||||
end
|
||||
end
|
||||
|
||||
-- tag all nodes leading to this page
|
||||
for i, r in ipairs(request) do
|
||||
if c.nodes and c.nodes[r] then
|
||||
c = c.nodes[r]
|
||||
c._menu_selected = true
|
||||
end
|
||||
end
|
||||
|
||||
-- send as HTML5
|
||||
http.prepare_content("text/html")
|
||||
|
||||
local function nodeurl(prefix, name, query)
|
||||
local u = url(prefix, name)
|
||||
if query then
|
||||
u = u .. http.build_querystring(query)
|
||||
end
|
||||
return pcdata(u)
|
||||
end
|
||||
|
||||
local function render_tabmenu(prefix, node, level)
|
||||
if not level then
|
||||
level = 1
|
||||
end
|
||||
|
||||
local childs = disp.node_childs(node)
|
||||
if #childs > 0 then
|
||||
if level > 2 then
|
||||
write('<ul class="tabs">')
|
||||
end
|
||||
|
||||
local selected_node
|
||||
local selected_name
|
||||
local i, v
|
||||
|
||||
for i, v in ipairs(childs) do
|
||||
local nnode = node.nodes[v]
|
||||
if nnode._menu_selected then
|
||||
selected_node = nnode
|
||||
selected_name = v
|
||||
end
|
||||
|
||||
if level > 2 then
|
||||
write('<li class="tabmenu-item-%s %s"><a href="%s">%s</a></li>' %{
|
||||
v, (nnode._menu_selected or (node.leaf and v == leaf)) and 'active' or '',
|
||||
nodeurl(prefix, v, nnode.query),
|
||||
striptags(translate(nnode.title))
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
if level > 2 then
|
||||
write('</ul>')
|
||||
end
|
||||
|
||||
if selected_node then
|
||||
render_tabmenu(prefix .. "/" .. selected_name, selected_node, level + 1)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function render_submenu(prefix, node)
|
||||
local childs = disp.node_childs(node)
|
||||
if #childs > 0 then
|
||||
write('<ul class="slide-menu">')
|
||||
|
||||
for i, r in ipairs(childs) do
|
||||
local nnode = node.nodes[r]
|
||||
local title = pcdata(striptags(translate(nnode.title)))
|
||||
|
||||
write('<li><a data-title="%s" href="%s">%s</a></li>' %{
|
||||
title,
|
||||
nodeurl(prefix, r, nnode.query),
|
||||
title
|
||||
})
|
||||
end
|
||||
|
||||
write('</ul>')
|
||||
end
|
||||
end
|
||||
|
||||
local function render_topmenu()
|
||||
local childs = disp.node_childs(cattree)
|
||||
if #childs > 0 then
|
||||
write('<ul class="nav">')
|
||||
|
||||
for i, r in ipairs(childs) do
|
||||
local nnode = cattree.nodes[r]
|
||||
local grandchildren = disp.node_childs(nnode)
|
||||
|
||||
if #grandchildren > 0 then
|
||||
local title = pcdata(striptags(translate(nnode.title)))
|
||||
local en_title = pcdata(striptags(string.gsub(nnode.title," ","_")))
|
||||
write('<li class="slide"><a class="menu" data-title="%s" href="#">%s</a>' %{
|
||||
en_title,
|
||||
title
|
||||
})
|
||||
|
||||
render_submenu(category .. "/" .. r, nnode)
|
||||
write('</li>')
|
||||
else
|
||||
local title = pcdata(striptags(translate(nnode.title)))
|
||||
local en_title = pcdata(striptags(nnode.title))
|
||||
write('<li class="slide"><a class="menu exit" data-title="%s" href="%s">%s</a></li>' %{
|
||||
en_title,
|
||||
nodeurl(category, r, nnode.query),
|
||||
title
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
write('</ul>')
|
||||
end
|
||||
end
|
||||
|
||||
local function render_changes()
|
||||
-- calculate the number of unsaved changes
|
||||
if tree.nodes[category] and tree.nodes[category].ucidata then
|
||||
local ucichanges = 0
|
||||
local i, j
|
||||
for i, j in pairs(require("luci.model.uci").cursor():changes()) do
|
||||
ucichanges = ucichanges + #j
|
||||
end
|
||||
|
||||
if ucichanges > 0 then
|
||||
write('<a class="uci_change_indicator label notice" href="%s?redir=%s">%s: %d</a>' %{
|
||||
url(category, 'uci/changes'),
|
||||
http.urlencode(http.formvalue('redir') or table.concat(disp.context.request, "/")),
|
||||
translate('Unsaved Changes'),
|
||||
ucichanges
|
||||
})
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
math.randomseed(os.time())
|
||||
|
||||
local bgcount = 0
|
||||
for f in ipairs(glob("/www/luci-static/argon_mc1/img/*")) do
|
||||
bgcount = bgcount + 1
|
||||
end
|
||||
|
||||
|
||||
-%>
|
||||
<!DOCTYPE html>
|
||||
<html lang="<%=luci.i18n.context.lang%>">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title><%=striptags( (boardinfo.hostname or "?") .. ( (node and node.title) and ' - ' .. translate(node.title) or '')) %> - LuCI</title>
|
||||
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport"/>
|
||||
<meta name="format-detection" content="telephone=no, email=no"/>
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="mobile-web-app-capable" content="yes">
|
||||
<meta name="x5-fullscreen" content="true">
|
||||
<meta name="full-screen" content="yes">
|
||||
<meta name="x5-page-mode" content="app">
|
||||
<meta name="browsermode" content="application">
|
||||
<meta name="theme-color" content="#5e72e4">
|
||||
<meta name="msapplication-tap-highlight" content="no">
|
||||
<meta name="msapplication-TileColor" content="#5e72e4">
|
||||
|
||||
<meta name="application-name" content="<%=striptags( (boardinfo.hostname or "?") ) %> - LuCI">
|
||||
<meta name="apple-mobile-web-app-title" content="<%=striptags( (boardinfo.hostname or "?") ) %> - LuCI">
|
||||
<meta name="msapplication-TileImage" content="<%=media%>/logo.png"/>
|
||||
<link rel="icon" href="<%=media%>/logo.png" sizes="144x144">
|
||||
<link rel="apple-touch-icon-precomposed" href="<%=media%>/logo.png" sizes="144x144">
|
||||
<link rel="stylesheet" href="<%=media%>/css/purecss.css?v=1.0">
|
||||
<link rel="stylesheet" href="<%=media%>/css/style.css?v=<%=math.random(1,100000)%>">
|
||||
<link rel="shortcut icon" href="<%=media%>/favicon.ico">
|
||||
<% if node and node.css then %>
|
||||
<link rel="stylesheet" href="<%=resource%>/<%=node.css%>">
|
||||
<% end -%>
|
||||
<% if css then %>
|
||||
<style title="text/css"><%= css %></style>
|
||||
<% end -%>
|
||||
<script src="<%=resource%>/cbi.js?v=git-19.190.55614-35357e4"></script>
|
||||
<script src="<%=resource%>/xhr.js?v=git-19.190.55614-35357e4"></script>
|
||||
<script src="<%=media%>/js/jquery.min.js?v=git-19.190.55614-35357e4"></script>
|
||||
</head>
|
||||
<body class="lang_<%=luci.i18n.context.lang%> <%- if node then %><%= striptags( node.title ) %><%- end %> <% if luci.dispatcher.context.authsession then %>logged-in<% end %>">
|
||||
|
||||
<div class="main">
|
||||
<div style="" class="loading">
|
||||
<div class="sk-folding-cube">
|
||||
<div class="sk-cube1 sk-cube"></div>
|
||||
<div class="sk-cube2 sk-cube"></div>
|
||||
<div class="sk-cube4 sk-cube"></div>
|
||||
<div class="sk-cube3 sk-cube"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="main-left">
|
||||
<div class="sidenav-header d-flex align-items-center">
|
||||
<a class="brand" href="#"><%=boardinfo.hostname or "?"%> ™</a>
|
||||
<div class="ml-auto">
|
||||
<!-- Sidenav toggler -->
|
||||
<div class="sidenav-toggler d-none d-xl-block active" data-action="sidenav-unpin" data-target="#sidenav-main">
|
||||
<div class="sidenav-toggler-inner">
|
||||
<i class="sidenav-toggler-line"></i>
|
||||
<i class="sidenav-toggler-line"></i>
|
||||
<i class="sidenav-toggler-line"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% render_topmenu() %>
|
||||
</div>
|
||||
<div class="main-right">
|
||||
<header class="bg-primary">
|
||||
<div class="fill">
|
||||
<div class="container">
|
||||
<a class="showSide"></a>
|
||||
<a class="brand" href="#"><%=boardinfo.hostname or "?"%> ™</a>
|
||||
<div class="pull-right">
|
||||
<% render_changes() %>
|
||||
<span id="xhr_poll_status" style="display:none" onclick="XHR.running() ? XHR.halt() : XHR.run()">
|
||||
<span class="label success" id="xhr_poll_status_on"><span class="mobile-hide"><%:Auto Refresh%></span> <%:on%></span>
|
||||
<span class="label" id="xhr_poll_status_off" style="display:none"><span class="mobile-hide"><%:Auto Refresh%></span> <%:off%></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<div class="darkMask"></div>
|
||||
<% if bgcount > 0 then %>
|
||||
<div class="login-bg" style="background-image:url(<%=media%>/img/bg<%=math.random(1,bgcount)%>.jpg)"></div>
|
||||
<% end %>
|
||||
<div id="maincontent">
|
||||
<div class="container">
|
||||
<%- if luci.sys.process.info("uid") == 0 and luci.sys.user.getuser("root") and not luci.sys.user.getpasswd("root") then -%>
|
||||
<div class="alert-message warning">
|
||||
<h4><%:No password set!%></h4>
|
||||
<p><%:There is no password set on this router. Please configure a root password to protect the web interface and enable SSH.%></p>
|
||||
<div class="right"><a class="btn" href="<%=url("admin/system/admin")%>"><%:Go to password configuration...%></a></div>
|
||||
</div>
|
||||
<%- end -%>
|
||||
|
||||
<noscript>
|
||||
<div class="alert-message warning">
|
||||
<h4><%:JavaScript required!%></h4>
|
||||
<p><%:You must enable JavaScript in your browser or LuCI will not work properly.%></p>
|
||||
</div>
|
||||
</noscript>
|
||||
|
||||
<% if category then render_tabmenu(category, cattree) end %>
|
||||
@ -1,51 +0,0 @@
|
||||
<%#
|
||||
Material is a clean HTML5 theme for LuCI. It is based on luci-theme-bootstrap and MUI
|
||||
|
||||
luci-theme-material
|
||||
Copyright 2015 Lutty Yang <lutty@wcan.in>
|
||||
|
||||
Have a bug? Please create an issue here on GitHub!
|
||||
https://github.com/LuttyYang/luci-theme-material/issues
|
||||
|
||||
luci-theme-bootstrap:
|
||||
Copyright 2008 Steven Barth <steven@midlink.org>
|
||||
Copyright 2008 Jo-Philipp Wich <jow@openwrt.org>
|
||||
Copyright 2012 David Menting <david@nut-bolt.nl>
|
||||
|
||||
MUI:
|
||||
https://github.com/muicss/mui
|
||||
|
||||
Licensed to the public under the Apache License 2.0
|
||||
-%>
|
||||
|
||||
<%
|
||||
local ver = require "luci.version"
|
||||
local disp = require "luci.dispatcher"
|
||||
local request = disp.context.path
|
||||
local category = request[1]
|
||||
local tree = disp.node()
|
||||
local categories = disp.node_childs(tree)
|
||||
%>
|
||||
</div>
|
||||
<footer class="mobile-hide">
|
||||
<a href="https://github.com/openwrt/luci">Powered by <%= ver.luciname %> (<%= ver.luciversion %>)</a> /
|
||||
<%= ver.distversion %>
|
||||
<% if #categories > 1 then %>
|
||||
<ul class="breadcrumb pull-right" id="modemenu">
|
||||
<% for i, r in ipairs(categories) do %>
|
||||
<li<% if request[1] == r then %> class="active"<%end%>><a href="<%=controller%>/<%=r%>/"><%=striptags(translate(tree.nodes[r].title))%></a> <span class="divider">|</span></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% end %>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// thanks for Jo-Philipp Wich <jow@openwrt.org>
|
||||
var luciLocation = <%= luci.http.write_json(luci.dispatcher.context.path) %>;
|
||||
</script>
|
||||
|
||||
<script src="<%=media%>/js/script.js?v=git-19.010.30902-fbc92dc"></script>
|
||||
</body>
|
||||
</html>
|
||||
@ -1,257 +0,0 @@
|
||||
<%#
|
||||
Material is a clean HTML5 theme for LuCI. It is based on luci-theme-bootstrap and MUI
|
||||
|
||||
luci-theme-material
|
||||
Copyright 2015-2017 Lutty Yang <lutty@wcan.in>
|
||||
|
||||
Have a bug? Please create an issue here on GitHub!
|
||||
https://github.com/LuttyYang/luci-theme-material/issues
|
||||
|
||||
luci-theme-bootstrap:
|
||||
Copyright 2008 Steven Barth <steven@midlink.org>
|
||||
Copyright 2008-2016 Jo-Philipp Wich <jow@openwrt.org>
|
||||
Copyright 2012 David Menting <david@nut-bolt.nl>
|
||||
|
||||
MUI:
|
||||
https://github.com/muicss/mui
|
||||
|
||||
Licensed to the public under the Apache License 2.0
|
||||
-%>
|
||||
|
||||
<%
|
||||
local sys = require "luci.sys"
|
||||
local util = require "luci.util"
|
||||
local http = require "luci.http"
|
||||
local disp = require "luci.dispatcher"
|
||||
|
||||
local boardinfo = util.ubus("system", "board")
|
||||
|
||||
local request = disp.context.path
|
||||
local request2 = disp.context.request
|
||||
|
||||
local category = request[1]
|
||||
local cattree = category and disp.node(category)
|
||||
|
||||
local leaf = request2[#request2]
|
||||
|
||||
local tree = disp.node()
|
||||
local node = disp.context.dispatched
|
||||
|
||||
local categories = disp.node_childs(tree)
|
||||
|
||||
local c = tree
|
||||
local i, r
|
||||
|
||||
-- tag all nodes leading to this page
|
||||
for i, r in ipairs(request) do
|
||||
if c.nodes and c.nodes[r] then
|
||||
c = c.nodes[r]
|
||||
c._menu_selected = true
|
||||
end
|
||||
end
|
||||
|
||||
-- send as HTML5
|
||||
http.prepare_content("text/html")
|
||||
|
||||
local function nodeurl(prefix, name, query)
|
||||
local u = url(prefix, name)
|
||||
if query then
|
||||
u = u .. http.build_querystring(query)
|
||||
end
|
||||
return pcdata(u)
|
||||
end
|
||||
|
||||
local function render_tabmenu(prefix, node, level)
|
||||
if not level then
|
||||
level = 1
|
||||
end
|
||||
|
||||
local childs = disp.node_childs(node)
|
||||
if #childs > 0 then
|
||||
if level > 2 then
|
||||
write('<ul class="tabs">')
|
||||
end
|
||||
|
||||
local selected_node
|
||||
local selected_name
|
||||
local i, v
|
||||
|
||||
for i, v in ipairs(childs) do
|
||||
local nnode = node.nodes[v]
|
||||
if nnode._menu_selected then
|
||||
selected_node = nnode
|
||||
selected_name = v
|
||||
end
|
||||
|
||||
if level > 2 then
|
||||
write('<li class="tabmenu-item-%s %s"><a href="%s">%s</a></li>' %{
|
||||
v, (nnode._menu_selected or (node.leaf and v == leaf)) and 'active' or '',
|
||||
nodeurl(prefix, v, nnode.query),
|
||||
striptags(translate(nnode.title))
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
if level > 2 then
|
||||
write('</ul>')
|
||||
end
|
||||
|
||||
if selected_node then
|
||||
render_tabmenu(prefix .. "/" .. selected_name, selected_node, level + 1)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function render_submenu(prefix, node)
|
||||
local childs = disp.node_childs(node)
|
||||
if #childs > 0 then
|
||||
write('<ul class="slide-menu">')
|
||||
|
||||
for i, r in ipairs(childs) do
|
||||
local nnode = node.nodes[r]
|
||||
local title = pcdata(striptags(translate(nnode.title)))
|
||||
|
||||
write('<li><a data-title="%s" href="%s">%s</a></li>' %{
|
||||
title,
|
||||
nodeurl(prefix, r, nnode.query),
|
||||
title
|
||||
})
|
||||
end
|
||||
|
||||
write('</ul>')
|
||||
end
|
||||
end
|
||||
|
||||
local function render_topmenu()
|
||||
local childs = disp.node_childs(cattree)
|
||||
if #childs > 0 then
|
||||
write('<ul class="nav">')
|
||||
|
||||
for i, r in ipairs(childs) do
|
||||
local nnode = cattree.nodes[r]
|
||||
local grandchildren = disp.node_childs(nnode)
|
||||
|
||||
if #grandchildren > 0 then
|
||||
local title = pcdata(striptags(translate(nnode.title)))
|
||||
local en_title = pcdata(striptags(string.gsub(nnode.title," ","_")))
|
||||
|
||||
write('<li class="slide"><a class="menu" data-title="%s" href="#">%s</a>' %{
|
||||
en_title,
|
||||
title
|
||||
})
|
||||
|
||||
render_submenu(category .. "/" .. r, nnode)
|
||||
write('</li>')
|
||||
else
|
||||
local title = pcdata(striptags(translate(nnode.title)))
|
||||
local en_title = pcdata(striptags(string.gsub(nnode.title," ","_")))
|
||||
|
||||
write('<li><a data-title="%s" href="%s">%s</a></li>' %{
|
||||
en_title,
|
||||
nodeurl(category, r, nnode.query),
|
||||
title
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
write('</ul>')
|
||||
end
|
||||
end
|
||||
|
||||
local function render_changes()
|
||||
-- calculate the number of unsaved changes
|
||||
if tree.nodes[category] and tree.nodes[category].ucidata then
|
||||
local ucichanges = 0
|
||||
|
||||
for i, j in pairs(require("luci.model.uci").cursor():changes()) do
|
||||
for k, l in pairs(j) do
|
||||
for m, n in pairs(l) do
|
||||
ucichanges = ucichanges + 1;
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if ucichanges > 0 then
|
||||
write('<a class="uci_change_indicator label notice" href="%s?redir=%s">%s: %d</a>' %{
|
||||
url(category, 'uci/changes'),
|
||||
http.urlencode(http.formvalue('redir') or table.concat(disp.context.request, "/")),
|
||||
translate('Unsaved Changes'),
|
||||
ucichanges
|
||||
})
|
||||
end
|
||||
end
|
||||
end
|
||||
-%>
|
||||
<!DOCTYPE html>
|
||||
<html lang="<%=luci.i18n.context.lang%>">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title><%=striptags( (boardinfo.hostname or "?") .. ( (node and node.title) and ' - ' .. translate(node.title) or '')) %> - LuCI</title>
|
||||
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport"/>
|
||||
<meta name="format-detection" content="telephone=no, email=no"/>
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="mobile-web-app-capable" content="yes">
|
||||
<meta name="x5-fullscreen" content="true">
|
||||
<meta name="full-screen" content="yes">
|
||||
<meta name="x5-page-mode" content="app">
|
||||
<meta name="browsermode" content="application">
|
||||
<meta name="theme-color" content="#282828">
|
||||
<meta name="msapplication-tap-highlight" content="no">
|
||||
<meta name="msapplication-TileColor" content="#282828">
|
||||
|
||||
<meta name="application-name" content="<%=striptags( (boardinfo.hostname or "?") ) %> - LuCI">
|
||||
<meta name="apple-mobile-web-app-title" content="<%=striptags( (boardinfo.hostname or "?") ) %> - LuCI">
|
||||
<meta name="msapplication-TileImage" content="<%=media%>/logo.png"/>
|
||||
<link rel="icon" href="<%=media%>/logo.png" sizes="144x144">
|
||||
<link rel="apple-touch-icon-precomposed" href="<%=media%>/logo.png" sizes="144x144">
|
||||
|
||||
<link rel="stylesheet" href="<%=media%>/css/style.css?v=git-19.010.30902-fbc92dc">
|
||||
<link rel="shortcut icon" href="<%=media%>/favicon.ico">
|
||||
<% if node and node.css then %>
|
||||
<link rel="stylesheet" href="<%=resource%>/<%=node.css%>">
|
||||
<% end -%>
|
||||
<% if css then %>
|
||||
<style title="text/css"><%= css %></style>
|
||||
<% end -%>
|
||||
<script src="<%=resource%>/cbi.js?v=git-19.060.34677-e62cc32"></script>
|
||||
<script src="<%=resource%>/xhr.js?v=git-19.010.30902-fbc92dc"></script>
|
||||
<script src="<%=media%>/js/jquery.min.js?v=git-19.010.30902-fbc92dc"></script>
|
||||
</head>
|
||||
<body class="lang_<%=luci.i18n.context.lang%> <%- if node then %><%= striptags( node.title ) %><%- end %> <% if luci.dispatcher.context.authsession then %>logged-in<% end %>">
|
||||
<header>
|
||||
<div class="container">
|
||||
<span class="showSide"></span>
|
||||
<a class="brand" href="#"><%=boardinfo.hostname or "?"%></a>
|
||||
<div class="pull-right">
|
||||
<% render_changes() %>
|
||||
<span id="xhr_poll_status" style="display:none" onclick="XHR.running() ? XHR.halt() : XHR.run()">
|
||||
<span class="label success" id="xhr_poll_status_on"><span class="mobile-hide"><%:Auto Refresh%></span> <%:on%></span>
|
||||
<span class="label" id="xhr_poll_status_off" style="display:none"><span class="mobile-hide"><%:Auto Refresh%></span> <%:off%></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<div class="main">
|
||||
<div style="" class="loading"><span><div class="loading-img"></div>Loading...</span></div>
|
||||
<div class="main-left">
|
||||
<% render_topmenu() %>
|
||||
</div>
|
||||
<div class="main-right">
|
||||
<div class="darkMask"></div>
|
||||
<div id="maincontent">
|
||||
<div class="container">
|
||||
<%- if luci.sys.process.info("uid") == 0 and luci.sys.user.getuser("root") and not luci.sys.user.getpasswd("root") then -%>
|
||||
<div class="alert-message warning">
|
||||
<h4><%:No password set!%></h4>
|
||||
<%:There is no password set on this router. Please configure a root password to protect the web interface and enable SSH.%><br>
|
||||
<a href="<%=pcdata(luci.dispatcher.build_url("admin/system/admin"))%>"><%:Go to password configuration...%></a>
|
||||
</div>
|
||||
<%- end -%>
|
||||
<% if category then render_tabmenu(category, cattree) end %>
|
||||
|
||||
<noscript>
|
||||
<div class="alert-message warning">
|
||||
<strong><%:JavaScript required!%></strong><br />
|
||||
<%:You must enable JavaScript in your browser or LuCI will not work properly.%>
|
||||
</div>
|
||||
</noscript>
|
||||
@ -1,7 +0,0 @@
|
||||
#!/bin/sh
|
||||
uci batch <<-EOF
|
||||
set luci.themes.Argon_MC1=/luci-static/argon_mc1
|
||||
set luci.themes.Argon_MC2=/luci-static/argon_mc2
|
||||
commit luci
|
||||
EOF
|
||||
exit 0
|
||||
@ -1,15 +0,0 @@
|
||||
# Copyright (C) 2018-2019 Lienol <lawlienol@gmail.com>
|
||||
#
|
||||
# This is free software, licensed under the Apache License, Version 2.0 .
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
LUCI_TITLE:=Bootstrap Magic Change Theme By Lienol
|
||||
LUCI_DEPENDS:=
|
||||
PKG_VERSION:=1.0
|
||||
PKG_RELEASE:=42-20191213
|
||||
|
||||
include $(TOPDIR)/feeds/luci/luci.mk
|
||||
|
||||
# call BuildPackage - OpenWrt buildroot signature
|
||||
@ -1,82 +0,0 @@
|
||||
header h3 a, header .brand {
|
||||
display:none !important;
|
||||
}
|
||||
|
||||
@media screen and (max-device-width: 1600px) {
|
||||
.container>.pull-right>* {
|
||||
position: absolute;
|
||||
top: 1rem;
|
||||
right: 0.5rem;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 480px) {
|
||||
body {
|
||||
font-size: 12px;
|
||||
}
|
||||
header {
|
||||
font-size: 13px;
|
||||
}
|
||||
legend {
|
||||
font-size: 14px;
|
||||
}
|
||||
.dropdown-menu a {
|
||||
font-size: 13px;
|
||||
min-width: 130px;
|
||||
padding: 0 15px;
|
||||
}
|
||||
.mobile-hide {
|
||||
display: none;
|
||||
}
|
||||
#maincontent.container {
|
||||
padding: 0px 10px;
|
||||
}
|
||||
div.cbi-section, fieldset {
|
||||
min-width: inherit;
|
||||
overflow-x: auto;
|
||||
overflow-y: hidden;
|
||||
}
|
||||
.cbi-value {
|
||||
}
|
||||
.cbi-value-title {
|
||||
width: 30%;
|
||||
min-width: 0rem !important;
|
||||
margin-right: 1em;
|
||||
/* text-align: left;
|
||||
padding-left: 1em; */
|
||||
}
|
||||
.cbi-value-field {
|
||||
width: 55%;
|
||||
}
|
||||
.cbi-value-description {
|
||||
width: 75%;
|
||||
display: inline-table;
|
||||
padding: 1px 1.2rem;
|
||||
background-position-y: 3px;
|
||||
}
|
||||
.cbi-value-field .cbi-input-select,
|
||||
.cbi-value input[type="password"],
|
||||
.cbi-value input[type="text"] {
|
||||
min-width: unset;
|
||||
/* width: 95%; */
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-device-width: 600px) {
|
||||
#maincontent.container {
|
||||
margin-top: 30px;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-device-width: 360px) {
|
||||
#maincontent.container {
|
||||
margin-top: 30px;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-device-width: 200px) {
|
||||
#maincontent.container {
|
||||
margin-top: 30px;
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 75 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
@ -1,3 +0,0 @@
|
||||
// HTML5 Shiv v3 | @jon_neal @afarkas @rem | MIT/GPL2 Licensed
|
||||
// Uncompressed source: https://github.com/aFarkas/html5shiv
|
||||
(function(a,b){function f(a){var c,d,e,f;b.documentMode>7?(c=b.createElement("font"),c.setAttribute("data-html5shiv",a.nodeName.toLowerCase())):c=b.createElement("shiv:"+a.nodeName);while(a.firstChild)c.appendChild(a.childNodes[0]);for(d=a.attributes,e=d.length,f=0;f<e;++f)d[f].specified&&c.setAttribute(d[f].nodeName,d[f].nodeValue);c.style.cssText=a.style.cssText,a.parentNode.replaceChild(c,a),c.originalElement=a}function g(a){var b=a.originalElement;while(a.childNodes.length)b.appendChild(a.childNodes[0]);a.parentNode.replaceChild(b,a)}function h(a,b){b=b||"all";var c=-1,d=[],e=a.length,f,g;while(++c<e){f=a[c],g=f.media||b;if(f.disabled||!/print|all/.test(g))continue;d.push(h(f.imports,g),f.cssText)}return d.join("")}function i(c){var d=new RegExp("(^|[\\s,{}])("+a.html5.elements.join("|")+")","gi"),e=c.split("{"),f=e.length,g=-1;while(++g<f)e[g]=e[g].split("}"),b.documentMode>7?e[g][e[g].length-1]=e[g][e[g].length-1].replace(d,'$1font[data-html5shiv="$2"]'):e[g][e[g].length-1]=e[g][e[g].length-1].replace(d,"$1shiv\\:$2"),e[g]=e[g].join("}");return e.join("{")}var c=function(a){return a.innerHTML="<x-element></x-element>",a.childNodes.length===1}(b.createElement("a")),d=function(a,b,c){return b.appendChild(a),(c=(c?c(a):a.currentStyle).display)&&b.removeChild(a)&&c==="block"}(b.createElement("nav"),b.documentElement,a.getComputedStyle),e={elements:"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video".split(" "),shivDocument:function(a){a=a||b;if(a.documentShived)return;a.documentShived=!0;var f=a.createElement,g=a.createDocumentFragment,h=a.getElementsByTagName("head")[0],i=function(a){f(a)};c||(e.elements.join(" ").replace(/\w+/g,i),a.createElement=function(a){var b=f(a);return b.canHaveChildren&&e.shivDocument(b.document),b},a.createDocumentFragment=function(){return e.shivDocument(g())});if(!d&&h){var j=f("div");j.innerHTML=["x<style>","article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}","audio{display:none}","canvas,video{display:inline-block;*display:inline;*zoom:1}","[hidden]{display:none}audio[controls]{display:inline-block;*display:inline;*zoom:1}","mark{background:#FF0;color:#000}","</style>"].join(""),h.insertBefore(j.lastChild,h.firstChild)}return a}};e.shivDocument(b),a.html5=e;if(c||!a.attachEvent)return;a.attachEvent("onbeforeprint",function(){if(a.html5.supportsXElement||!b.namespaces)return;b.namespaces.shiv||b.namespaces.add("shiv");var c=-1,d=new RegExp("^("+a.html5.elements.join("|")+")$","i"),e=b.getElementsByTagName("*"),g=e.length,j,k=i(h(function(a,b){var c=[],d=a.length;while(d)c.unshift(a[--d]);d=b.length;while(d)c.unshift(b[--d]);c.sort(function(a,b){return a.sourceIndex-b.sourceIndex}),d=c.length;while(d)c[--d]=c[d].styleSheet;return c}(b.getElementsByTagName("style"),b.getElementsByTagName("link"))));while(++c<g)j=e[c],d.test(j.nodeName)&&f(j);b.appendChild(b._shivedStyleSheet=b.createElement("style")).styleSheet.cssText=k}),a.attachEvent("onafterprint",function(){if(a.html5.supportsXElement||!b.namespaces)return;var c=-1,d=b.getElementsByTagName("*"),e=d.length,f;while(++c<e)f=d[c],f.originalElement&&g(f);b._shivedStyleSheet&&b._shivedStyleSheet.parentNode.removeChild(b._shivedStyleSheet)})})(this,document)
|
||||
@ -1,82 +0,0 @@
|
||||
header h3 a, header .brand {
|
||||
display:none !important;
|
||||
}
|
||||
|
||||
@media screen and (max-device-width: 1600px) {
|
||||
.container>.pull-right>* {
|
||||
position: absolute;
|
||||
top: 1rem;
|
||||
right: 0.5rem;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 480px) {
|
||||
body {
|
||||
font-size: 12px;
|
||||
}
|
||||
header {
|
||||
font-size: 13px;
|
||||
}
|
||||
legend {
|
||||
font-size: 14px;
|
||||
}
|
||||
.dropdown-menu a {
|
||||
font-size: 13px;
|
||||
min-width: 130px;
|
||||
padding: 0 15px;
|
||||
}
|
||||
.mobile-hide {
|
||||
display: none;
|
||||
}
|
||||
#maincontent.container {
|
||||
padding: 0px 10px;
|
||||
}
|
||||
div.cbi-section, fieldset {
|
||||
min-width: inherit;
|
||||
overflow-x: auto;
|
||||
overflow-y: hidden;
|
||||
}
|
||||
.cbi-value {
|
||||
}
|
||||
.cbi-value-title {
|
||||
width: 30%;
|
||||
min-width: 0rem !important;
|
||||
margin-right: 1em;
|
||||
/* text-align: left;
|
||||
padding-left: 1em; */
|
||||
}
|
||||
.cbi-value-field {
|
||||
width: 55%;
|
||||
}
|
||||
.cbi-value-description {
|
||||
width: 75%;
|
||||
display: inline-table;
|
||||
padding: 1px 1.2rem;
|
||||
background-position-y: 3px;
|
||||
}
|
||||
.cbi-value-field .cbi-input-select,
|
||||
.cbi-value input[type="password"],
|
||||
.cbi-value input[type="text"] {
|
||||
min-width: unset;
|
||||
/* width: 95%; */
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-device-width: 600px) {
|
||||
#maincontent.container {
|
||||
margin-top: 30px;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-device-width: 360px) {
|
||||
#maincontent.container {
|
||||
margin-top: 30px;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-device-width: 200px) {
|
||||
#maincontent.container {
|
||||
margin-top: 30px;
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 21 KiB |
@ -1,214 +0,0 @@
|
||||
<%#
|
||||
Copyright 2008 Steven Barth <steven@midlink.org>
|
||||
Copyright 2008 Jo-Philipp Wich <jow@openwrt.org>
|
||||
Copyright 2012 David Menting <david@nut-bolt.nl>
|
||||
Copyright 2018-2019 Lienol <lawlienol@gmail.com>
|
||||
Licensed to the public under the Apache License 2.0.
|
||||
-%>
|
||||
|
||||
<%
|
||||
local sys = require "luci.sys"
|
||||
local util = require "luci.util"
|
||||
local http = require "luci.http"
|
||||
local disp = require "luci.dispatcher"
|
||||
|
||||
local boardinfo = util.ubus("system", "board")
|
||||
|
||||
local request = disp.context.path
|
||||
local request2 = disp.context.request
|
||||
|
||||
local category = request[1]
|
||||
local cattree = category and disp.node(category)
|
||||
|
||||
local leaf = request2[#request2]
|
||||
|
||||
local tree = disp.node()
|
||||
local node = disp.context.dispatched
|
||||
|
||||
local categories = disp.node_childs(tree)
|
||||
|
||||
local c = tree
|
||||
local i, r
|
||||
|
||||
-- tag all nodes leading to this page
|
||||
for i, r in ipairs(request) do
|
||||
if c.nodes and c.nodes[r] then
|
||||
c = c.nodes[r]
|
||||
c._menu_selected = true
|
||||
end
|
||||
end
|
||||
|
||||
-- send as HTML5
|
||||
http.prepare_content("text/html")
|
||||
|
||||
local function nodeurl(prefix, name, query)
|
||||
local u = url(prefix, name)
|
||||
if query then
|
||||
u = u .. http.build_querystring(query)
|
||||
end
|
||||
return pcdata(u)
|
||||
end
|
||||
|
||||
local function render_tabmenu(prefix, node, level)
|
||||
if not level then
|
||||
level = 1
|
||||
end
|
||||
|
||||
local childs = disp.node_childs(node)
|
||||
if #childs > 0 then
|
||||
if level > 2 then
|
||||
write('<ul class="tabs">')
|
||||
end
|
||||
|
||||
local selected_node
|
||||
local selected_name
|
||||
local i, v
|
||||
|
||||
for i, v in ipairs(childs) do
|
||||
local nnode = node.nodes[v]
|
||||
if nnode._menu_selected then
|
||||
selected_node = nnode
|
||||
selected_name = v
|
||||
end
|
||||
|
||||
if level > 2 then
|
||||
write('<li class="tabmenu-item-%s %s"><a href="%s">%s</a></li>' %{
|
||||
v, (nnode._menu_selected or (node.leaf and v == leaf)) and 'active' or '',
|
||||
nodeurl(prefix, v, nnode.query),
|
||||
striptags(translate(nnode.title))
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
if level > 2 then
|
||||
write('</ul>')
|
||||
end
|
||||
|
||||
if selected_node then
|
||||
render_tabmenu(prefix .. "/" .. selected_name, selected_node, level + 1)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function render_submenu(prefix, node)
|
||||
local childs = disp.node_childs(node)
|
||||
if #childs > 0 then
|
||||
write('<ul class="dropdown-menu">')
|
||||
|
||||
for i, r in ipairs(childs) do
|
||||
local nnode = node.nodes[r]
|
||||
write('<li><a href="%s">%s</a></li>' %{
|
||||
nodeurl(prefix, r, nnode.query),
|
||||
pcdata(striptags(translate(nnode.title)))
|
||||
})
|
||||
end
|
||||
|
||||
write('</ul>')
|
||||
end
|
||||
end
|
||||
|
||||
local function render_topmenu()
|
||||
local childs = disp.node_childs(cattree)
|
||||
if #childs > 0 then
|
||||
write('<ul class="nav">')
|
||||
|
||||
for i, r in ipairs(childs) do
|
||||
local nnode = cattree.nodes[r]
|
||||
local grandchildren = disp.node_childs(nnode)
|
||||
|
||||
if #grandchildren > 0 then
|
||||
write('<li class="dropdown"><a class="menu" href="#">%s</a>' % pcdata(striptags(translate(nnode.title))))
|
||||
render_submenu(category .. "/" .. r, nnode)
|
||||
write('</li>')
|
||||
else
|
||||
write('<li><a href="%s">%s</a></li>' %{
|
||||
nodeurl(category, r, nnode.query),
|
||||
pcdata(striptags(translate(nnode.title)))
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
write('</ul>')
|
||||
end
|
||||
end
|
||||
|
||||
local function render_changes()
|
||||
-- calculate the number of unsaved changes
|
||||
if tree.nodes[category] and tree.nodes[category].ucidata then
|
||||
local ucichanges = 0
|
||||
|
||||
for i, j in pairs(require("luci.model.uci").cursor():changes()) do
|
||||
for k, l in pairs(j) do
|
||||
for m, n in pairs(l) do
|
||||
ucichanges = ucichanges + 1;
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if ucichanges > 0 then
|
||||
write('<a class="uci_change_indicator label notice" href="%s?redir=%s">%s: %d</a>' %{
|
||||
url(category, 'uci/changes'),
|
||||
http.urlencode(http.formvalue('redir') or table.concat(disp.context.request, "/")),
|
||||
translate('Unsaved Changes'),
|
||||
ucichanges
|
||||
})
|
||||
end
|
||||
end
|
||||
end
|
||||
-%>
|
||||
<!DOCTYPE html>
|
||||
<html lang="<%=luci.i18n.context.lang%>">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title><%=striptags( (boardinfo.hostname or "?") .. ( (node and node.title) and ' - ' .. translate(node.title) or '')) %> - LuCI</title>
|
||||
<!--[if lt IE 9]><script src="<%=media%>/html5.js?v=git-18.138.53009-80cb4fe"></script><![endif]-->
|
||||
<meta name="viewport" content="initial-scale=1.0">
|
||||
<link rel="stylesheet" href="<%=media%>/cascade.css?v=git-18.138.53009-80cb4fe">
|
||||
<link rel="stylesheet" media="only screen and (max-device-width: 854px)" href="<%=media%>/mobile.css?v=git-18.138.53009-80cb4fe" type="text/css" />
|
||||
<link rel="shortcut icon" href="<%=media%>/favicon.ico">
|
||||
<% if node and node.css then %>
|
||||
<link rel="stylesheet" href="<%=resource%>/<%=node.css%>">
|
||||
<% end -%>
|
||||
<% if css then %>
|
||||
<style title="text/css"><%= css %></style>
|
||||
<% end -%>
|
||||
<script src="<%=resource%>/cbi.js?v=git-19.060.34677-e62cc32"></script>
|
||||
<script src="<%=resource%>/xhr.js?v=git-18.138.53009-80cb4fe"></script>
|
||||
</head>
|
||||
|
||||
<body class="lang_<%=luci.i18n.context.lang%> <%- if node then %><%= striptags( node.title ) %><%- end %>">
|
||||
<header>
|
||||
<div class="fill">
|
||||
<div class="container">
|
||||
<a class="brand" href="#"><%=boardinfo.hostname or "?"%></a>
|
||||
<% render_topmenu() %>
|
||||
<div class="pull-right">
|
||||
<% render_changes() %>
|
||||
<span id="xhr_poll_status" style="display:none" onclick="XHR.running() ? XHR.halt() : XHR.run()">
|
||||
<span class="label success" id="xhr_poll_status_on"><span class="mobile-hide"><%:Auto Refresh%> </span><%:on%></span>
|
||||
<span class="label" id="xhr_poll_status_off" style="display:none"><span class="mobile-hide"><%:Auto Refresh%> </span><%:off%></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<%- if luci.sys.process.info("uid") == 0 and luci.sys.user.getuser("root") and not luci.sys.user.getpasswd("root") then -%>
|
||||
<div class="container">
|
||||
<div class="alert-message warning">
|
||||
<h4><%:No password set!%></h4>
|
||||
<%:There is no password set on this router. Please configure a root password to protect the web interface and enable SSH.%><br>
|
||||
<a href="<%=pcdata(luci.dispatcher.build_url("admin/system/admin"))%>"><%:Go to password configuration...%></a>
|
||||
</div>
|
||||
</div>
|
||||
<%- end -%>
|
||||
|
||||
<noscript>
|
||||
<div class="alert-message warning">
|
||||
<strong><%:JavaScript required!%></strong><br />
|
||||
<%:You must enable JavaScript in your browser or LuCI will not work properly.%>
|
||||
</div>
|
||||
</noscript>
|
||||
|
||||
<div id="maincontent" class="container">
|
||||
<% if category then render_tabmenu(category, cattree) end %>
|
||||
@ -1,55 +0,0 @@
|
||||
<%#
|
||||
Copyright 2008 Steven Barth <steven@midlink.org>
|
||||
Copyright 2008 Jo-Philipp Wich <jow@openwrt.org>
|
||||
Copyright 2012 David Menting <david@nut-bolt.nl>
|
||||
Copyright 2018-2019 Lienol <lawlienol@gmail.com>
|
||||
Licensed to the public under the Apache License 2.0.
|
||||
-%>
|
||||
|
||||
<%
|
||||
local ver = require "luci.version"
|
||||
local disp = require "luci.dispatcher"
|
||||
local request = disp.context.path
|
||||
local category = request[1]
|
||||
local tree = disp.node()
|
||||
local categories = disp.node_childs(tree)
|
||||
%>
|
||||
<footer>
|
||||
<a href="https://github.com/openwrt/luci">Powered by <%= ver.luciname %></a> / <%= ver.distversion %>
|
||||
<% if #categories > 1 then %>
|
||||
<ul class="breadcrumb pull-right" id="modemenu">
|
||||
<% for i, r in ipairs(categories) do %>
|
||||
<li<% if request[1] == r then %> class="active"<%end%>><a href="<%=controller%>/<%=r%>/"><%=striptags(translate(tree.nodes[r].title))%></a> <span class="divider">|</span></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% end %>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script>
|
||||
window.onload = function(){
|
||||
var content = document.getElementsByName("content");
|
||||
var luci_username = document.getElementsByName("luci_username");
|
||||
var luci_password = document.getElementsByName("luci_password");
|
||||
if (content.length == 1 && luci_username.length == 1 && luci_password.length == 1) {
|
||||
//需要登录
|
||||
document.body.classList.add('node-main-login');
|
||||
luci_username[0].parentElement.parentElement.classList.add('luci_username_div');
|
||||
luci_username[0].parentElement.parentElement.children[0].style.display = "none";
|
||||
luci_password[0].parentElement.parentElement.classList.add('luci_password_div');
|
||||
luci_password[0].parentElement.parentElement.children[0].style.display = "none";
|
||||
|
||||
var errorbox = document.getElementsByClassName("errorbox");
|
||||
if (errorbox.length == 1) {
|
||||
var tips = document.getElementsByClassName("cbi-map-descr");
|
||||
if (tips.length == 1) {
|
||||
tips[0].innerHTML = errorbox[0].innerHTML;
|
||||
tips[0].classList.add('errorbox');
|
||||
errorbox[0].style.display = "none";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</html>
|
||||
@ -1,214 +0,0 @@
|
||||
<%#
|
||||
Copyright 2008 Steven Barth <steven@midlink.org>
|
||||
Copyright 2008 Jo-Philipp Wich <jow@openwrt.org>
|
||||
Copyright 2012 David Menting <david@nut-bolt.nl>
|
||||
Copyright 2018-2019 Lienol <lawlienol@gmail.com>
|
||||
Licensed to the public under the Apache License 2.0.
|
||||
-%>
|
||||
|
||||
<%
|
||||
local sys = require "luci.sys"
|
||||
local util = require "luci.util"
|
||||
local http = require "luci.http"
|
||||
local disp = require "luci.dispatcher"
|
||||
|
||||
local boardinfo = util.ubus("system", "board")
|
||||
|
||||
local request = disp.context.path
|
||||
local request2 = disp.context.request
|
||||
|
||||
local category = request[1]
|
||||
local cattree = category and disp.node(category)
|
||||
|
||||
local leaf = request2[#request2]
|
||||
|
||||
local tree = disp.node()
|
||||
local node = disp.context.dispatched
|
||||
|
||||
local categories = disp.node_childs(tree)
|
||||
|
||||
local c = tree
|
||||
local i, r
|
||||
|
||||
-- tag all nodes leading to this page
|
||||
for i, r in ipairs(request) do
|
||||
if c.nodes and c.nodes[r] then
|
||||
c = c.nodes[r]
|
||||
c._menu_selected = true
|
||||
end
|
||||
end
|
||||
|
||||
-- send as HTML5
|
||||
http.prepare_content("text/html")
|
||||
|
||||
local function nodeurl(prefix, name, query)
|
||||
local u = url(prefix, name)
|
||||
if query then
|
||||
u = u .. http.build_querystring(query)
|
||||
end
|
||||
return pcdata(u)
|
||||
end
|
||||
|
||||
local function render_tabmenu(prefix, node, level)
|
||||
if not level then
|
||||
level = 1
|
||||
end
|
||||
|
||||
local childs = disp.node_childs(node)
|
||||
if #childs > 0 then
|
||||
if level > 2 then
|
||||
write('<ul class="tabs">')
|
||||
end
|
||||
|
||||
local selected_node
|
||||
local selected_name
|
||||
local i, v
|
||||
|
||||
for i, v in ipairs(childs) do
|
||||
local nnode = node.nodes[v]
|
||||
if nnode._menu_selected then
|
||||
selected_node = nnode
|
||||
selected_name = v
|
||||
end
|
||||
|
||||
if level > 2 then
|
||||
write('<li class="tabmenu-item-%s %s"><a href="%s">%s</a></li>' %{
|
||||
v, (nnode._menu_selected or (node.leaf and v == leaf)) and 'active' or '',
|
||||
nodeurl(prefix, v, nnode.query),
|
||||
striptags(translate(nnode.title))
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
if level > 2 then
|
||||
write('</ul>')
|
||||
end
|
||||
|
||||
if selected_node then
|
||||
render_tabmenu(prefix .. "/" .. selected_name, selected_node, level + 1)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function render_submenu(prefix, node)
|
||||
local childs = disp.node_childs(node)
|
||||
if #childs > 0 then
|
||||
write('<ul class="dropdown-menu">')
|
||||
|
||||
for i, r in ipairs(childs) do
|
||||
local nnode = node.nodes[r]
|
||||
write('<li><a href="%s">%s</a></li>' %{
|
||||
nodeurl(prefix, r, nnode.query),
|
||||
pcdata(striptags(translate(nnode.title)))
|
||||
})
|
||||
end
|
||||
|
||||
write('</ul>')
|
||||
end
|
||||
end
|
||||
|
||||
local function render_topmenu()
|
||||
local childs = disp.node_childs(cattree)
|
||||
if #childs > 0 then
|
||||
write('<ul class="nav">')
|
||||
|
||||
for i, r in ipairs(childs) do
|
||||
local nnode = cattree.nodes[r]
|
||||
local grandchildren = disp.node_childs(nnode)
|
||||
|
||||
if #grandchildren > 0 then
|
||||
write('<li class="dropdown"><a class="menu" href="#">%s</a>' % pcdata(striptags(translate(nnode.title))))
|
||||
render_submenu(category .. "/" .. r, nnode)
|
||||
write('</li>')
|
||||
else
|
||||
write('<li><a href="%s">%s</a></li>' %{
|
||||
nodeurl(category, r, nnode.query),
|
||||
pcdata(striptags(translate(nnode.title)))
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
write('</ul>')
|
||||
end
|
||||
end
|
||||
|
||||
local function render_changes()
|
||||
-- calculate the number of unsaved changes
|
||||
if tree.nodes[category] and tree.nodes[category].ucidata then
|
||||
local ucichanges = 0
|
||||
|
||||
for i, j in pairs(require("luci.model.uci").cursor():changes()) do
|
||||
for k, l in pairs(j) do
|
||||
for m, n in pairs(l) do
|
||||
ucichanges = ucichanges + 1;
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if ucichanges > 0 then
|
||||
write('<a class="uci_change_indicator label notice" href="%s?redir=%s">%s: %d</a>' %{
|
||||
url(category, 'uci/changes'),
|
||||
http.urlencode(http.formvalue('redir') or table.concat(disp.context.request, "/")),
|
||||
translate('Unsaved Changes'),
|
||||
ucichanges
|
||||
})
|
||||
end
|
||||
end
|
||||
end
|
||||
-%>
|
||||
<!DOCTYPE html>
|
||||
<html lang="<%=luci.i18n.context.lang%>">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title><%=striptags( (boardinfo.hostname or "?") .. ( (node and node.title) and ' - ' .. translate(node.title) or '')) %> - LuCI</title>
|
||||
<!--[if lt IE 9]><script src="<%=media%>/html5.js?v=git-18.138.53009-80cb4fe"></script><![endif]-->
|
||||
<meta name="viewport" content="initial-scale=1.0">
|
||||
<link rel="stylesheet" href="<%=media%>/cascade.css?v=git-18.138.53009-80cb4fe">
|
||||
<link rel="stylesheet" media="only screen and (max-device-width: 854px)" href="<%=media%>/mobile.css?v=git-18.138.53009-80cb4fe" type="text/css" />
|
||||
<link rel="shortcut icon" href="<%=media%>/favicon.ico">
|
||||
<% if node and node.css then %>
|
||||
<link rel="stylesheet" href="<%=resource%>/<%=node.css%>">
|
||||
<% end -%>
|
||||
<% if css then %>
|
||||
<style title="text/css"><%= css %></style>
|
||||
<% end -%>
|
||||
<script src="<%=resource%>/cbi.js?v=git-19.060.34677-e62cc32"></script>
|
||||
<script src="<%=resource%>/xhr.js?v=git-18.138.53009-80cb4fe"></script>
|
||||
</head>
|
||||
|
||||
<body class="lang_<%=luci.i18n.context.lang%> <%- if node then %><%= striptags( node.title ) %><%- end %>">
|
||||
<header>
|
||||
<div class="fill">
|
||||
<div class="container">
|
||||
<a class="brand" href="#"><%=boardinfo.hostname or "?"%></a>
|
||||
<% render_topmenu() %>
|
||||
<div class="pull-right">
|
||||
<% render_changes() %>
|
||||
<span id="xhr_poll_status" style="display:none" onclick="XHR.running() ? XHR.halt() : XHR.run()">
|
||||
<span class="label success" id="xhr_poll_status_on"><span class="mobile-hide"><%:Auto Refresh%> </span><%:on%></span>
|
||||
<span class="label" id="xhr_poll_status_off" style="display:none"><span class="mobile-hide"><%:Auto Refresh%> </span><%:off%></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<%- if luci.sys.process.info("uid") == 0 and luci.sys.user.getuser("root") and not luci.sys.user.getpasswd("root") then -%>
|
||||
<div class="container">
|
||||
<div class="alert-message warning">
|
||||
<h4><%:No password set!%></h4>
|
||||
<%:There is no password set on this router. Please configure a root password to protect the web interface and enable SSH.%><br>
|
||||
<a href="<%=pcdata(luci.dispatcher.build_url("admin/system/admin"))%>"><%:Go to password configuration...%></a>
|
||||
</div>
|
||||
</div>
|
||||
<%- end -%>
|
||||
|
||||
<noscript>
|
||||
<div class="alert-message warning">
|
||||
<strong><%:JavaScript required!%></strong><br />
|
||||
<%:You must enable JavaScript in your browser or LuCI will not work properly.%>
|
||||
</div>
|
||||
</noscript>
|
||||
|
||||
<div id="maincontent" class="container">
|
||||
<% if category then render_tabmenu(category, cattree) end %>
|
||||
@ -1,7 +0,0 @@
|
||||
#!/bin/sh
|
||||
uci batch <<-EOF
|
||||
set luci.themes.Bootstrap_Blue=/luci-static/bootstrap_blue
|
||||
set luci.themes.Bootstrap_Purple=/luci-static/bootstrap_purple
|
||||
commit luci
|
||||
EOF
|
||||
exit 0
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright (C) 2018-2020 Lienol <lawlienol@gmail.com>
|
||||
#
|
||||
# This is free software, licensed under the Apache License, Version 2.0 .
|
||||
# This is free software, licensed under the GNU General Public License v3.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
|
||||
LUCI_TITLE:=Bootstrap Mod Theme By Lienol
|
||||
LUCI_DEPENDS:=
|
||||
PKG_VERSION:=1.1
|
||||
PKG_RELEASE:=1-20200104
|
||||
PKG_RELEASE:=2-20200302
|
||||
|
||||
include $(TOPDIR)/feeds/luci/luci.mk
|
||||
|
||||
|
||||
@ -105,14 +105,14 @@ legend {
|
||||
}
|
||||
|
||||
.container {
|
||||
max-width: 1200px;
|
||||
max-width: 1080px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
/* Header */
|
||||
|
||||
header {
|
||||
font-size: 15px;
|
||||
font-size: 14px;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
@ -120,7 +120,7 @@ header {
|
||||
background: #34aee8;
|
||||
box-shadow: 0 2px 2px rgba(0, 0, 0, .1);
|
||||
z-index: 100;
|
||||
border-bottom: 3px solid #19a4e6;
|
||||
border-bottom: 2px solid #19a4e6;
|
||||
}
|
||||
|
||||
.brand {
|
||||
@ -193,9 +193,9 @@ header {
|
||||
.dropdown-menu a {
|
||||
color: #fff;
|
||||
line-height: 30px;
|
||||
min-width: 160px;
|
||||
min-width: 150px;
|
||||
padding: 0 20px;
|
||||
font-size: 15px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.dropdown-menu a:hover {
|
||||
@ -794,13 +794,13 @@ textarea,
|
||||
select {
|
||||
display: inline-block;
|
||||
width: 16em;
|
||||
padding: 0.5em;
|
||||
padding: 0.4em;
|
||||
border: 1px solid #118af3;
|
||||
border-radius: 5px;
|
||||
box-sizing: border-box;
|
||||
color: #111;
|
||||
font: inherit;
|
||||
line-height: 1em;
|
||||
line-height: 18px;
|
||||
}
|
||||
|
||||
table.cbi-section-table input,
|
||||
@ -906,7 +906,7 @@ button {
|
||||
border-radius: 6px !important;
|
||||
display: inline-block;
|
||||
background: #fff;
|
||||
border: 2px solid #118af3;
|
||||
border: 1px solid #118af3;
|
||||
border-radius: 2px;
|
||||
box-shadow: 0 2px 2px rgba(0, 0, 0, .05);
|
||||
color: #333;
|
||||
@ -1230,7 +1230,7 @@ button:focus {
|
||||
/* Footer */
|
||||
|
||||
footer {
|
||||
border-top: 2px solid #34aee8;
|
||||
border-top: 1px solid #34aee8;
|
||||
color: #111;
|
||||
text-align: center;
|
||||
padding: 10px 0;
|
||||
@ -1540,4 +1540,4 @@ body.modal-overlay-active #modal_overlay>.modal {
|
||||
white-space: pre;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
@ -5,7 +5,6 @@ header h3 a, header .brand {
|
||||
@media screen and (max-device-width: 1600px) {
|
||||
.container>.pull-right>* {
|
||||
position: absolute;
|
||||
top: 1rem;
|
||||
right: 0.5rem;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 75 KiB After Width: | Height: | Size: 75 KiB |
@ -15,7 +15,7 @@ body {
|
||||
}
|
||||
|
||||
a {
|
||||
color: #118af3;
|
||||
color: #0069d6;
|
||||
text-decoration: none;
|
||||
outline: 0;
|
||||
}
|
||||
@ -33,7 +33,7 @@ h6,
|
||||
p,
|
||||
.cbi-map-descr,
|
||||
.cbi-section-descr {
|
||||
color: #19a4e6;
|
||||
color: #404040;
|
||||
margin-top: 0;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
@ -51,7 +51,7 @@ tr,
|
||||
}
|
||||
|
||||
legend {
|
||||
color: #19a4e6;
|
||||
color: #404040;
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
padding: 0 0 3px;
|
||||
@ -105,22 +105,22 @@ legend {
|
||||
}
|
||||
|
||||
.container {
|
||||
max-width: 1000px;
|
||||
max-width: 1080px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
/* Header */
|
||||
|
||||
header {
|
||||
font-size: 15px;
|
||||
font-size: 14px;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
background: #34aee8;
|
||||
background: #222;
|
||||
box-shadow: 0 2px 2px rgba(0, 0, 0, .1);
|
||||
z-index: 100;
|
||||
border-bottom: 3px solid #19a4e6;
|
||||
border-bottom: 2px solid #ccc;
|
||||
}
|
||||
|
||||
.brand {
|
||||
@ -163,7 +163,7 @@ header {
|
||||
}
|
||||
|
||||
.dropdown:hover {
|
||||
background-color: #0088cc;
|
||||
background-color: rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
.dropdown:hover .dropdown-menu {
|
||||
@ -174,7 +174,7 @@ header {
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 40px;
|
||||
background: #34aee8;
|
||||
background: #222;
|
||||
border-radius: 5px;
|
||||
padding: 5px 0px;
|
||||
z-index: 100;
|
||||
@ -185,22 +185,22 @@ header {
|
||||
position: absolute;
|
||||
top: -6px;
|
||||
left: 27px;
|
||||
border-bottom: 6px solid #00aaff;
|
||||
border-bottom: 6px solid white;
|
||||
border-left: 7px solid transparent;
|
||||
border-right: 7px solid transparent;
|
||||
}
|
||||
|
||||
.dropdown-menu a {
|
||||
color: #fff;
|
||||
line-height: 32px;
|
||||
min-width: 160px;
|
||||
color: #999;
|
||||
line-height: 30px;
|
||||
min-width: 150px;
|
||||
padding: 0 20px;
|
||||
font-size: 15px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.dropdown-menu a:hover {
|
||||
background: #118af3;
|
||||
/* color: #3fc3ef; */
|
||||
background: #191919;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.cbi-dropdown {
|
||||
@ -391,26 +391,24 @@ header {
|
||||
/* Label */
|
||||
|
||||
.label {
|
||||
border-radius: 10px !important;
|
||||
display: inline-block;
|
||||
background: #bbb;
|
||||
border-bottom: 2px solid rgba(0, 0, 0, .05);
|
||||
border-radius: 4px;
|
||||
color: #fff;
|
||||
font-size: 14px;
|
||||
line-height: 24px;
|
||||
text-transform: uppercase;
|
||||
margin-top: 6px;
|
||||
padding: 2px 9px;
|
||||
padding: 1px 9px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.label.success {
|
||||
background: #118af3;
|
||||
background: #46a546;
|
||||
}
|
||||
|
||||
.label.notice {
|
||||
background: #118af3;
|
||||
background: #46a546;
|
||||
}
|
||||
|
||||
.label.important {
|
||||
@ -550,7 +548,7 @@ p {
|
||||
|
||||
.tabs,
|
||||
.cbi-tabmenu {
|
||||
border-bottom: 1.5px solid #34aee8;
|
||||
border-bottom: 1.5px solid #ddd;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
@ -562,7 +560,7 @@ p {
|
||||
.tabs a,
|
||||
.cbi-tabmenu a {
|
||||
display: block;
|
||||
color: #19a4e6;
|
||||
color: #404040;
|
||||
line-height: 34px;
|
||||
margin-bottom: -2px;
|
||||
margin-right: 20px;
|
||||
@ -781,7 +779,6 @@ tr tr {
|
||||
#conns>div>div,
|
||||
#swaptotal>div>div,
|
||||
#swapfree>div>div {
|
||||
background: #00adff7a !important;
|
||||
height: 18px !important;
|
||||
border-radius: 3px;
|
||||
}
|
||||
@ -794,13 +791,13 @@ textarea,
|
||||
select {
|
||||
display: inline-block;
|
||||
width: 16em;
|
||||
padding: 0.5em;
|
||||
border: 1px solid #118af3;
|
||||
padding: 0.4em;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 5px;
|
||||
box-sizing: border-box;
|
||||
color: #111;
|
||||
font: inherit;
|
||||
line-height: 1em;
|
||||
line-height: 18px;
|
||||
}
|
||||
|
||||
table.cbi-section-table input,
|
||||
@ -821,7 +818,7 @@ table.cbi-section-table select,
|
||||
input:active,
|
||||
input:focus {
|
||||
outline: 0;
|
||||
border-color: #118af3;
|
||||
border-color: #0069d6;
|
||||
}
|
||||
|
||||
input[type=file]:focus,
|
||||
@ -906,12 +903,12 @@ button {
|
||||
border-radius: 6px !important;
|
||||
display: inline-block;
|
||||
background: #fff;
|
||||
border: 2px solid #99d;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 2px;
|
||||
box-shadow: 0 2px 2px rgba(0, 0, 0, .05);
|
||||
color: #333;
|
||||
line-height: 16px;
|
||||
padding: 4px 8px;
|
||||
padding: 0.5em;
|
||||
cursor: pointer;
|
||||
margin-left: 0.2em;
|
||||
}
|
||||
@ -938,8 +935,8 @@ button:focus {
|
||||
|
||||
.cbi-button-add,
|
||||
.cbi-input-add {
|
||||
background: #19a4e6;
|
||||
border-color: #19a4e6;
|
||||
background: #404040;
|
||||
border-color: #404040;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
@ -947,16 +944,15 @@ button:focus {
|
||||
.cbi-button-add:focus,
|
||||
.cbi-input-add:active,
|
||||
.cbi-input-add:focus {
|
||||
border-color: #19a4e6;
|
||||
border-color: #404040;
|
||||
opacity: .8;
|
||||
}
|
||||
|
||||
.cbi-button-remove,
|
||||
.cbi-input-remove,
|
||||
.cbi-section-remove input {
|
||||
background: #c00;
|
||||
border-color: #c00;
|
||||
color: #fff;
|
||||
border-color: #c44;
|
||||
color: #c44;
|
||||
}
|
||||
|
||||
.cbi-button-remove:active,
|
||||
@ -1016,9 +1012,8 @@ button:focus {
|
||||
|
||||
.cbi-button-apply,
|
||||
.cbi-input-apply {
|
||||
background: rgb(0, 171, 232);
|
||||
border-color: rgb(0, 171, 232);
|
||||
color: #fff;
|
||||
border-color: #0069d6;
|
||||
color: #0069d6;
|
||||
}
|
||||
|
||||
.cbi-button-apply:active,
|
||||
@ -1077,7 +1072,7 @@ button:focus {
|
||||
}
|
||||
|
||||
.ifacebox .ifacebox-head.active {
|
||||
background: #85d8ff;
|
||||
background: #90c0e0;
|
||||
}
|
||||
|
||||
.ifacebox .ifacebox-body {
|
||||
@ -1230,7 +1225,7 @@ button:focus {
|
||||
/* Footer */
|
||||
|
||||
footer {
|
||||
border-top: 2px solid #34aee8;
|
||||
border-top: 1px solid #ddd;
|
||||
color: #111;
|
||||
text-align: center;
|
||||
padding: 10px 0;
|
||||
@ -1238,14 +1233,9 @@ footer {
|
||||
}
|
||||
|
||||
footer a {
|
||||
color: #118af3;
|
||||
color: #0069d6;
|
||||
}
|
||||
|
||||
footer a:hover {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
|
||||
/* diy */
|
||||
|
||||
#wan4_i,
|
||||
@ -1300,7 +1290,7 @@ body.node-main-login .alert-message {
|
||||
text-indent: -500px;
|
||||
overflow: hidden;
|
||||
border-radius: 60px;
|
||||
/* border: #118af3 3px solid; */
|
||||
/* border: #0069d6 3px solid; */
|
||||
background-image: url(wifi.png);
|
||||
background-size: cover;
|
||||
/* box-shadow: 0 4px 20px 0px rgba(0, 0, 0, 0.14), 0 7px 10px -5px rgba(156, 39, 176, 0.4); */
|
||||
@ -1436,7 +1426,7 @@ body.modal-overlay-active #modal_overlay>.modal {
|
||||
max-width: 400px;
|
||||
width: auto;
|
||||
background: white;
|
||||
border: 1px solid #118af3;
|
||||
border: 1px solid #0069d6;
|
||||
border-radius: 5px;
|
||||
box-sizing: border-box;
|
||||
padding: 0.3em !important;
|
||||
@ -1446,7 +1436,7 @@ body.modal-overlay-active #modal_overlay>.modal {
|
||||
margin-bottom: 4px;
|
||||
box-shadow: 0 0 2px #ccc;
|
||||
background: #fff;
|
||||
border: 1px solid #118af3;
|
||||
border: 1px solid #0069d6;
|
||||
border-radius: 3px;
|
||||
position: relative;
|
||||
pointer-events: none;
|
||||
@ -1499,6 +1489,8 @@ body.modal-overlay-active #modal_overlay>.modal {
|
||||
.cbi-page-actions .cbi-button-apply,
|
||||
.cbi-section-actions .cbi-button-edit {
|
||||
color: #fff;
|
||||
background: #0069d6;
|
||||
border: 1px solid #0069d6;
|
||||
}
|
||||
|
||||
.cbi-dropdown {
|
||||
@ -1520,7 +1512,7 @@ body.modal-overlay-active #modal_overlay>.modal {
|
||||
}
|
||||
|
||||
.cbi-progressbar>div {
|
||||
background: #85d8ff;
|
||||
background: #90c0e0;
|
||||
height: 100%;
|
||||
transition: width .25s ease-in;
|
||||
width: 0%;
|
||||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
@ -5,7 +5,6 @@ header h3 a, header .brand {
|
||||
@media screen and (max-device-width: 1600px) {
|
||||
.container>.pull-right>* {
|
||||
position: absolute;
|
||||
top: 1rem;
|
||||
right: 0.5rem;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 75 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
@ -1,3 +0,0 @@
|
||||
// HTML5 Shiv v3 | @jon_neal @afarkas @rem | MIT/GPL2 Licensed
|
||||
// Uncompressed source: https://github.com/aFarkas/html5shiv
|
||||
(function(a,b){function f(a){var c,d,e,f;b.documentMode>7?(c=b.createElement("font"),c.setAttribute("data-html5shiv",a.nodeName.toLowerCase())):c=b.createElement("shiv:"+a.nodeName);while(a.firstChild)c.appendChild(a.childNodes[0]);for(d=a.attributes,e=d.length,f=0;f<e;++f)d[f].specified&&c.setAttribute(d[f].nodeName,d[f].nodeValue);c.style.cssText=a.style.cssText,a.parentNode.replaceChild(c,a),c.originalElement=a}function g(a){var b=a.originalElement;while(a.childNodes.length)b.appendChild(a.childNodes[0]);a.parentNode.replaceChild(b,a)}function h(a,b){b=b||"all";var c=-1,d=[],e=a.length,f,g;while(++c<e){f=a[c],g=f.media||b;if(f.disabled||!/print|all/.test(g))continue;d.push(h(f.imports,g),f.cssText)}return d.join("")}function i(c){var d=new RegExp("(^|[\\s,{}])("+a.html5.elements.join("|")+")","gi"),e=c.split("{"),f=e.length,g=-1;while(++g<f)e[g]=e[g].split("}"),b.documentMode>7?e[g][e[g].length-1]=e[g][e[g].length-1].replace(d,'$1font[data-html5shiv="$2"]'):e[g][e[g].length-1]=e[g][e[g].length-1].replace(d,"$1shiv\\:$2"),e[g]=e[g].join("}");return e.join("{")}var c=function(a){return a.innerHTML="<x-element></x-element>",a.childNodes.length===1}(b.createElement("a")),d=function(a,b,c){return b.appendChild(a),(c=(c?c(a):a.currentStyle).display)&&b.removeChild(a)&&c==="block"}(b.createElement("nav"),b.documentElement,a.getComputedStyle),e={elements:"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video".split(" "),shivDocument:function(a){a=a||b;if(a.documentShived)return;a.documentShived=!0;var f=a.createElement,g=a.createDocumentFragment,h=a.getElementsByTagName("head")[0],i=function(a){f(a)};c||(e.elements.join(" ").replace(/\w+/g,i),a.createElement=function(a){var b=f(a);return b.canHaveChildren&&e.shivDocument(b.document),b},a.createDocumentFragment=function(){return e.shivDocument(g())});if(!d&&h){var j=f("div");j.innerHTML=["x<style>","article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}","audio{display:none}","canvas,video{display:inline-block;*display:inline;*zoom:1}","[hidden]{display:none}audio[controls]{display:inline-block;*display:inline;*zoom:1}","mark{background:#FF0;color:#000}","</style>"].join(""),h.insertBefore(j.lastChild,h.firstChild)}return a}};e.shivDocument(b),a.html5=e;if(c||!a.attachEvent)return;a.attachEvent("onbeforeprint",function(){if(a.html5.supportsXElement||!b.namespaces)return;b.namespaces.shiv||b.namespaces.add("shiv");var c=-1,d=new RegExp("^("+a.html5.elements.join("|")+")$","i"),e=b.getElementsByTagName("*"),g=e.length,j,k=i(h(function(a,b){var c=[],d=a.length;while(d)c.unshift(a[--d]);d=b.length;while(d)c.unshift(b[--d]);c.sort(function(a,b){return a.sourceIndex-b.sourceIndex}),d=c.length;while(d)c[--d]=c[d].styleSheet;return c}(b.getElementsByTagName("style"),b.getElementsByTagName("link"))));while(++c<g)j=e[c],d.test(j.nodeName)&&f(j);b.appendChild(b._shivedStyleSheet=b.createElement("style")).styleSheet.cssText=k}),a.attachEvent("onafterprint",function(){if(a.html5.supportsXElement||!b.namespaces)return;var c=-1,d=b.getElementsByTagName("*"),e=d.length,f;while(++c<e)f=d[c],f.originalElement&&g(f);b._shivedStyleSheet&&b._shivedStyleSheet.parentNode.removeChild(b._shivedStyleSheet)})})(this,document)
|
||||
|
Before Width: | Height: | Size: 21 KiB |
@ -1,55 +0,0 @@
|
||||
<%#
|
||||
Copyright 2008 Steven Barth <steven@midlink.org>
|
||||
Copyright 2008 Jo-Philipp Wich <jow@openwrt.org>
|
||||
Copyright 2012 David Menting <david@nut-bolt.nl>
|
||||
Copyright 2018-2019 Lienol <lawlienol@gmail.com>
|
||||
Licensed to the public under the Apache License 2.0.
|
||||
-%>
|
||||
|
||||
<%
|
||||
local ver = require "luci.version"
|
||||
local disp = require "luci.dispatcher"
|
||||
local request = disp.context.path
|
||||
local category = request[1]
|
||||
local tree = disp.node()
|
||||
local categories = disp.node_childs(tree)
|
||||
%>
|
||||
<footer>
|
||||
<a href="https://github.com/openwrt/luci">Powered by <%= ver.luciname %></a> / <%= ver.distversion %>
|
||||
<% if #categories > 1 then %>
|
||||
<ul class="breadcrumb pull-right" id="modemenu">
|
||||
<% for i, r in ipairs(categories) do %>
|
||||
<li<% if request[1] == r then %> class="active"<%end%>><a href="<%=controller%>/<%=r%>/"><%=striptags(translate(tree.nodes[r].title))%></a> <span class="divider">|</span></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% end %>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script>
|
||||
window.onload = function(){
|
||||
var content = document.getElementsByName("content");
|
||||
var luci_username = document.getElementsByName("luci_username");
|
||||
var luci_password = document.getElementsByName("luci_password");
|
||||
if (content.length == 1 && luci_username.length == 1 && luci_password.length == 1) {
|
||||
//需要登录
|
||||
document.body.classList.add('node-main-login');
|
||||
luci_username[0].parentElement.parentElement.classList.add('luci_username_div');
|
||||
luci_username[0].parentElement.parentElement.children[0].style.display = "none";
|
||||
luci_password[0].parentElement.parentElement.classList.add('luci_password_div');
|
||||
luci_password[0].parentElement.parentElement.children[0].style.display = "none";
|
||||
|
||||
var errorbox = document.getElementsByClassName("errorbox");
|
||||
if (errorbox.length == 1) {
|
||||
var tips = document.getElementsByClassName("cbi-map-descr");
|
||||
if (tips.length == 1) {
|
||||
tips[0].innerHTML = errorbox[0].innerHTML;
|
||||
tips[0].classList.add('errorbox');
|
||||
errorbox[0].style.display = "none";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</html>
|
||||
@ -1,7 +1,8 @@
|
||||
#!/bin/sh
|
||||
uci batch <<-EOF
|
||||
set luci.themes.Bootstrap_Mod=/luci-static/bootstrap_mod
|
||||
set luci.themes.Bootstrap_Blue=/luci-static/bootstrap_blue
|
||||
set luci.themes.Bootstrap_Purple=/luci-static/bootstrap_purple
|
||||
set luci.main.mediaurlbase=/luci-static/bootstrap_mod
|
||||
commit luci
|
||||
EOF
|
||||
exit 0
|
||||
|
||||