🔥 Sync 2022-02-07 22:28:58
27
Makefile
Normal file
@ -0,0 +1,27 @@
|
||||
#
|
||||
# Copyright (C) 2008-2019 Jerrykuku
|
||||
#
|
||||
# This is free software, licensed under the Apache License, Version 2.0 .
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
LUCI_TITLE:=Argon Theme
|
||||
LUCI_DEPENDS:=
|
||||
PKG_VERSION:=1.7.2
|
||||
PKG_RELEASE:=20210309
|
||||
|
||||
include $(TOPDIR)/feeds/luci/luci.mk
|
||||
|
||||
|
||||
define Package/luci-theme-argon/postinst
|
||||
#!/bin/sh
|
||||
sed -i ":a;$!N;s/tmpl.render.*sysauth_template.*return/local scope = { duser = default_user, fuser = user }\nlocal ok, res = luci.util.copcall\(luci.template.render_string, [[<% include\(\"themes\/\" .. theme .. \"\/sysauth\"\) %>]], scope\)\nif ok then\nreturn res\nend\nreturn luci.template.render\(\"sysauth\", scope\)/;ba" /usr/lib/lua/luci/dispatcher.lua
|
||||
sed -i ":a;$!N;s/t.render.*sysauth_template.*return/local scope = { duser = h, fuser = a }\nlocal ok, res = luci.util.copcall\(luci.template.render_string, [[<% include\(\"themes\/\" .. theme .. \"\/sysauth\"\) %>]], scope\)\nif ok then\nreturn res\nend\nreturn luci.template.render\(\"sysauth\", scope\)/;ba" /usr/lib/lua/luci/dispatcher.lua
|
||||
[ -f /usr/lib/lua/luci/view/themes/argon/out_header_login.htm ] && mv -f /usr/lib/lua/luci/view/themes/argon/out_header_login.htm /usr/lib/lua/luci/view/header_login.htm
|
||||
rm -Rf /var/luci-modulecache
|
||||
rm -Rf /var/luci-indexcache
|
||||
exit 0
|
||||
endef
|
||||
|
||||
# call BuildPackage - OpenWrt buildroot signature
|
3069
htdocs/luci-static/argon/css/cascade.css
Normal file
1
htdocs/luci-static/argon/css/dark.css
Normal file
@ -1,4 +1,3 @@
|
||||
// out: false
|
||||
/**
|
||||
* Argon is a clean HTML5 theme for LuCI. It is based on luci-theme-material and Argon Template
|
||||
*
|
||||
@ -25,7 +24,7 @@
|
||||
* Login background
|
||||
* https://unsplash.com/
|
||||
*
|
||||
* Licensed to the public under the Apache License 2.0
|
||||
* Licensed to the public under the Apache License 2.0
|
||||
*/
|
||||
|
||||
|
||||
@ -40,10 +39,7 @@
|
||||
/* Logo Font */
|
||||
@font-face {
|
||||
font-family: 'TypoGraphica';
|
||||
src: url('../fonts/TypoGraphica.eot?#iefix') format('embedded-opentype'),
|
||||
url('../fonts/TypoGraphica.woff') format('woff'),
|
||||
url('../fonts/TypoGraphica.ttf') format('truetype'),
|
||||
url('../fonts/TypoGraphica.svg#TypoGraphica') format('svg');
|
||||
src: url('../fonts/TypoGraphica.eot?#iefix') format('embedded-opentype'), url('../fonts/TypoGraphica.woff') format('woff'), url('../fonts/TypoGraphica.ttf') format('truetype'), url('../fonts/TypoGraphica.svg#TypoGraphica') format('svg');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 69 KiB After Width: | Height: | Size: 69 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 6.3 KiB |
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 1019 B After Width: | Height: | Size: 1019 B |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 156 KiB After Width: | Height: | Size: 156 KiB |
Before Width: | Height: | Size: 938 B After Width: | Height: | Size: 938 B |
BIN
htdocs/luci-static/argon/img/trafficbar.png
Normal file
After Width: | Height: | Size: 6.4 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
281
htdocs/luci-static/argon/js/script.js
Normal file
@ -0,0 +1,281 @@
|
||||
/**
|
||||
* 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").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").width(0);
|
||||
$(".main-right").css("overflow-y", "auto");
|
||||
showSide = false;
|
||||
} else {
|
||||
$(".darkMask").stop(true).fadeIn("fast");
|
||||
$(".main-left").width("15rem");
|
||||
$(".main-right").css("overflow-y", "hidden");
|
||||
showSide = true;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$(".darkMask").click(function () {
|
||||
if (showSide) {
|
||||
showSide = false;
|
||||
$(".darkMask").stop(true).fadeOut("fast");
|
||||
$(".main-left").width(0);
|
||||
$(".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("padding", "0px");
|
||||
}
|
||||
});
|
||||
|
||||
$(".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);
|
3862
htdocs/luci-static/argon/less/cascade.less
Normal file
@ -1,4 +1,4 @@
|
||||
// compress: true , sourceMap: false
|
||||
// compress: true
|
||||
/**
|
||||
* Argon is a clean HTML5 theme for LuCI. It is based on luci-theme-material and Argon Template
|
||||
*
|
||||
@ -25,7 +25,7 @@
|
||||
* Login background
|
||||
* https://unsplash.com/
|
||||
*
|
||||
* Licensed to the public under the Apache License 2.0
|
||||
* Licensed to the public under the Apache License 2.0
|
||||
*/
|
||||
|
||||
body {
|
||||
@ -37,9 +37,6 @@ body {
|
||||
|
||||
.login-form {
|
||||
background-color: #1e1e1e;
|
||||
-webkit-backdrop-filter: blur(var(--blur-radius-dark));
|
||||
backdrop-filter: blur(var(--blur-radius-dark));
|
||||
background-color: rgba(0, 0, 0, var(--blur-opacity-dark));
|
||||
|
||||
.brand {
|
||||
color: #adb5bd;
|
||||
@ -55,25 +52,35 @@ body {
|
||||
background-color: transparent !important;
|
||||
color: #adb5bd;
|
||||
border-bottom: #adb5bd 1px solid !important;
|
||||
border-radius: 0 !important;
|
||||
border-radius: 0;
|
||||
border-top: none !important;
|
||||
border-left: none !important;
|
||||
border-right: none !important;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
&:focus {
|
||||
border-top: none !important;
|
||||
border-left: none !important;
|
||||
border-right: none !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.cbi-button-apply {
|
||||
background-color: #483d8b !important;
|
||||
background-color: var(--dark-primary) !important;
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
opacity: 0.9;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
footer {
|
||||
color: #adb5bd;
|
||||
}
|
||||
|
||||
}
|
||||
@ -137,6 +144,8 @@ header::after {
|
||||
background-color: #483d8b !important;
|
||||
background-color: var(--dark-primary) !important;
|
||||
color: #cccccc !important;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -191,13 +200,18 @@ input:-webkit-autofill {
|
||||
|
||||
|
||||
.cbi-section em {
|
||||
color: #ccc;
|
||||
color: #483d8b;
|
||||
color: var(--dark-primary);
|
||||
}
|
||||
|
||||
|
||||
|
||||
header.bg-primary {
|
||||
background-color: #1e1e1e !important;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.cbi-map-descr {
|
||||
color: #ccc;
|
||||
}
|
||||
@ -213,11 +227,6 @@ header.bg-primary {
|
||||
border-bottom: 0px;
|
||||
}
|
||||
|
||||
div>table>tbody>tr:nth-of-type(2n),
|
||||
div>.table>.tr:nth-of-type(2n) {
|
||||
background-color: #252526;
|
||||
}
|
||||
|
||||
table>tbody>tr>td,
|
||||
table>tfoot>tr>td,
|
||||
table>thead>tr>td {
|
||||
@ -240,7 +249,8 @@ table>thead>tr>td {
|
||||
#membuff>div>div,
|
||||
#conns>div>div,
|
||||
#memtotal>div>div {
|
||||
background-color: #32325d !important;
|
||||
background-color: #483d8b !important;
|
||||
background-color: var(--dark-primary) !important;
|
||||
}
|
||||
|
||||
#swaptotal>div>div>div>small,
|
||||
@ -267,6 +277,7 @@ table>thead>tr>td {
|
||||
|
||||
}
|
||||
|
||||
|
||||
table>tbody>tr>th,
|
||||
table>tfoot>tr>th,
|
||||
table>thead>tr>th {
|
||||
@ -275,15 +286,6 @@ table>thead>tr>th {
|
||||
border-bottom: black 1px solid !important;
|
||||
}
|
||||
|
||||
tr>td,
|
||||
tr>th,
|
||||
.tr>.td,
|
||||
.tr>.th,
|
||||
.cbi-section-table-row::before,
|
||||
#cbi-wireless>#wifi_assoclist_table>.tr:nth-child(2) {
|
||||
border-top: 0;
|
||||
}
|
||||
|
||||
.cbi-rowstyle-2 {
|
||||
background-color: #1e1e1e;
|
||||
}
|
||||
@ -292,38 +294,10 @@ tr>th,
|
||||
background-color: #252526;
|
||||
}
|
||||
|
||||
.cbi-rowstyle-2 .cbi-button-up,
|
||||
.cbi-rowstyle-2 .cbi-button-down,
|
||||
body:not(.Interfaces) .cbi-rowstyle-2:first-child {
|
||||
background-color: rgb(102, 102, 102) !important;
|
||||
}
|
||||
|
||||
.cbi-section>h3:first-child,
|
||||
.panel-title,
|
||||
h3 {
|
||||
.panel-title {
|
||||
color: #ccc;
|
||||
border-bottom: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
}
|
||||
|
||||
h4 {
|
||||
background-color: #1e1e1f;
|
||||
}
|
||||
|
||||
.cbi-progressbar {
|
||||
position: relative;
|
||||
min-width: 170px;
|
||||
height: 20px;
|
||||
margin: 6px 0;
|
||||
border: thin solid #999;
|
||||
background: transparent;
|
||||
border-radius: 0.2rem;
|
||||
overflow: hidden;
|
||||
|
||||
div {
|
||||
background-color: #32325d !important;
|
||||
}
|
||||
}
|
||||
|
||||
.cbi-section-table .cbi-section-table-titles .cbi-section-table-cell {
|
||||
@ -331,9 +305,8 @@ h4 {
|
||||
}
|
||||
|
||||
.cbi-button {
|
||||
color: #ccc !important;
|
||||
background-color: #483d8b;
|
||||
background-color: var(--dark-primary);
|
||||
color: #ccc;
|
||||
background-color: #252526;
|
||||
}
|
||||
|
||||
.cbi-section-node {
|
||||
@ -343,7 +316,9 @@ h4 {
|
||||
}
|
||||
|
||||
abbr {
|
||||
color: #5e72e4;
|
||||
color: #483d8b;
|
||||
color: var(--dark-primary);
|
||||
|
||||
}
|
||||
|
||||
div>table>tbody>tr:nth-of-type(2n),
|
||||
@ -397,6 +372,10 @@ div>.table>.tbody>.tr:nth-of-type(2n) {
|
||||
background: #2d2d2d;
|
||||
}
|
||||
|
||||
.cbi-tabmenu {
|
||||
border-bottom: 0px solid #ddd !important;
|
||||
}
|
||||
|
||||
.cbi-tabmenu li[class~="cbi-tab"] a {
|
||||
color: #ccc;
|
||||
}
|
||||
@ -421,17 +400,18 @@ div>.table>.tbody>.tr:nth-of-type(2n) {
|
||||
select,
|
||||
input {
|
||||
color: #ccc;
|
||||
background-color: transparent !important;
|
||||
border: 1px solid #252526;
|
||||
box-shadow: none;
|
||||
background-color: transparent;
|
||||
border: 1px solid #3c3c3c !important;
|
||||
box-shadow: 0 3px 2px rgba(0, 0, 0, .05);
|
||||
}
|
||||
|
||||
select:not([multiple="multiple"]):focus,
|
||||
input:focus {
|
||||
border-color: #483d8b !important;
|
||||
border-color: var(--dark-primary) !important;
|
||||
background-color: transparent;
|
||||
outline: 0;
|
||||
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
select {
|
||||
@ -474,7 +454,9 @@ select {
|
||||
|
||||
.node-system-packages>.main table tr td:nth-last-child(1) {
|
||||
color: #ccc;
|
||||
|
||||
}
|
||||
.node-system-packages > .main .cbi-value > pre {
|
||||
background-color: #333;
|
||||
}
|
||||
|
||||
.cbi-section-node .cbi-value {
|
||||
@ -504,7 +486,8 @@ select {
|
||||
|
||||
div.cbi-value var,
|
||||
td.cbi-value-field var {
|
||||
color: #5e72e4;
|
||||
color: #483d8b;
|
||||
color: var(--dark-primary);
|
||||
}
|
||||
|
||||
#diag-rc-output>pre {
|
||||
@ -513,7 +496,7 @@ td.cbi-value-field var {
|
||||
}
|
||||
|
||||
.node-services-vssr .block {
|
||||
background-color: #3c3c3c !important;
|
||||
background-color: #1e1e1e !important;
|
||||
box-shadow: 0 0 0.5rem 0 rgba(0, 0, 0, .35);
|
||||
}
|
||||
|
||||
@ -548,6 +531,10 @@ td.cbi-value-field var {
|
||||
border-right: #1e1e1e 1px solid;
|
||||
}
|
||||
|
||||
.main .main-right #maincontent .container p {
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
#xhr_poll_status>.label.success {
|
||||
color: #ccc !important;
|
||||
|
||||
@ -566,9 +553,8 @@ td.cbi-value-field var {
|
||||
.cbi-button-find,
|
||||
.cbi-input-reload,
|
||||
.cbi-button-reload {
|
||||
color: #fff !important;
|
||||
background: darkolivegreen !important;
|
||||
border-color: darkolivegreen !important;
|
||||
background-color: darkseagreen !important;
|
||||
border-color: darkseagreen !important;
|
||||
}
|
||||
|
||||
.cbi-button-reset,
|
||||
@ -588,18 +574,7 @@ td.cbi-value-field var {
|
||||
border: 1px var(--dark-primary) solid !important;
|
||||
}
|
||||
|
||||
.btn[value="Dismiss"],
|
||||
.cbi-button[value="Terminate"],
|
||||
.cbi-button[value="Reset"],
|
||||
.cbi-button[value="Disabled"],
|
||||
.cbi-button[onclick^="iface_reconnect"],
|
||||
.cbi-button[onclick="handleReset(event)"],
|
||||
.cbi-button-neutral[value="Disable"] {
|
||||
font-weight: normal;
|
||||
color: #fff;
|
||||
border: thin solid darkorange !important;
|
||||
background-color: darkorange !important;
|
||||
}
|
||||
|
||||
|
||||
fieldset[id^="cbi-apply-"] {
|
||||
background-color: #333333;
|
||||
@ -612,219 +587,25 @@ fieldset[id^="cbi-apply-"] {
|
||||
background: #252525;
|
||||
}
|
||||
|
||||
.ifacebox-head.active {
|
||||
background-color: #32325d !important;
|
||||
.cbi-section-error {
|
||||
color: darkorange;
|
||||
}
|
||||
|
||||
header .fill .status span[data-style="active"] {
|
||||
.node-services-vssr .block h4 span{
|
||||
color: #ccc !important;
|
||||
background-color: darkolivegreen !important;
|
||||
}
|
||||
|
||||
#cbi-wireless .td,
|
||||
#cbi-network .tr:first-child>.td,
|
||||
.table[width="100%"]>.tr:first-child>.td,
|
||||
[data-page="admin-network-diagnostics"] .tr>.td,
|
||||
.tr.table-titles>.th,
|
||||
.tr.cbi-section-table-titles>.th {
|
||||
background-color: #252526;
|
||||
border-bottom: black 1px solid !important;
|
||||
|
||||
}
|
||||
|
||||
.network-status-table .ifacebox-body .ifacebadge {
|
||||
background-color: #252526;
|
||||
border-bottom: 0;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
td>.ifacebadge,
|
||||
.td>.ifacebadge {
|
||||
|
||||
background-color: #483d8b;
|
||||
background-color: var(--dark-primary);
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.btn.danger,
|
||||
.cbi-section-remove>.cbi-button,
|
||||
.cbi-button-remove,
|
||||
.cbi-button-reset,
|
||||
.cbi-button-negative,
|
||||
.cbi-button[value="Stop"],
|
||||
.cbi-button[value="Kill"],
|
||||
.cbi-button[onclick="reboot(this)"],
|
||||
.cbi-button-neutral[value="Restart"] {
|
||||
border: thin solid darkorange !important;
|
||||
background-color: darkorange !important;
|
||||
}
|
||||
|
||||
.cbi-section,
|
||||
.cbi-section-error,
|
||||
#iptables,
|
||||
.Firewall form,
|
||||
#cbi-network>.cbi-section-node,
|
||||
#cbi-wireless>.cbi-section-node,
|
||||
#cbi-wireless>#wifi_assoclist_table,
|
||||
[data-tab-title],
|
||||
[data-page^="admin-system-admin"]:not(.node-main-login) .cbi-map:not(#cbi-dropbear),
|
||||
[data-page="admin-system-opkg"] #maincontent>.container {
|
||||
background: #1e1e1e !important;
|
||||
box-shadow: 0 0 0.5rem 0 rgba(0, 0, 0, 0.35);
|
||||
}
|
||||
|
||||
div[style="width:100%;height:300px;border:1px solid #000;background:#fff"] {
|
||||
background: transparent !important;
|
||||
}
|
||||
|
||||
[data-page="admin-system-admin"] .cbi-map h2,
|
||||
[data-page="admin-system-admin-password"] .cbi-map h2,
|
||||
[data-page="admin-system-admin"] .cbi-map .cbi-map-descr,
|
||||
[data-page="admin-system-admin-password"] .cbi-map .cbi-map-descr {
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
[data-page="admin-system-flash"] {
|
||||
.modal {
|
||||
label>input[type="checkbox"] {
|
||||
top: -0.35rem;
|
||||
}
|
||||
|
||||
.btn {
|
||||
white-space: normal !important;
|
||||
background-color: darkseagreen;
|
||||
}
|
||||
|
||||
.alert-message {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
|
||||
.danger {
|
||||
border: thin solid darkorange !important;
|
||||
background-color: darkorange !important;
|
||||
}
|
||||
@supports (-webkit-backdrop-filter: none) or (backdrop-filter: none) {
|
||||
.login-page .login-container .login-form {
|
||||
-webkit-backdrop-filter: blur(var(--blur-radius-dark));
|
||||
backdrop-filter: blur(var(--blur-radius-dark));
|
||||
background-color: rgba(0, 0, 0, var(--blur-opacity-dark));
|
||||
}
|
||||
}
|
||||
|
||||
.cbi-value input[type="password"]+.cbi-button-neutral {
|
||||
background-color: #483d8b !important;
|
||||
background-color: var(--dark-primary) !important;
|
||||
}
|
||||
|
||||
.btn,
|
||||
button,
|
||||
select,
|
||||
input,
|
||||
.cbi-dropdown {
|
||||
border: 1px solid #3c3c3c !important;
|
||||
}
|
||||
|
||||
|
||||
.cbi-dropdown .preview {
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.cbi-section-table-row {
|
||||
background-color: #1e1e1e !important;
|
||||
}
|
||||
|
||||
.modal {
|
||||
background-color: #1e1e1e;
|
||||
}
|
||||
|
||||
.cbi-button-positive {
|
||||
color: #fff !important;
|
||||
background-color: darkolivegreen !important;
|
||||
}
|
||||
|
||||
[data-page="admin-system-flash"] legend {
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.logout:before {
|
||||
color: #adb5bd !important;
|
||||
}
|
||||
|
||||
.cbi-dropdown[open] {
|
||||
border-color: #483d8b !important;
|
||||
border-color: var(--dark-primary) !important;
|
||||
}
|
||||
|
||||
.cbi-dropdown[open]>ul.dropdown {
|
||||
background: #252526 !important;
|
||||
color: #ccc !important;
|
||||
box-shadow: none;
|
||||
border: 1px solid #3c3c3c !important;
|
||||
|
||||
|
||||
}
|
||||
|
||||
.cbi-dropdown[open]>ul.dropdown li {
|
||||
color: #ccc;
|
||||
border-bottom: 1px solid #3c3c3c !important;
|
||||
}
|
||||
|
||||
.cbi-dropdown[open]>ul.dropdown>li[selected] {
|
||||
background-color: #483d8b !important;
|
||||
background-color: var(--dark-primary) !important;
|
||||
border-bottom: 1px solid #3c3c3c !important;
|
||||
}
|
||||
|
||||
.cbi-dropdown[open]>ul.dropdown>li.focus {
|
||||
background: #483d8b;
|
||||
background: var(--dark-primary);
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.ifacebadge {
|
||||
background-color: #333333;
|
||||
}
|
||||
|
||||
.cbi-dynlist>.item>span {
|
||||
border: 1px solid #3c3c3c !important;
|
||||
}
|
||||
|
||||
.cbi-page-actions .cbi-button-apply,
|
||||
.cbi-section-actions .cbi-button-edit,
|
||||
.cbi-button-edit,
|
||||
.cbi-button-apply,
|
||||
.cbi-button-reload,
|
||||
.cbi-button-action,
|
||||
.cbi-button[value="Submit"],
|
||||
.cbi-button[value="Upload"],
|
||||
.cbi-button[value$="Apply"],
|
||||
.cbi-button[onclick="addKey(event)"] {
|
||||
background: #483d8b !important;
|
||||
background: var(--dark-primary) !important;
|
||||
}
|
||||
|
||||
.btn.primary,
|
||||
.cbi-page-actions .cbi-button-save,
|
||||
.cbi-page-actions .cbi-button-apply+.cbi-button-save,
|
||||
.cbi-button-add,
|
||||
.cbi-button-save,
|
||||
.cbi-button-positive,
|
||||
.cbi-button-link,
|
||||
.cbi-button[value="Enable"],
|
||||
.cbi-button[value="Scan"],
|
||||
.cbi-button[value^="Back"],
|
||||
.cbi-button-neutral[onclick="handleConfig(event)"] {
|
||||
background: #483d8b;
|
||||
background: var(--dark-primary);
|
||||
}
|
||||
|
||||
[data-page="admin-system-opkg"] h2 {
|
||||
color: #ccc !important;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@media screen and (max-width: 480px) {
|
||||
.node-status-iptables>.main div>.cbi-map>form {
|
||||
background-color: #1e1e1e;
|
||||
box-shadow: 0 0 0.5rem 0 rgba(0, 0, 0, .35);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
88
luasrc/view/themes/argon/footer.htm
Normal file
@ -0,0 +1,88 @@
|
||||
<%#
|
||||
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>
|
||||
<div class="ftc">
|
||||
<a class="luci-link" href="https://github.com/openwrt/luci">Powered by <%= ver.luciname %>
|
||||
(<%= ver.luciversion %>)</a> /
|
||||
<a href="https://github.com/jerrykuku/luci-theme-argon">ArgonTheme <%# vPKG_VERSION %></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 %>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// thanks for Jo-Philipp Wich <jow@openwrt.org>
|
||||
var luciLocation = <%= luci.http.write_json(luci.dispatcher.context.path) %>;
|
||||
var winHeight = $(window).height();
|
||||
$(window).resize(function () {
|
||||
var winWidth = $(window).width()
|
||||
if(winWidth < 600){
|
||||
var newHeight = $(this).height();
|
||||
var keyboradHeight = newHeight - winHeight;
|
||||
$(".ftc").css("bottom", keyboradHeight + 30);
|
||||
}
|
||||
if($(document.body).height() < 525 ){
|
||||
if($(".ftc").css('display') != 'none'){
|
||||
$(".ftc").hide()
|
||||
}
|
||||
}else{
|
||||
if($(".ftc").css('display') == 'none'){
|
||||
$(".ftc").show()
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<script src="<%=media%>/js/script.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
321
luasrc/view/themes/argon/header.htm
Normal file
@ -0,0 +1,321 @@
|
||||
<%#
|
||||
Argon is a clean HTML5 theme for LuCI. It is based on luci-theme-bootstrap and MUI and Argon Template
|
||||
|
||||
luci-theme-argon
|
||||
Copyright 2020 Jerryk <jerrykuku@gmail.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 uci = require 'luci.model.uci'.cursor()
|
||||
|
||||
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(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
|
||||
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
|
||||
|
||||
math.randomseed(os.time())
|
||||
|
||||
-- Custom settings
|
||||
local mode = 'normal'
|
||||
local dark_css = fs.readfile('/www/luci-static/argon/css/dark.css')
|
||||
local bar_color = '#5e72e4'
|
||||
local primary, dark_primary, blur_radius, blur_radius_dark, blur_opacity
|
||||
if fs.access('/etc/config/argon') then
|
||||
primary = uci:get_first('argon', 'global', 'primary')
|
||||
dark_primary = uci:get_first('argon', 'global', 'dark_primary')
|
||||
blur_radius = uci:get_first('argon', 'global', 'blur')
|
||||
blur_radius_dark = uci:get_first('argon', 'global', 'blur_dark')
|
||||
blur_opacity = uci:get_first('argon', 'global', 'transparency')
|
||||
blur_opacity_dark = uci:get_first('argon', 'global', 'transparency_dark')
|
||||
mode = uci:get_first('argon', 'global', 'mode')
|
||||
bar_color = mode == 'dark' and dark_primary or primary
|
||||
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="msapplication-tap-highlight" content="no">
|
||||
<meta name="msapplication-TileColor" content="<%=bar_color%>">
|
||||
|
||||
<meta name="application-name" content="<%=striptags( (boardinfo.hostname or "?") ) %> - LuCI">
|
||||
<meta name="apple-mobile-web-app-title" content="<%=striptags( (boardinfo.hostname or "?") ) %> - LuCI">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="<%=media%>/icon/apple-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="<%=media%>/icon/apple-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="<%=media%>/icon/apple-icon-144x144.png">
|
||||
<link rel="icon" type="image/png" sizes="192x192" href="<%=media%>/icon/android-icon-192x192.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="<%=media%>/icon/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="96x96" href="<%=media%>/icon/favicon-96x96.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="<%=media%>/icon/favicon-16x16.png">
|
||||
<link rel="manifest" href="<%=media%>/icon/manifest.json">
|
||||
<meta name="msapplication-TileColor" content="<%=bar_color%>">
|
||||
<meta name="msapplication-TileImage" content="<%=media%>/icon/ms-icon-144x144.png">
|
||||
<meta name="theme-color" content="<%=bar_color%>">
|
||||
<link rel="stylesheet" href="<%=media%>/css/cascade.css?v=<%=math.random(1,100000)%>">
|
||||
<style title="text/css">
|
||||
<% if mode == 'normal' then %>
|
||||
@media (prefers-color-scheme: dark) {
|
||||
<%=dark_css%>
|
||||
}
|
||||
<% elseif mode == 'dark' then %>
|
||||
<%=dark_css%>
|
||||
<% end -%>
|
||||
<% if fs.access('/etc/config/argon') then %>
|
||||
:root {
|
||||
--primary: <%=primary%>;
|
||||
--dark-primary: <%=dark_primary%>;
|
||||
--blur-radius:<%=blur_radius%>px;
|
||||
--blur-opacity:<%=blur_opacity%>;
|
||||
--blur-radius-dark:<%=blur_radius_dark%>px;
|
||||
--blur-opacity-dark:<%=blur_opacity_dark%>;
|
||||
}
|
||||
<% end -%>
|
||||
</style>
|
||||
<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=PKG_VERSION %>"></script>
|
||||
<script src="<%=resource%>/xhr.js<%# ?v=PKG_VERSION %>"></script>
|
||||
<script src="<%=media%>/js/jquery.min.js<%# ?v=PKG_VERSION %>"></script>
|
||||
</head>
|
||||
|
||||
<body
|
||||
class="<%- if node then %><%= striptags( node.title ) %><%- end %> <% if luci.dispatcher.context.authsession then %>logged-in<% end %> lang_<%=luci.i18n.context.lang%> ">
|
||||
|
||||
<div class="main">
|
||||
<div class="main-left">
|
||||
<div class="sidenav-header d-flex align-items-center">
|
||||
<a class="brand" href="#"><%=boardinfo.hostname or "?"%></a>
|
||||
</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>
|
||||
<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 %>
|
135
luasrc/view/themes/argon/header_login.htm
Normal file
@ -0,0 +1,135 @@
|
||||
<%#
|
||||
Argon is a clean HTML5 theme for LuCI. It is based on luci-theme-bootstrap and MUI and Argon Template
|
||||
|
||||
luci-theme-argon
|
||||
Copyright 2020 Jerryk <jerrykuku@gmail.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 uci = require 'luci.model.uci'.cursor()
|
||||
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
|
||||
|
||||
math.randomseed(tonumber(tostring(os.time()):reverse():sub(1, 9)))
|
||||
|
||||
-- Custom settings
|
||||
local mode = 'normal'
|
||||
local dark_css = fs.readfile('/www/luci-static/argon/css/dark.css')
|
||||
local bar_color = '#5e72e4'
|
||||
local primary, dark_primary, blur_radius, blur_radius_dark, blur_opacity
|
||||
if fs.access('/etc/config/argon') then
|
||||
primary = uci:get_first('argon', 'global', 'primary')
|
||||
dark_primary = uci:get_first('argon', 'global', 'dark_primary')
|
||||
blur_radius = uci:get_first('argon', 'global', 'blur')
|
||||
blur_radius_dark = uci:get_first('argon', 'global', 'blur_dark')
|
||||
blur_opacity = uci:get_first('argon', 'global', 'transparency')
|
||||
blur_opacity_dark = uci:get_first('argon', 'global', 'transparency_dark')
|
||||
mode = uci:get_first('argon', 'global', 'mode')
|
||||
bar_color = mode == 'dark' and dark_primary or primary
|
||||
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="msapplication-tap-highlight" content="no">
|
||||
<meta name="msapplication-TileColor" content="<%=bar_color%>">
|
||||
|
||||
<meta name="application-name" content="<%=striptags( (boardinfo.hostname or "?") ) %> - LuCI">
|
||||
<meta name="apple-mobile-web-app-title" content="<%=striptags( (boardinfo.hostname or "?") ) %> - LuCI">
|
||||
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="<%=media%>/icon/apple-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="<%=media%>/icon/apple-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="<%=media%>/icon/apple-icon-144x144.png">
|
||||
<link rel="icon" type="image/png" sizes="192x192" href="<%=media%>/icon/android-icon-192x192.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="<%=media%>/icon/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="96x96" href="<%=media%>/icon/favicon-96x96.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="<%=media%>/icon/favicon-16x16.png">
|
||||
<link rel="manifest" href="<%=media%>/icon/manifest.json">
|
||||
<meta name="msapplication-TileColor" content="<%=bar_color%>">
|
||||
<meta name="msapplication-TileImage" content="<%=media%>/icon/ms-icon-144x144.png">
|
||||
<meta name="theme-color" content="<%=bar_color%>">
|
||||
<link rel="stylesheet" href="<%=media%>/css/cascade.css?v=<%=math.random(1,100000)%>">
|
||||
<style title="text/css">
|
||||
<% if mode == 'normal' then %>
|
||||
@media (prefers-color-scheme: dark) {
|
||||
<%=dark_css%>
|
||||
}
|
||||
<% elseif mode == 'dark' then %>
|
||||
<%=dark_css%>
|
||||
<% end -%>
|
||||
<% if fs.access('/etc/config/argon') then %>
|
||||
:root {
|
||||
--primary: <%=primary%>;
|
||||
--dark-primary: <%=dark_primary%>;
|
||||
--blur-radius:<%=blur_radius%>px;
|
||||
--blur-opacity:<%=blur_opacity%>;
|
||||
--blur-radius-dark:<%=blur_radius_dark%>px;
|
||||
--blur-opacity-dark:<%=blur_opacity_dark%>;
|
||||
}
|
||||
<% end -%>
|
||||
</style>
|
||||
<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=PKG_VERSION %>"></script>
|
||||
<script src="<%=resource%>/xhr.js<%# ?v=PKG_VERSION %>"></script>
|
||||
<script src="<%=media%>/js/jquery.min.js<%# ?v=PKG_VERSION %>"></script>
|
||||
</head>
|
||||
|
||||
<body class="<%- if node then %><%= striptags( node.title ) %><%- end %> <% if luci.dispatcher.context.authsession then %>logged-in<% end %> lang_<%=luci.i18n.context.lang%> ">
|
||||
|
12
luasrc/view/themes/argon/out_header_login.htm
Normal file
@ -0,0 +1,12 @@
|
||||
<%#
|
||||
Copyright 2008 Steven Barth <steven@midlink.org>
|
||||
Copyright 2008 Jo-Philipp Wich <jow@openwrt.org>
|
||||
Licensed to the public under the Apache License 2.0.
|
||||
-%>
|
||||
|
||||
<%
|
||||
if not luci.dispatcher.context.template_header_sent then
|
||||
include("themes/" .. theme .. "/header_login")
|
||||
luci.dispatcher.context.template_header_sent = true
|
||||
end
|
||||
%>
|
@ -14,24 +14,21 @@
|
||||
|
||||
MUI:
|
||||
https://github.com/muicss/mui
|
||||
|
||||
Argon Theme
|
||||
|
||||
Agron Theme
|
||||
https://demos.creative-tim.com/argon-dashboard/index.html
|
||||
|
||||
Licensed to the public under the Apache License 2.0
|
||||
-%>
|
||||
|
||||
<%+themes/argon/out_header_login%>
|
||||
<%+header_login%>
|
||||
<%
|
||||
local util = require "luci.util"
|
||||
local fs = require "nixio.fs"
|
||||
local nutil = require "nixio.util"
|
||||
local json = require "luci.jsonc"
|
||||
local sys = require "luci.sys"
|
||||
local uci = require 'luci.model.uci'.cursor()
|
||||
|
||||
-- Fetch Local Background Media
|
||||
|
||||
local util = require "luci.util"
|
||||
local boardinfo = util.ubus("system", "board")
|
||||
local fs = require "nixio.fs"
|
||||
local nutil = require "nixio.util"
|
||||
local uci = require 'luci.model.uci'.cursor()
|
||||
local theme_dir = media .. "/background/"
|
||||
function glob(...)
|
||||
local iter, code, msg = fs.glob(...)
|
||||
if iter then
|
||||
@ -41,55 +38,49 @@
|
||||
end
|
||||
end
|
||||
|
||||
function getExtension(str)
|
||||
return str:match(".+%.(%w+)$")
|
||||
end
|
||||
|
||||
function fetchMedia(path,themeDir)
|
||||
local backgroundTable = {}
|
||||
local backgroundCount = 0
|
||||
function fetchMedia(path)
|
||||
local bgArr = {}
|
||||
local numBg = 0
|
||||
for i, f in ipairs(glob(path)) do
|
||||
attr = fs.stat(f)
|
||||
if attr then
|
||||
local ext = fs.basename(f):match(".+%.(%w+)$")
|
||||
local ext = getExtension(fs.basename(f))
|
||||
if ext == "jpg" or ext == "png" or ext == "gif" or ext == "mp4" then
|
||||
local bg = {}
|
||||
bg.type = ext
|
||||
bg.url = themeDir .. fs.basename(f)
|
||||
table.insert(backgroundTable,bg)
|
||||
backgroundCount = backgroundCount + 1
|
||||
bg.url = theme_dir .. fs.basename(f)
|
||||
table.insert(bgArr,bg)
|
||||
numBg = numBg + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
return backgroundTable,backgroundCount
|
||||
return bgArr,numBg
|
||||
end
|
||||
|
||||
local boardinfo = util.ubus("system", "board")
|
||||
local bingUrl = "http://www.bing.com/"
|
||||
local bingApiUrl = bingUrl .. "HPImageArchive.aspx?format=js&idx=0&n=1&mkt=en-US"
|
||||
local themeDir = media .. "/background/"
|
||||
local bgUrl = media .. "/img/bg1.jpg"
|
||||
local useBing = fs.access('/etc/config/argon') and "1" or "0"
|
||||
local backgroundTable, backgroundCount = fetchMedia("/www" .. themeDir .. "*",themeDir)
|
||||
local backgroundType = "Image"
|
||||
|
||||
if ( backgroundCount > 0 ) then
|
||||
local currentBg = backgroundTable[math.random(1,backgroundCount)]
|
||||
bgUrl = currentBg.url
|
||||
if (currentBg.type == "mp4" ) then
|
||||
backgroundType = "Video"
|
||||
end
|
||||
else
|
||||
local bing = sys.exec("wget --timeout=0.5 -qO- '%s'" %bingApiUrl)
|
||||
if (bing and bing ~= '') then
|
||||
bgUrl = bingUrl .. json.parse(bing).images[1].url
|
||||
end
|
||||
end
|
||||
local bgcount = 0
|
||||
local currentBg = {}
|
||||
local bgs = {}
|
||||
local theme_dir = media .. "/background/"
|
||||
local bing_background = fs.access('/etc/config/argon') and uci:get_first('argon', 'global', 'bing_background') or "0"
|
||||
bgs,bgcount=fetchMedia("/www" .. theme_dir .. "*")
|
||||
%>
|
||||
<!-- Login Page Start -->
|
||||
<div class="login-page">
|
||||
<% if ( backgroundType == "Video" ) then %>
|
||||
<!-- Video Player Start -->
|
||||
|
||||
<%
|
||||
local bg_url = media .. "/img/bg1.jpg"
|
||||
if ( bing_background == "0" ) then
|
||||
if bgcount > 0 then
|
||||
currentBg = bgs[math.random(1,bgcount)]
|
||||
end
|
||||
if ( bgcount > 0 and currentBg.type == "mp4" ) then
|
||||
%>
|
||||
<div class="video">
|
||||
<video autoplay loop muted id="video">
|
||||
<source src="<%=bgUrl%>" type="video/mp4">
|
||||
<source src="<%=currentBg.url%>" type="video/mp4">
|
||||
</video>
|
||||
</div>
|
||||
<div class="volume-control mute"></div>
|
||||
@ -104,21 +95,28 @@
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!-- Video Player End -->
|
||||
<% else %>
|
||||
<!-- Image Background Start -->
|
||||
<div class="main-bg" id="main-bg" style="background-image:url(<%=bgUrl%>)"></div>
|
||||
<!-- Image Background End -->
|
||||
<% elseif ( bgcount > 0 and currentBg["type"] ~= "mp4") then
|
||||
bg_url = currentBg.url
|
||||
end
|
||||
else
|
||||
local bing = "123"
|
||||
local sys = require "luci.sys"
|
||||
local json = require "luci.jsonc"
|
||||
local remote_bg_url="http://www.bing.com/HPImageArchive.aspx?format=js&idx=0&n=1&mkt=en-US"
|
||||
--bing = sys.httpget(remote_bg_url)
|
||||
bing = sys.exec("wget --timeout=0.5 -qO- '%s'" %remote_bg_url)
|
||||
if (bing and bing ~= '') then
|
||||
bg_url = "https://www.bing.com" .. json.parse(bing).images[1].url
|
||||
end
|
||||
end
|
||||
%>
|
||||
<% if(currentBg["type"] ~= "mp4") then %>
|
||||
<div class="main-bg" id="main-bg" style="background-image:url(<%=bg_url%>)"></div>
|
||||
<% end %>
|
||||
<!-- Login Container Start -->
|
||||
<div class="login-container">
|
||||
<div class="login-form">
|
||||
<!-- Logo Start -->
|
||||
<a class="brand" href="/"><img src="<%=media%>/img/argon.svg" class="icon">
|
||||
<span class="brand-text"><%=striptags( (boardinfo.hostname or "?") .. ( (node and node.title) and ' - ' .. translate(node.title) or '')) %></span>
|
||||
</a>
|
||||
<!-- Logo End -->
|
||||
<!-- Login Form Start -->
|
||||
<a class="brand" href="/"><img src="<%=media%>/img/argon.svg" class="icon"><span
|
||||
class="brand-text"><%=striptags( (boardinfo.hostname or "?") .. ( (node and node.title) and ' - ' .. translate(node.title) or '')) %></span></a>
|
||||
<form class="form-login" method="post" action="<%=pcdata(luci.http.getenv("REQUEST_URI"))%>">
|
||||
|
||||
<%- if fuser then %>
|
||||
@ -139,7 +137,7 @@
|
||||
<input type="submit" value="<%:Login%>" class="cbi-button cbi-button-apply" />
|
||||
</div>
|
||||
</form>
|
||||
<!-- Login Form End -->
|
||||
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
var input = document.getElementsByName('luci_password')[0];
|
||||
if (input)
|
||||
@ -169,4 +167,4 @@
|
||||
}
|
||||
//]]></script>
|
||||
<% end %>
|
||||
<%+themes/argon/out_footer_login%>
|
||||
<%+footer%>
|
@ -381,10 +381,14 @@ load_acl() {
|
||||
}
|
||||
|
||||
if [ "$PROXY_IPV6" == "1" ]; then
|
||||
$ip6t_m -A PSW $(comment "$remarks") -p tcp ${_ipt_source} $(factor $tcp_redir_ports "-m multiport --dport") $(dst $IPSET_SHUNTLIST6) $(REDIRECT $tcp_port TPROXY) 2>/dev/null
|
||||
$ip6t_m -A PSW $(comment "$remarks") -p tcp ${_ipt_source} $(factor $tcp_redir_ports "-m multiport --dport") $(dst $IPSET_BLACKLIST6) $(REDIRECT $tcp_port TPROXY) 2>/dev/null
|
||||
$ip6t_m -A PSW $(comment "$remarks") -p tcp ${_ipt_source} $(factor $tcp_redir_ports "-m multiport --dport") $(get_redirect_ip6t $tcp_proxy_mode $tcp_port TPROXY) 2>/dev/null
|
||||
[ "$accept_icmpv6" = "1" ] && $ip6t_n -A PSW $(comment "$remarks") -p ipv6-icmp ${_ipt_source} $(get_redirect_ip6t $tcp_proxy_mode) 2>/dev/null
|
||||
$ip6t_m -A PSW $(comment "$remarks") -p tcp ${_ipt_source} $(factor $tcp_redir_ports "-m multiport --dport") $(dst $IPSET_SHUNTLIST6) $(REDIRECT $tcp_port TPROXY)
|
||||
$ip6t_m -A PSW $(comment "$remarks") -p tcp ${_ipt_source} $(factor $tcp_redir_ports "-m multiport --dport") $(dst $IPSET_BLACKLIST6) $(REDIRECT $tcp_port TPROXY)
|
||||
$ip6t_m -A PSW $(comment "$remarks") -p tcp ${_ipt_source} $(factor $tcp_redir_ports "-m multiport --dport") $(get_redirect_ip6t $tcp_proxy_mode $tcp_port TPROXY)
|
||||
[ "$accept_icmpv6" = "1" ] && {
|
||||
$ip6t_n -A PSW $(comment "$remarks") -p ipv6-icmp ${_ipt_source} $(dst $IPSET_SHUNTLIST6) $(REDIRECT)
|
||||
$ip6t_n -A PSW $(comment "$remarks") -p ipv6-icmp ${_ipt_source} $(dst $IPSET_BLACKLIST6) $(REDIRECT)
|
||||
$ip6t_n -A PSW $(comment "$remarks") -p ipv6-icmp ${_ipt_source} $(get_redirect_ip6t $tcp_proxy_mode)
|
||||
}
|
||||
fi
|
||||
else
|
||||
msg2="${msg}不代理TCP"
|
||||
@ -467,7 +471,11 @@ load_acl() {
|
||||
$ip6t_m -A PSW $(comment "默认") -p tcp $(factor $TCP_REDIR_PORTS "-m multiport --dport") $(dst $IPSET_SHUNTLIST6) $(REDIRECT $TCP_REDIR_PORT TPROXY)
|
||||
$ip6t_m -A PSW $(comment "默认") -p tcp $(factor $TCP_REDIR_PORTS "-m multiport --dport") $(dst $IPSET_BLACKLIST6) $(REDIRECT $TCP_REDIR_PORT TPROXY)
|
||||
$ip6t_m -A PSW $(comment "默认") -p tcp $(factor $TCP_REDIR_PORTS "-m multiport --dport") $(get_redirect_ip6t $TCP_PROXY_MODE $TCP_REDIR_PORT TPROXY)
|
||||
[ "$accept_icmpv6" = "1" ] && $ip6t_n -A PSW $(comment "默认") -p ipv6-icmp $(get_redirect_ip6t $TCP_PROXY_MODE)
|
||||
[ "$accept_icmpv6" = "1" ] && {
|
||||
$ip6t_n -A PSW $(comment "默认") -p ipv6-icmp $(dst $IPSET_SHUNTLIST6) $(REDIRECT)
|
||||
$ip6t_n -A PSW $(comment "默认") -p ipv6-icmp $(dst $IPSET_BLACKLIST6) $(REDIRECT)
|
||||
$ip6t_n -A PSW $(comment "默认") -p ipv6-icmp $(get_redirect_ip6t $TCP_PROXY_MODE)
|
||||
}
|
||||
fi
|
||||
|
||||
echolog "${msg}"
|
||||
@ -845,6 +853,8 @@ add_firewall_rule() {
|
||||
|
||||
[ "$accept_icmpv6" = "1" ] && {
|
||||
$ip6t_n -A OUTPUT -p ipv6-icmp -j PSW_OUTPUT
|
||||
$ip6t_n -A PSW_OUTPUT -p ipv6-icmp $(dst $IPSET_SHUNTLIST6) $(REDIRECT)
|
||||
$ip6t_n -A PSW_OUTPUT -p ipv6-icmp $(dst $IPSET_BLACKLIST6) $(REDIRECT)
|
||||
$ip6t_n -A PSW_OUTPUT -p ipv6-icmp $(get_redirect_ip6t $TCP_PROXY_MODE)
|
||||
}
|
||||
|
||||
|
@ -1,43 +0,0 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. See error
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Openwrt (please complete the following information):**
|
||||
- Versiosn: [e.g. 18.06-lean]
|
||||
- Theme [e.g. argon]
|
||||
- Version [e.g. 2.27]
|
||||
|
||||
**Desktop (please complete the following information):**
|
||||
- OS: [e.g. iOS]
|
||||
- Browser [e.g. chrome, safari]
|
||||
- Version [e.g. 22]
|
||||
|
||||
**Smartphone (please complete the following information):**
|
||||
- Device: [e.g. iPhone6]
|
||||
- OS: [e.g. iOS8.1]
|
||||
- Browser [e.g. stock browser, safari]
|
||||
- Version [e.g. 22]
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
1
luci-theme-argon/.gitignore
vendored
@ -1 +0,0 @@
|
||||
Screenshots
|
@ -1,201 +0,0 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
@ -1,16 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2008-2019 Jerrykuku
|
||||
#
|
||||
# This is free software, licensed under the Apache License, Version 2.0 .
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
LUCI_TITLE:=Argon Theme
|
||||
LUCI_DEPENDS:=
|
||||
PKG_VERSION:=2.2.9
|
||||
PKG_RELEASE:=
|
||||
|
||||
include $(TOPDIR)/feeds/luci/luci.mk
|
||||
|
||||
# call BuildPackage - OpenWrt buildroot signature
|
@ -1,113 +0,0 @@
|
||||
<div align="center">
|
||||
<img src="https://raw.githubusercontent.com/jerrykuku/staff/master/argon_title2.png" >
|
||||
<h1 align="center">
|
||||
A new LuCI theme for OpenWrt
|
||||
</h1>
|
||||
<h3 align="center">
|
||||
Argon is a clean HTML5 theme for LuCI. Users may<br>setup their own favorite logins, including beautiful<br>pics and customized mp4 videos.<br><br>
|
||||
</h3>
|
||||
<a href="/LICENSE">
|
||||
<img src="https://img.shields.io/github/license/jerrykuku/luci-theme-argon?style=flat-square&a=1" alt="">
|
||||
</a>
|
||||
<a href="https://github.com/jerrykuku/luci-theme-argon/pulls">
|
||||
<img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square" alt="">
|
||||
</a><a href="https://github.com/jerrykuku/luci-theme-argon/issues/new">
|
||||
<img src="https://img.shields.io/badge/Issues-welcome-brightgreen.svg?style=flat-square">
|
||||
</a><a href="https://github.com/jerrykuku/luci-theme-argon/releases">
|
||||
<img src="https://img.shields.io/github/release/jerrykuku/luci-theme-argon.svg?style=flat-square">
|
||||
</a><a href="hhttps://github.com/jerrykuku/luci-theme-argon/releases">
|
||||
<img src="https://img.shields.io/github/downloads/jerrykuku/luci-theme-argon/total?style=flat-square">
|
||||
</a><a href="https://t.me/jerryk6">
|
||||
<img src="https://img.shields.io/badge/Contact-telegram-blue?style=flat-square">
|
||||
</a>
|
||||
</div>
|
||||
<br>
|
||||
<div align="center">
|
||||
<img src="https://raw.githubusercontent.com/jerrykuku/staff/master/argon2.gif">
|
||||
</div>
|
||||
|
||||
<br>English | [简体中文](README_ZH.md)
|
||||
|
||||
## Notice
|
||||
It is strongly recommended to use the Chrome browser. Some new css3 features are used in the theme, and currently only Chrome has the best compatibility.
|
||||
The mainline version of IE series currently has bugs to be resolved.
|
||||
FireFox does not enable the backdrop-filter by default, see here for the opening method: https://developer.mozilla.org/zh-CN/docs/Web/CSS/backdrop-filter
|
||||
|
||||
v2.x.x Adapt to official mainline snapshot.
|
||||
You can checkout branch 18.06 for OpenWRT 18.06 or lean 19.07.
|
||||
|
||||
## Update Log 2021.10.16 v2.2.9
|
||||
|
||||
- 【v2.2.9】Fix the problem that the menu could not pop up in mobile mode
|
||||
- 【v2.2.9】Unify the settings of css spacing
|
||||
- 【v2.2.9】Refactored the code of the login page
|
||||
- 【v2.2.8】Fix the problem that the Minify Css option is turned on when compiling, which causes the frosted glass effect to be invalid and the logo font is lost.
|
||||
- 【v2.2.5】New config app for argon theme. You can set the blur and transparency of the login page of argon theme, and manage the background pictures and videos.[Chrome is recommended] [Download](https://github.com/jerrykuku/luci-app-argon-config/releases/download/v0.8-beta/luci-app-argon-config_0.8-beta_all.ipk)
|
||||
- 【v2.2.5】Automatically set as the default theme when compiling.
|
||||
- 【v2.2.5】Modify the file structure to adapt to luci-app-argon-config. The old method of turning on dark mode is no longer applicable, please use it with luci-app-argon-config.
|
||||
- 【v2.2.5】Adapt to Koolshare lede 2.3.6。
|
||||
- 【v2.2.5】Fix some Bug。
|
||||
- 【v2.2.4】Fix the problem that the login background cannot be displayed on some phones.
|
||||
- 【v2.2.4】Remove the dependency of luasocket.
|
||||
- 【v2.2.3】Fix Firmware flash page display error in dark mode.
|
||||
- 【v2.2.3】Update font icon, add a default icon of undefined menu.
|
||||
- 【v2.2.2】Add custom login background,put your image (allow png jpg gif) or MP4 video into /www/luci-static/argon/background, random change.
|
||||
- 【v2.2.2】Add force dark mode, login ssh and type "touch /etc/dark" to open dark mode.
|
||||
- 【v2.2.2】Add a volume mute button for video background, default is muted.
|
||||
- 【v2.2.2】fix login page when keyboard show the bottom text overlay the button on mobile.
|
||||
- 【v2.2.2】fix select color in dark mode,and add a style for scrollbar.
|
||||
- 【v2.2.2】jquery update to v3.5.1.
|
||||
- 【v2.2.2】change request bing api method form wget to luasocket (DEPENDS).
|
||||
- 【v2.2.1】Add blur effect for login form.
|
||||
- 【v2.2.1】New login theme, Request background imge from bing.com, Auto change everyday.
|
||||
- 【v2.2.1】New theme icon.
|
||||
- 【v2.2.1】Add more menu category icon.
|
||||
- 【v2.2.1】Fix font-size and padding margin.
|
||||
- 【v2.2.1】Restructure css file.
|
||||
- 【v2.2.1】Auto adapt to dark mode.
|
||||
|
||||
## How to build
|
||||
|
||||
Enter in your openwrt/package/lean or other
|
||||
|
||||
### Lean lede
|
||||
|
||||
```
|
||||
cd lede/package/lean
|
||||
rm -rf luci-theme-argon
|
||||
git clone -b 18.06 https://github.com/jerrykuku/luci-theme-argon.git
|
||||
make menuconfig #choose LUCI->Theme->Luci-theme-argon
|
||||
make -j1 V=s
|
||||
```
|
||||
|
||||
### Openwrt official SnapShots
|
||||
|
||||
```
|
||||
cd openwrt/package
|
||||
git clone https://github.com/jerrykuku/luci-theme-argon.git
|
||||
make menuconfig #choose LUCI->Theme->Luci-theme-argon
|
||||
make -j1 V=s
|
||||
```
|
||||
|
||||
## How to Install
|
||||
|
||||
### For Lean openwrt 18.06 LuCI
|
||||
|
||||
```
|
||||
wget --no-check-certificate https://github.com/jerrykuku/luci-theme-argon/releases/download/v1.7.0/luci-theme-argon_1.7.0-20200909_all.ipk
|
||||
opkg install luci-theme-argon*.ipk
|
||||
```
|
||||
|
||||
### For openwrt official 19.07 Snapshots LuCI master
|
||||
|
||||
```
|
||||
opkg install luci-compat
|
||||
wget --no-check-certificate https://github.com/jerrykuku/luci-theme-argon/releases/download/v2.2.5/luci-theme-argon_2.2.5-20200914_all.ipk
|
||||
opkg install luci-theme-argon*.ipk
|
||||
```
|
||||
![](/Screenshots/screenshot_pc.jpg)
|
||||
![](/Screenshots/screenshot_phone.jpg)
|
||||
|
||||
## Thanks to
|
||||
|
||||
luci-theme-material: https://github.com/LuttyYang/luci-theme-material/
|
@ -1,110 +0,0 @@
|
||||
<div align="center">
|
||||
<img src="https://raw.githubusercontent.com/jerrykuku/staff/master/argon_title2.png" >
|
||||
<h1 align="center">
|
||||
全新的 Openwrt 主题
|
||||
</h1>
|
||||
<h3 align="center">
|
||||
Argon 是一个干净整洁的Openwrt主题,用户可以自定义登录界面,<br>包含图片或者视频,同时支持深色浅色的自动与手动切换
|
||||
</h3>
|
||||
|
||||
<a href="/LICENSE">
|
||||
<img src="https://img.shields.io/github/license/jerrykuku/luci-theme-argon?style=flat-square&a=1" alt="">
|
||||
</a><a href="https://github.com/jerrykuku/luci-theme-argon/pulls">
|
||||
<img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square" alt="">
|
||||
</a><a href="https://github.com/jerrykuku/luci-theme-argon/issues/new">
|
||||
<img src="https://img.shields.io/badge/Issues-welcome-brightgreen.svg?style=flat-square">
|
||||
</a><a href="https://github.com/jerrykuku/luci-theme-argon/releases">
|
||||
<img src="https://img.shields.io/github/release/jerrykuku/luci-theme-argon.svg?style=flat-square">
|
||||
</a><a href="hhttps://github.com/jerrykuku/luci-theme-argon/releases">
|
||||
<img src="https://img.shields.io/github/downloads/jerrykuku/luci-theme-argon/total?style=flat-square">
|
||||
</a><a href="https://t.me/jerryk6">
|
||||
<img src="https://img.shields.io/badge/Contact-telegram-blue?style=flat-square">
|
||||
</a>
|
||||
</div>
|
||||
|
||||
![](/Screenshots/screenshot_pc.jpg)
|
||||
![](/Screenshots/screenshot_phone.jpg)
|
||||
|
||||
|
||||
## 注意
|
||||
强烈建议使用Chrome 浏览器。主题中使用了一些新的css3特性,目前只有Chrome有最佳的兼容性。
|
||||
主线版本 IE 系列目前还有Bug有待解决。
|
||||
FireFox 默认不开启backdrop-filter,开启方法见这里:https://developer.mozilla.org/zh-CN/docs/Web/CSS/backdrop-filter
|
||||
当前master版本基于官方 OpenWrt 19.07.1 稳定版固件进行移植适配。
|
||||
v2.x.x 适配主线快照版本。
|
||||
v1.x.x 适配18.06 和 Lean Openwrt [如果你是lean代码 请选择这个版本]
|
||||
|
||||
|
||||
## 更新日志 2021.10.16 v2.2.9
|
||||
|
||||
- 【v2.2.9】修复了在手机模式下无法弹出菜单的bug
|
||||
- 【v2.2.9】统一css间距的设置
|
||||
- 【v2.2.9】重构了登录页面的代码
|
||||
- 【v2.2.9】为导航菜单添加滑动效果
|
||||
- 【v2.2.8】修复编译时打开Minify Css选项,导致磨砂玻璃效果无效,logo字体丢失的问题
|
||||
- 【v2.2.5】全新的设置app.你可以设置argon 主题的登录页面的模糊和透明度,并管理背景图片与视频。[建议使用 Chrome][点击下载](https://github.com/jerrykuku/luci-app-argon-config/releases/download/v0.8-beta/luci-app-argon-config_0.8-beta_all.ipk)
|
||||
- 【v2.2.5】当编译固件时,将自动设置为默认主题。
|
||||
- 【v2.2.5】修改文件结构,以适应luci-app-argon-config,旧的开启暗色模式方法将不再适用,请搭配luci-app-argon-config使用。
|
||||
- 【v2.2.5】适配Koolshare lede 2.3.6。
|
||||
- 【v2.2.5】修复了一些Bug。
|
||||
- 【v2.2.4】修复了在某些手机下图片背景第一次加载不能显示的问题。
|
||||
- 【v2.2.4】取消 luasocket 的依赖,无需再担心依赖问题。
|
||||
- 【v2.2.3】修正了在暗色模式下,固件刷写弹窗内的显示错误。
|
||||
- 【v2.2.3】更新了图标库,为未定义的菜单增加了一个默认的图标。
|
||||
- 【v2.2.2】背景文件策略调整为,同时接受 jpg png gif mp4, 自行上传文件至 /www/luci-static/argon/background 图片和视频同时随机。
|
||||
- 【v2.2.2】增加强制暗色模式,进入ssh 输入 "touch /etc/dark" 进行开启。
|
||||
- 【v2.2.2】视频背景加了一个音量开关,喜欢带声音的可以自行点击开启,默认为静音模式。
|
||||
- 【v2.2.2】修复了手机模式下,登录页面出现键盘时,文字覆盖按钮的问题。
|
||||
- 【v2.2.2】修正了暗黑模式下下拉选项的背景颜色,同时修改了滚动条的样式。
|
||||
- 【v2.2.2】jquery 更新到 v3.5.1。
|
||||
- 【v2.2.2】获取Bing Api 的方法从wget 更新到luasocket 并添加依赖。
|
||||
- 【v2.2.1】登录背景添加毛玻璃效果。
|
||||
- 【v2.2.1】全新的登录界面,图片背景跟随Bing.com,每天自动切换。
|
||||
- 【v2.2.1】全新的主题icon。
|
||||
- 【v2.2.1】增加多个导航icon。
|
||||
- 【v2.2.1】细致的微调了 字号大小边距等等。
|
||||
- 【v2.2.1】重构了css文件。
|
||||
- 【v2.2.1】自动适应的暗黑模式。
|
||||
|
||||
## 如何编译
|
||||
|
||||
进入 openwrt/package/lean 或者其他目录
|
||||
|
||||
### Lean源码
|
||||
|
||||
```
|
||||
cd lede/package/lean
|
||||
rm -rf luci-theme-argon
|
||||
git clone -b 18.06 https://github.com/jerrykuku/luci-theme-argon.git
|
||||
make menuconfig #choose LUCI->Theme->Luci-theme-argon
|
||||
make -j1 V=s
|
||||
```
|
||||
|
||||
### Openwrt 官方源码
|
||||
|
||||
```
|
||||
cd openwrt/package
|
||||
git clone https://github.com/jerrykuku/luci-theme-argon.git
|
||||
make menuconfig #choose LUCI->Theme->Luci-theme-argon
|
||||
make -j1 V=s
|
||||
```
|
||||
|
||||
## 如何安装
|
||||
|
||||
### Lean源码
|
||||
|
||||
```
|
||||
wget --no-check-certificate https://github.com/jerrykuku/luci-theme-argon/releases/download/v1.7.0/luci-theme-argon_1.7.0-20200909_all.ipk
|
||||
opkg install luci-theme-argon*.ipk
|
||||
```
|
||||
|
||||
### For openwrt official 19.07 Snapshots LuCI master
|
||||
|
||||
```
|
||||
wget --no-check-certificate https://github.com/jerrykuku/luci-theme-argon/releases/download/v2.2.5/luci-theme-argon_2.2.5-20200914_all.ipk
|
||||
opkg install luci-theme-argon*.ipk
|
||||
```
|
||||
|
||||
## 感谢
|
||||
|
||||
luci-theme-material: https://github.com/LuttyYang/luci-theme-material/
|
@ -1,2 +0,0 @@
|
||||
Drop background here!
|
||||
accept jpg png gif and mp4
|
@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="#adaeaf" d="m8,10.033663l-6.898535,-6.013274l-1.060688,0.972974l7.959223,6.986249l7.959223,-6.986249l-1.060688,-0.972974l-6.898535,6.013274z"/></svg>
|
Before Width: | Height: | Size: 222 B |
@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="#888" d="M8,0c-4.355,0-7.898,3.481-7.998,7.812,0.092-3.779,2.966-6.812,6.498-6.812,3.59,0,6.5,3.134,6.5,7,0,0.828,0.672,1.5,1.5,1.5s1.5-0.672,1.5-1.5c0-4.418-3.582-8-8-8zM8,16c4.355,0,7.898-3.481,7.998-7.812-0.092,3.779-2.966,6.812-6.498,6.812-3.59,0-6.5-3.134-6.5-7,0-0.828-0.672-1.5-1.5-1.5s-1.5,0.672-1.5,1.5c0,4.418,3.582,8,8,8z"/></svg>
|
Before Width: | Height: | Size: 413 B |
@ -1,3 +0,0 @@
|
||||
/* Disable minification (remove `.min` from URL path) for more info */
|
||||
|
||||
(function(undefined) {}).call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
|
@ -1,154 +0,0 @@
|
||||
'use strict';
|
||||
'require baseclass';
|
||||
'require ui';
|
||||
|
||||
return baseclass.extend({
|
||||
__init__: function () {
|
||||
ui.menu.load().then(L.bind(this.render, this));
|
||||
},
|
||||
|
||||
render: function (tree) {
|
||||
var node = tree,
|
||||
url = '',
|
||||
children = ui.menu.getChildren(tree);
|
||||
|
||||
for (var i = 0; i < children.length; i++) {
|
||||
var isActive = (L.env.requestpath.length ? children[i].name == L.env.requestpath[0] : i == 0);
|
||||
|
||||
if (isActive)
|
||||
this.renderMainMenu(children[i], children[i].name);
|
||||
}
|
||||
|
||||
if (L.env.dispatchpath.length >= 3) {
|
||||
for (var i = 0; i < 3 && node; i++) {
|
||||
node = node.children[L.env.dispatchpath[i]];
|
||||
url = url + (url ? '/' : '') + L.env.dispatchpath[i];
|
||||
}
|
||||
|
||||
if (node)
|
||||
this.renderTabMenu(node, url);
|
||||
}
|
||||
|
||||
document.querySelector('a.showSide')
|
||||
.addEventListener('click', ui.createHandlerFn(this, 'handleSidebarToggle'));
|
||||
document.querySelector('.darkMask')
|
||||
.addEventListener('click', ui.createHandlerFn(this, 'handleSidebarToggle'));
|
||||
},
|
||||
|
||||
handleMenuExpand: function (ev) {
|
||||
var a = ev.target, slide = a.parentNode, slide_menu = a.nextElementSibling;
|
||||
|
||||
document.querySelectorAll('.main .main-left .nav > li >ul.active').forEach(function (ul) {
|
||||
if (ul !== slide_menu) {
|
||||
$(ul).stop(true).slideUp("fast", function () {
|
||||
ul.classList.remove('active');
|
||||
ul.previousElementSibling.classList.remove('active');
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
if (!slide_menu)
|
||||
return;
|
||||
|
||||
|
||||
$(slide).find(".slide-menu").slideDown("fast",function(){
|
||||
slide_menu.classList.add('active');
|
||||
a.classList.add('active');
|
||||
});
|
||||
a.blur();
|
||||
ev.preventDefault();
|
||||
ev.stopPropagation();
|
||||
},
|
||||
|
||||
renderMainMenu: function (tree, url, level) {
|
||||
var l = (level || 0) + 1,
|
||||
ul = E('ul', { 'class': level ? 'slide-menu' : 'nav' }),
|
||||
children = ui.menu.getChildren(tree);
|
||||
|
||||
if (children.length == 0 || l > 2)
|
||||
return E([]);
|
||||
|
||||
for (var i = 0; i < children.length; i++) {
|
||||
var isActive = ((L.env.dispatchpath[l] == children[i].name) && (L.env.dispatchpath[l - 1] == tree.name)),
|
||||
submenu = this.renderMainMenu(children[i], url + '/' + children[i].name, l),
|
||||
hasChildren = submenu.children.length,
|
||||
slideClass = hasChildren ? 'slide' : null,
|
||||
menuClass = hasChildren ? 'menu' : null;
|
||||
if (isActive) {
|
||||
ul.classList.add('active');
|
||||
slideClass += " active";
|
||||
menuClass += " active";
|
||||
}
|
||||
|
||||
ul.appendChild(E('li', { 'class': slideClass }, [
|
||||
E('a', {
|
||||
'href': L.url(url, children[i].name),
|
||||
'click': (l == 1) ? ui.createHandlerFn(this, 'handleMenuExpand') : null,
|
||||
'class': menuClass,
|
||||
'data-title': hasChildren ? children[i].title.replace(" ", "_") : children[i].title.replace(" ", "_"),
|
||||
}, [_(children[i].title)]),
|
||||
submenu
|
||||
]));
|
||||
}
|
||||
|
||||
if (l == 1) {
|
||||
document.querySelector('#mainmenu').appendChild(ul);
|
||||
document.querySelector('#mainmenu').style.display = '';
|
||||
|
||||
}
|
||||
return ul;
|
||||
},
|
||||
|
||||
renderTabMenu: function (tree, url, level) {
|
||||
var container = document.querySelector('#tabmenu'),
|
||||
l = (level || 0) + 1,
|
||||
ul = E('ul', { 'class': 'tabs' }),
|
||||
children = ui.menu.getChildren(tree),
|
||||
activeNode = null;
|
||||
|
||||
if (children.length == 0)
|
||||
return E([]);
|
||||
|
||||
for (var i = 0; i < children.length; i++) {
|
||||
var isActive = (L.env.dispatchpath[l + 2] == children[i].name),
|
||||
activeClass = isActive ? ' active' : '',
|
||||
className = 'tabmenu-item-%s %s'.format(children[i].name, activeClass);
|
||||
|
||||
ul.appendChild(E('li', { 'class': className }, [
|
||||
E('a', { 'href': L.url(url, children[i].name) }, [_(children[i].title)])
|
||||
]));
|
||||
|
||||
if (isActive)
|
||||
activeNode = children[i];
|
||||
}
|
||||
|
||||
container.appendChild(ul);
|
||||
container.style.display = '';
|
||||
|
||||
if (activeNode)
|
||||
container.appendChild(this.renderTabMenu(activeNode, url + '/' + activeNode.name, l));
|
||||
|
||||
return ul;
|
||||
},
|
||||
|
||||
handleSidebarToggle: function (ev) {
|
||||
var showside = document.querySelector('a.showSide'),
|
||||
sidebar = document.querySelector('#mainmenu'),
|
||||
darkmask = document.querySelector('.darkMask'),
|
||||
scrollbar = document.querySelector('.main-right');
|
||||
|
||||
if (showside.classList.contains('active')) {
|
||||
showside.classList.remove('active');
|
||||
sidebar.classList.remove('active');
|
||||
scrollbar.classList.remove('active');
|
||||
darkmask.classList.remove('active');
|
||||
}
|
||||
else {
|
||||
showside.classList.add('active');
|
||||
sidebar.classList.add('active');
|
||||
scrollbar.classList.add('active');
|
||||
darkmask.classList.add('active');
|
||||
}
|
||||
}
|
||||
});
|
@ -1,46 +0,0 @@
|
||||
<%#
|
||||
Argon is a clean HTML5 theme for LuCI. It is based on luci-theme-material Argon Template
|
||||
|
||||
luci-theme-argon
|
||||
Copyright 2020 Jerrykuku <jerrykuku@qq.com>
|
||||
|
||||
Have a bug? Please create an issue here on GitHub!
|
||||
https://github.com/jerrykuku/luci-theme-argon/issues
|
||||
|
||||
luci-theme-material:
|
||||
Copyright 2015 Lutty Yang <lutty@wcan.in>
|
||||
|
||||
Agron Theme
|
||||
https://demos.creative-tim.com/argon-dashboard/index.html
|
||||
|
||||
Licensed to the public under the Apache License 2.0
|
||||
-%>
|
||||
|
||||
<% local ver = require "luci.version" %>
|
||||
</div>
|
||||
<footer class="mobile-hide">
|
||||
<div>
|
||||
<a class="luci-link" href="https://github.com/openwrt/luci">Powered by <%= ver.luciname %> (<%= ver.luciversion %>)</a> /
|
||||
<a href="https://github.com/jerrykuku/luci-theme-argon">ArgonTheme <%# vPKG_VERSION %></a> /
|
||||
<%= ver.distversion %>
|
||||
<ul class="breadcrumb pull-right" id="modemenu" style="display:none"></ul>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
// thanks for Jo-Philipp Wich <jow@openwrt.org>
|
||||
var luciLocation = <%= luci.http.write_json(luci.dispatcher.context.path) %>;
|
||||
var winHeight = $(window).height();
|
||||
$(window).resize(function () {
|
||||
var winWidth = $(window).width()
|
||||
if(winWidth < 600){
|
||||
var newHeight = $(this).height();
|
||||
var keyboradHeight = newHeight - winHeight;
|
||||
$(".ftc").css("bottom", keyboradHeight + 30);
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<script type="text/javascript">L.require('menu-argon')</script>
|
||||
</body>
|
||||
</html>
|
@ -1,46 +0,0 @@
|
||||
<%#
|
||||
Argon is a clean HTML5 theme for LuCI. It is based on luci-theme-material Argon Template
|
||||
|
||||
luci-theme-argon
|
||||
Copyright 2020 Jerrykuku <jerrykuku@qq.com>
|
||||
|
||||
Have a bug? Please create an issue here on GitHub!
|
||||
https://github.com/jerrykuku/luci-theme-argon/issues
|
||||
|
||||
luci-theme-material:
|
||||
Copyright 2015 Lutty Yang <lutty@wcan.in>
|
||||
|
||||
Agron Theme
|
||||
https://demos.creative-tim.com/argon-dashboard/index.html
|
||||
|
||||
Licensed to the public under the Apache License 2.0
|
||||
-%>
|
||||
|
||||
<% local ver = require "luci.version" %>
|
||||
</div>
|
||||
<footer>
|
||||
<div>
|
||||
<a class="luci-link" href="https://github.com/openwrt/luci">Powered by <%= ver.luciname %> (<%= ver.luciversion %>)</a> /
|
||||
<a href="https://github.com/jerrykuku/luci-theme-argon">ArgonTheme <%# vPKG_VERSION %></a> /
|
||||
<%= ver.distversion %>
|
||||
<ul class="breadcrumb pull-right" id="modemenu" style="display:none"></ul>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
// thanks for Jo-Philipp Wich <jow@openwrt.org>
|
||||
var luciLocation = <%= luci.http.write_json(luci.dispatcher.context.path) %>;
|
||||
var winHeight = $(window).height();
|
||||
$(window).resize(function () {
|
||||
var winWidth = $(window).width()
|
||||
if(winWidth < 600){
|
||||
var newHeight = $(this).height();
|
||||
var keyboradHeight = newHeight - winHeight;
|
||||
$(".ftc").css("bottom", keyboradHeight + 30);
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<script type="text/javascript">L.require('menu-argon')</script>
|
||||
</body>
|
||||
</html>
|
@ -1,179 +0,0 @@
|
||||
<%#
|
||||
Argon is a clean HTML5 theme for LuCI. It is based on luci-theme-material Argon Template
|
||||
|
||||
luci-theme-argon
|
||||
Copyright 2020 Jerrykuku <jerrykuku@qq.com>
|
||||
|
||||
Have a bug? Please create an issue here on GitHub!
|
||||
https://github.com/jerrykuku/luci-theme-argon/issues
|
||||
|
||||
luci-theme-material:
|
||||
Copyright 2015 Lutty Yang <lutty@wcan.in>
|
||||
|
||||
Argon 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 boardinfo = util.ubus("system", "board")
|
||||
|
||||
local node = disp.context.dispatched
|
||||
|
||||
local fs = require "nixio.fs"
|
||||
local nutil = require "nixio.util"
|
||||
local uci = require 'luci.model.uci'.cursor()
|
||||
|
||||
-- send as HTML5
|
||||
http.prepare_content("text/html")
|
||||
|
||||
math.randomseed(os.time())
|
||||
|
||||
-- Custom settings
|
||||
local mode = 'normal'
|
||||
local dark_css = fs.readfile('/www/luci-static/argon/css/dark.css')
|
||||
local bar_color = '#5e72e4'
|
||||
local primary, dark_primary, blur_radius, blur_radius_dark, blur_opacity
|
||||
if fs.access('/etc/config/argon') then
|
||||
primary = uci:get_first('argon', 'global', 'primary')
|
||||
dark_primary = uci:get_first('argon', 'global', 'dark_primary')
|
||||
blur_radius = uci:get_first('argon', 'global', 'blur')
|
||||
blur_radius_dark = uci:get_first('argon', 'global', 'blur_dark')
|
||||
blur_opacity = uci:get_first('argon', 'global', 'transparency')
|
||||
blur_opacity_dark = uci:get_first('argon', 'global', 'transparency_dark')
|
||||
mode = uci:get_first('argon', 'global', 'mode')
|
||||
bar_color = mode == 'dark' and dark_primary or primary
|
||||
end
|
||||
|
||||
-- Brand name
|
||||
local brand_name = boardinfo.hostname or "?"
|
||||
-%>
|
||||
<!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="msapplication-tap-highlight" content="no">
|
||||
<meta name="msapplication-TileColor" content="<%=bar_color%>">
|
||||
<meta name="application-name" content="<%=striptags( (boardinfo.hostname or "?") ) %> - LuCI">
|
||||
<meta name="apple-mobile-web-app-title" content="<%=striptags( (boardinfo.hostname or "?") ) %> - LuCI">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="<%=media%>/icon/apple-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="<%=media%>/icon/apple-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="<%=media%>/icon/apple-icon-144x144.png">
|
||||
<link rel="icon" type="image/png" sizes="192x192" href="<%=media%>/icon/android-icon-192x192.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="<%=media%>/icon/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="96x96" href="<%=media%>/icon/favicon-96x96.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="<%=media%>/icon/favicon-16x16.png">
|
||||
<link rel="manifest" href="<%=media%>/icon/manifest.json" crossorigin="use-credentials">
|
||||
<meta name="msapplication-TileColor" content="<%=bar_color%>">
|
||||
<meta name="msapplication-TileImage" content="<%=media%>/icon/ms-icon-144x144.png">
|
||||
<meta name="theme-color" content="<%=bar_color%>">
|
||||
<link rel="stylesheet" href="<%=media%>/css/cascade.css?v=<%=math.random(1,100000)%>">
|
||||
<style title="text/css">
|
||||
<% if mode == 'normal' then %>
|
||||
@media (prefers-color-scheme: dark) {
|
||||
<%=dark_css%>
|
||||
}
|
||||
<% elseif mode == 'dark' then %>
|
||||
<%=dark_css%>
|
||||
<% end -%>
|
||||
<% if fs.access('/etc/config/argon') then %>
|
||||
:root {
|
||||
--primary: <%=primary%>;
|
||||
--dark-primary: <%=dark_primary%>;
|
||||
--blur-radius:<%=blur_radius%>px;
|
||||
--blur-opacity:<%=blur_opacity%>;
|
||||
--blur-radius-dark:<%=blur_radius_dark%>px;
|
||||
--blur-opacity-dark:<%=blur_opacity_dark%>;
|
||||
}
|
||||
<% end -%>
|
||||
</style>
|
||||
<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="<%=media%>/js/polyfill.min.js"></script>
|
||||
<script src="<%=url('admin/translations', luci.i18n.context.lang)%>?v=2.2.4"></script>
|
||||
<script src="<%=resource%>/cbi.js?v=2.2.4"></script>
|
||||
<script src="<%=resource%>/luci.js?v=2.2.4"></script>
|
||||
<script src="<%=media%>/js/jquery.min.js?v=2.2.4"></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 %>"
|
||||
data-page="<%= table.concat(disp.context.requestpath, "-") %>">
|
||||
|
||||
<div class="main">
|
||||
<div class="main-left" id="mainmenu" style="display:none">
|
||||
<div class="sidenav-header d-flex align-items-center">
|
||||
<a class="brand" href="#"><%=brand_name%></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>
|
||||
</div>
|
||||
<div class="main-right">
|
||||
<header class="bg-primary">
|
||||
<div class="fill">
|
||||
<div class="container">
|
||||
<div class="flex1">
|
||||
<a class="showSide"></a>
|
||||
<a class="brand" href="#"><%=brand_name%></a>
|
||||
</div>
|
||||
<div class="status" id="indicators"></div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<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 error">
|
||||
<h4><%:No password set!%></h4>
|
||||
<p><%:There is no password set on this router. Please configure a root password to protect the web interface.%>
|
||||
</p>
|
||||
<% if disp.lookup("admin/system/admin") then %>
|
||||
<div class="right"><a class="btn"
|
||||
href="<%=url("admin/system/admin")%>"><%:Go to password configuration...%></a></div>
|
||||
<% end %>
|
||||
</div>
|
||||
<%- end -%>
|
||||
|
||||
<noscript>
|
||||
<div class="alert-message error">
|
||||
<h4><%:JavaScript required!%></h4>
|
||||
<p><%:You must enable JavaScript in your browser or LuCI will not work properly.%></p>
|
||||
</div>
|
||||
</noscript>
|
||||
|
||||
<div id="tabmenu" style="display:none"></div>
|
@ -1,123 +0,0 @@
|
||||
<%#
|
||||
Argon is a clean HTML5 theme for LuCI. It is based on luci-theme-material Argon Template
|
||||
|
||||
luci-theme-argon
|
||||
Copyright 2020 Jerrykuku <jerrykuku@qq.com>
|
||||
|
||||
Have a bug? Please create an issue here on GitHub!
|
||||
https://github.com/jerrykuku/luci-theme-argon/issues
|
||||
|
||||
luci-theme-material:
|
||||
Copyright 2015 Lutty Yang <lutty@wcan.in>
|
||||
|
||||
Argon 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 boardinfo = util.ubus("system", "board")
|
||||
|
||||
local node = disp.context.dispatched
|
||||
|
||||
local fs = require "nixio.fs"
|
||||
local nutil = require "nixio.util"
|
||||
local uci = require 'luci.model.uci'.cursor()
|
||||
|
||||
-- send as HTML5
|
||||
http.prepare_content("text/html")
|
||||
|
||||
math.randomseed(tonumber(tostring(os.time()):reverse():sub(1, 9)))
|
||||
|
||||
-- Custom settings
|
||||
local mode = 'normal'
|
||||
local dark_css = fs.readfile('/www/luci-static/argon/css/dark.css')
|
||||
local bar_color = '#5e72e4'
|
||||
local primary, dark_primary, blur_radius, blur_radius_dark, blur_opacity
|
||||
if fs.access('/etc/config/argon') then
|
||||
primary = uci:get_first('argon', 'global', 'primary')
|
||||
dark_primary = uci:get_first('argon', 'global', 'dark_primary')
|
||||
blur_radius = uci:get_first('argon', 'global', 'blur')
|
||||
blur_radius_dark = uci:get_first('argon', 'global', 'blur_dark')
|
||||
blur_opacity = uci:get_first('argon', 'global', 'transparency')
|
||||
blur_opacity_dark = uci:get_first('argon', 'global', 'transparency_dark')
|
||||
mode = uci:get_first('argon', 'global', 'mode')
|
||||
bar_color = mode == 'dark' and dark_primary or primary
|
||||
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="msapplication-tap-highlight" content="no">
|
||||
<meta name="msapplication-TileColor" content="<%=bar_color%>">
|
||||
<meta name="application-name" content="<%=striptags( (boardinfo.hostname or "?") ) %> - LuCI">
|
||||
<meta name="apple-mobile-web-app-title" content="<%=striptags( (boardinfo.hostname or "?") ) %> - LuCI">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="<%=media%>/icon/apple-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="<%=media%>/icon/apple-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="<%=media%>/icon/apple-icon-144x144.png">
|
||||
<link rel="icon" type="image/png" sizes="192x192" href="<%=media%>/icon/android-icon-192x192.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="<%=media%>/icon/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="96x96" href="<%=media%>/icon/favicon-96x96.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="<%=media%>/icon/favicon-16x16.png">
|
||||
<link rel="manifest" href="<%=media%>/icon/manifest.json" crossorigin="use-credentials">
|
||||
<meta name="msapplication-TileColor" content="<%=bar_color%>">
|
||||
<meta name="msapplication-TileImage" content="<%=media%>/icon/ms-icon-144x144.png">
|
||||
<meta name="theme-color" content="<%=bar_color%>">
|
||||
<link rel="stylesheet" href="<%=media%>/css/cascade.css?v=<%=math.random(1,100000)%>">
|
||||
<style title="text/css">
|
||||
<% if mode == 'normal' then %>
|
||||
@media (prefers-color-scheme: dark) {
|
||||
<%=dark_css%>
|
||||
}
|
||||
<% elseif mode == 'dark' then %>
|
||||
<%=dark_css%>
|
||||
<% end -%>
|
||||
<% if fs.access('/etc/config/argon') then %>
|
||||
:root {
|
||||
--primary: <%=primary%>;
|
||||
--dark-primary: <%=dark_primary%>;
|
||||
--blur-radius:<%=blur_radius%>px;
|
||||
--blur-opacity:<%=blur_opacity%>;
|
||||
--blur-radius-dark:<%=blur_radius_dark%>px;
|
||||
--blur-opacity-dark:<%=blur_opacity_dark%>;
|
||||
}
|
||||
<% end -%>
|
||||
</style>
|
||||
<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="<%=url('admin/translations', luci.i18n.context.lang)%><%# ?v=PKG_VERSION %>"></script>
|
||||
<script src="<%=resource%>/cbi.js<%# ?v=PKG_VERSION %>"></script>
|
||||
<script src="<%=resource%>/xhr.js<%# ?v=PKG_VERSION %>"></script>
|
||||
<script src="<%=media%>/js/jquery.min.js<%# ?v=PKG_VERSION %>"></script>
|
||||
|
||||
</head>
|
||||
|
||||
<body
|
||||
class="lang_<%=luci.i18n.context.lang%> <% if node then %><%= striptags( node.title ) %><% end %> <% if luci.dispatcher.context.authsession then %>logged-in<% end %>"
|
||||
data-page="<%= table.concat(disp.context.requestpath, "-") %>">
|
@ -1,27 +0,0 @@
|
||||
<%#
|
||||
Copyright 2008 Steven Barth <steven@midlink.org>
|
||||
Copyright 2008-2019 Jo-Philipp Wich <jo@mein.io>
|
||||
Licensed to the public under the Apache License 2.0.
|
||||
-%>
|
||||
|
||||
<%
|
||||
local is_rollback_pending, rollback_time_remaining, rollback_session, rollback_token = luci.model.uci:rollback_pending()
|
||||
|
||||
if is_rollback_pending or trigger_apply or trigger_revert then
|
||||
%>
|
||||
<script type="text/javascript">
|
||||
document.addEventListener("luci-loaded", function() {
|
||||
<% if trigger_apply then -%>
|
||||
L.ui.changes.apply(true);
|
||||
<%- elseif trigger_revert then -%>
|
||||
L.ui.changes.revert();
|
||||
<%- else -%>
|
||||
L.ui.changes.confirm(true, Date.now() + <%=rollback_time_remaining%> * 1000, <%=luci.http.write_json(rollback_token)%>);
|
||||
<%- end %>
|
||||
});
|
||||
</script>
|
||||
<%
|
||||
end
|
||||
|
||||
include("themes/" .. theme .. "/footer_login")
|
||||
%>
|
@ -1,38 +0,0 @@
|
||||
<%#
|
||||
Copyright 2008 Steven Barth <steven@midlink.org>
|
||||
Copyright 2008-2019 Jo-Philipp Wich <jo@mein.io>
|
||||
Licensed to the public under the Apache License 2.0.
|
||||
-%>
|
||||
|
||||
<%
|
||||
if not luci.dispatcher.context.template_header_sent then
|
||||
include("themes/" .. theme .. "/header_login")
|
||||
luci.dispatcher.context.template_header_sent = true
|
||||
end
|
||||
|
||||
local applyconf = luci.config and luci.config.apply
|
||||
%>
|
||||
|
||||
<script type="text/javascript" src="<%=resource%>/promis.min.js"></script>
|
||||
<script type="text/javascript" src="<%=resource%>/luci.js"></script>
|
||||
<script type="text/javascript">
|
||||
L = new LuCI(<%= luci.http.write_json({
|
||||
token = token,
|
||||
media = media,
|
||||
resource = resource,
|
||||
scriptname = luci.http.getenv("SCRIPT_NAME"),
|
||||
pathinfo = luci.http.getenv("PATH_INFO"),
|
||||
documentroot = luci.http.getenv("DOCUMENT_ROOT"),
|
||||
requestpath = luci.dispatcher.context.requestpath,
|
||||
dispatchpath = luci.dispatcher.context.path,
|
||||
pollinterval = luci.config.main.pollinterval or 5,
|
||||
ubuspath = luci.config.main.ubuspath or '/ubus/',
|
||||
sessionid = luci.dispatcher.context.authsession,
|
||||
nodespec = luci.dispatcher.context.dispatched,
|
||||
apply_rollback = math.max(applyconf and applyconf.rollback or 90, 90),
|
||||
apply_holdoff = math.max(applyconf and applyconf.holdoff or 4, 1),
|
||||
apply_timeout = math.max(applyconf and applyconf.timeout or 5, 1),
|
||||
apply_display = math.max(applyconf and applyconf.display or 1.5, 1),
|
||||
rollback_token = rollback_token
|
||||
}) %>);
|
||||
</script>
|
@ -1,12 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ "$PKG_UPGRADE" != 1 ]; then
|
||||
uci get luci.themes.Argon >/dev/null 2>&1 || \
|
||||
uci batch <<-EOF
|
||||
set luci.themes.Argon=/luci-static/argon
|
||||
set luci.main.mediaurlbase=/luci-static/argon
|
||||
commit luci
|
||||
EOF
|
||||
fi
|
||||
|
||||
exit 0
|
12
root/etc/uci-defaults/90_luci-theme-argon
Normal file
@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
sed -i ":a;$!N;s/tmpl.render.*sysauth_template.*return/local scope = { duser = default_user, fuser = user }\nlocal ok, res = luci.util.copcall\(luci.template.render_string, [[<% include\(\"themes\/\" .. theme .. \"\/sysauth\"\) %>]], scope\)\nif ok then\nreturn res\nend\nreturn luci.template.render\(\"sysauth\", scope\)/;ba" /usr/lib/lua/luci/dispatcher.lua
|
||||
sed -i ":a;$!N;s/t.render.*sysauth_template.*return/local scope = { duser = h, fuser = a }\nlocal ok, res = luci.util.copcall\(luci.template.render_string, [[<% include\(\"themes\/\" .. theme .. \"\/sysauth\"\) %>]], scope\)\nif ok then\nreturn res\nend\nreturn luci.template.render\(\"sysauth\", scope\)/;ba" /usr/lib/lua/luci/dispatcher.lua
|
||||
[ -f /usr/lib/lua/luci/view/themes/argon/out_header_login.htm ] && mv -f /usr/lib/lua/luci/view/themes/argon/out_header_login.htm /usr/lib/lua/luci/view/header_login.htm
|
||||
rm -Rf /var/luci-modulecache
|
||||
rm -Rf /var/luci-indexcache
|
||||
uci batch <<-EOF
|
||||
set luci.themes.Argon=/luci-static/argon
|
||||
set luci.main.mediaurlbase=/luci-static/argon
|
||||
commit luci
|
||||
EOF
|
||||
exit 0
|