luci-theme-argon: bump to v1.7.0

This commit is contained in:
Teaffanie 2020-09-11 20:15:48 +08:00
parent 119e6f2a89
commit 16eba04fa0
9 changed files with 155 additions and 4406 deletions

View File

@ -8,8 +8,8 @@ include $(TOPDIR)/rules.mk
LUCI_TITLE:=Argon Theme
LUCI_DEPENDS:=
PKG_VERSION:=1.6.9
PKG_RELEASE:=20200821
PKG_VERSION:=1.7.0
PKG_RELEASE:=20200909
include $(TOPDIR)/feeds/luci/luci.mk

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,3 +1,4 @@
// compress: true
/**
* Argon is a clean HTML5 theme for LuCI. It is based on luci-theme-material and Argon Template
*
@ -40,7 +41,7 @@
:root {
--primary: #5e72e4;
--dark-primary: #5065d8;
--dark-primary: #483d8b;
--white: #fff;
--darker: black;
--default: #525461;
@ -71,10 +72,7 @@
--danger: #f5365c;
--light: #adb5bd;
--dark: #212529;
--neutral: #fff;
--login-form-bg-color: rgba(244, 245, 247, 0.8);
--breakpoint-xs: 0;
--breakpoint-sm: 576px;
@ -360,17 +358,14 @@ li {
border-image: initial;
padding: 10px 0px;
margin: 30px 0px 100px;
transition: all 0.3s;
transition: all 0.3s !important;
letter-spacing: 0.8rem;
&:hover,
:focus {
background-color: #5065d8 !important;
background-color: var(--dark-primary) !important;
opacity: 0.9;
}
}
}
footer {
@ -385,7 +380,8 @@ li {
z-index: 10;
color: #525461;
color: var(--default);
position: relative;
position: absolute;
bottom: 0;
.ftc{
position: absolute;
bottom: 30px;
@ -667,6 +663,7 @@ footer {
left: 0.8rem;
content: "\e915";
color: #5e72e4;
color: var(--primary);
}
&::after {
@ -696,6 +693,7 @@ footer {
cursor: pointer;
color: #fff;
background: #5e72e4;
background: var(--primary);
a {
color: #000;
@ -728,6 +726,7 @@ footer {
.menu[data-title=Status]:before {
content: "\e906";
color: #5e72e4;
color: var(--primary);
}
.menu[data-title=System]:before {
@ -773,6 +772,7 @@ footer {
.menu[data-title=Control]:before {
content: "\e912";
color: #5e72e4;
color: var(--primary);
}
.menu[data-title=Asterisk]:before {
@ -806,6 +806,7 @@ footer {
left: 0;
bottom: 0;
background-color: #5e72e4;
background-color: var(--primary);
transition: all 0.2s;
}
@ -902,6 +903,7 @@ footer {
text-align: center;
margin-top: 2rem;
color: #5e72e4;
color: var(--primary);
font-size: 2rem;
.loading-img {
@ -1008,7 +1010,9 @@ form.inline+form.inline,
color: #fff !important;
background-color: #5e72e4 !important;
background-color: var(--primary) !important;
border-color: #5e72e4 !important;
border-color: var(--primary) !important;
}
.cbi-button-add {
@ -1179,8 +1183,10 @@ input[type="checkbox"] {
input[type="checkbox"]:checked {
border: 1px solid #5e72e4;
border: 1px solid var(--primary);
background-image: url('data:image/svg+xml,%3csvg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 8 8\'%3e%3cpath fill=\'%23fff\' d=\'M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z\'/%3e%3c/svg%3e') !important;
background-color: #5e72e4;
background-color: var(--primary);
background-size: 70%;
background-repeat: no-repeat;
background-position: center;
@ -1206,8 +1212,10 @@ ul li .cbi-input-checkbox {
.cbi-input-radio:checked {
border: 1px solid #5e72e4;
border: 1px solid var(--primary);
background-image: url('data:image/svg+xml,%3csvg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'-4 -4 8 8\'%3e%3ccircle r=\'3\' fill=\'%23fff\'/%3e%3c/svg%3e') !important;
background-color: #5e72e4;
background-color: var(--primary);
background-size: 70%;
background-repeat: no-repeat;
background-position: center;
@ -1351,6 +1359,7 @@ small {
padding: 0.2rem 0.6rem;
font-size: 1.2rem;
color: #5e72e4 !important;
color: var(--primary) !important;
}
.cbi-optionals {
@ -1476,6 +1485,7 @@ input[name="nslookup"] {
#memtotal>div>div {
height: 100% !important;
background-color: #5e72e4 !important;
background-color: var(--primary) !important;
}
/* fix multiple table */
@ -1924,6 +1934,7 @@ input {
select:not([multiple="multiple"]):focus,
input:focus {
border-color: #5e72e4;
border-color: var(--primary);
outline: 0;
background-color: #fff;
box-shadow: 0 3px 9px rgba(50, 50, 9, 0), 3px 4px 8px rgba(94, 114, 228, .1);
@ -2091,6 +2102,7 @@ div>.table>.tbody>.tr:nth-of-type(2n) {
.notice {
background-color: #5e72e4 !important;
background-color: var(--primary) !important;
color: #fff !important;
}
@ -2337,13 +2349,16 @@ td>table>tbody>tr>td {
li:hover {
cursor: pointer;
border-bottom: 0.18751rem solid #5e72e4;
border-bottom: 0.18751rem solid var(--primary);
color: #5e72e4;
color: var(--primary);
background-color: #dce1fe;
margin-bottom: 0;
border-radius: 0;
a {
color: #5e72e4;
color: var(--primary);
}
}
@ -2361,6 +2376,7 @@ td>table>tbody>tr>td {
&:hover {
border-bottom: 0.18751rem solid #5e72e4;
border-bottom: 0.18751rem solid var(--primary);
}
}
}
@ -2403,7 +2419,9 @@ td>table>tbody>tr>td {
&:hover {
cursor: pointer;
border-bottom: 0.18751rem solid #5e72e4;
border-bottom: 0.18751rem solid var(--primary);
color: #5e72e4;
color: var(--primary);
background-color: #dce1fe;
margin-bottom: 0;
@ -2415,12 +2433,14 @@ td>table>tbody>tr>td {
li[class~="cbi-tab"] {
border-bottom: 0.18751rem solid #5e72e4;
color: #5e72e4;
border-bottom: 0.18751rem solid var(--primary);
color: var(--primary);
background-color: #dce1fe;
margin-bottom: 0;
a {
color: #5e72e4;
color: var(--primary);
}
}
}
@ -2537,12 +2557,14 @@ td>table>tbody>tr>td {
.cbi-dropdown[open] {
position: relative;
border-color: #5e72e4;
border-color: var(--primary);
}
.cbi-dropdown[open]>ul.dropdown {
display: block;
background: #fff;
border-color: #5e72e4;
border-color: var(--primary);
position: absolute;
z-index: 1000;
max-width: none;
@ -2929,6 +2951,7 @@ td>.ifacebadge,
.ifacebox-head.active {
background: #5e72e4;
background: var(--primary);
color: #fff;
}
@ -3151,6 +3174,7 @@ input[name="nslookup"] {
div {
border-right: 0 !important;
background-color: #5e72e4 !important;
background-color: var(--primary) !important;
}
}
@ -3696,570 +3720,4 @@ input[name="nslookup"] {
}
}
}
}
@media (prefers-color-scheme: dark) {
body {
background: #1e1e1e;
color: #cccccc;
}
.login-page .login-container {
.login-form {
background-color: #1e1e1e;
.brand {
color: #adb5bd;
}
.form-login {
.input-group {
&::before {
color: #adb5bd;
}
input {
background-color: transparent !important;
color: #adb5bd;
border-bottom: #adb5bd 1px solid !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-image: linear-gradient(-135deg, #6c61ab 0%, #594ca9 100%);
&:hover,
&:focus {
background-image: linear-gradient(-135deg, rgb(85, 76, 138) 0%, rgb(72, 61, 139) 100%);
}
}
}
}
footer {
color: #adb5bd;
}
}
header::after {
background-color: #1e1e1e !important;
}
.main {
.main-left {
background-color: #333333 !important;
box-shadow: 0 0 0.5rem 0 rgba(0, 0, 0, .15);
.sidenav-header .brand {
color: #ccc;
}
.nav {
.slide {
.slide-menu {
.active {
a {
color: #cccccc;
&::after {
background-color: #cccccc !important;
}
}
}
li {
a {
color: #cccccc;
}
a:hover {
background: none !important;
}
}
}
.menu.active {
background-color: darkslateblue !important;
color: #cccccc !important;
a::after {
background-color: #cccccc !important;
}
}
}
li {
a {
color: #cccccc !important;
}
a:hover {
background-color: darkslateblue !important;
color: #cccccc !important;
}
}
}
&::-webkit-scrollbar-thumb {
background-color: #252526 !important;
}
&::-webkit-scrollbar-track {
background-color: #333;
}
}
.main-right {
background-color: #1e1e1e;
}
}
h2 {
color: #ccc;
background: #333333;
}
h3 {
color: #ccc;
border-bottom: 0;
background: #333333;
}
a:-webkit-any-link {
color: -webkit-link;
cursor: pointer;
color: darkslateblue;
}
input:-webkit-autofill {
background-color: #3c3c3c !important;
}
.cbi-value-field .cbi-input-apply,
.cbi-button-apply,
.cbi-button-edit {
color: #fff !important;
background-color: darkslateblue !important;
border-color: darkslateblue !important;
}
.cbi-section em {
color: darkslateblue;
}
header.bg-primary {
background-color: #1e1e1e !important;
}
.cbi-map-descr {
color: #ccc;
}
.cbi-section {
background: none;
box-shadow: 0 0 0.5rem 0 rgba(0, 0, 0, .35)
}
.panel-title {
color: #ccc;
background-color: #333333;
border-bottom: 0px;
}
table>tbody>tr>td,
table>tfoot>tr>td,
table>thead>tr>td {
color: #ccc;
}
fieldset>table>tbody>tr:nth-of-type(2n) {
background-color: #252526;
}
table>tbody>tr>td,
table>tfoot>tr>td,
table>thead>tr>td {
border-top: 1px solid #252526;
}
#swaptotal>div>div,
#swapfree>div>div,
#memfree>div>div,
#membuff>div>div,
#conns>div>div,
#memtotal>div>div {
background-color: #32325d !important;
}
#swaptotal>div>div>div>small,
#swapfree>div>div>div>small,
#memfree>div>div>div>small,
#membuff>div>div>div>small,
#conns>div>div>div>small,
#memtotal>div>div>div>small {
color: #ccc !important;
}
.node-system-packages>.main .cbi-section-node:first-child .cbi-value-last {
line-height: 1.8em;
div[style="margin:3px 0; width:300px; height:10px; border:1px solid #000000; background-color:#80C080"] {
border: 1px solid #999999 !important;
background-color: transparent !important;
div {
background-color: #32325d !important;
}
}
}
table>tbody>tr>th,
table>tfoot>tr>th,
table>thead>tr>th {
background-color: #252526;
border-bottom: black 1px solid !important;
}
.cbi-rowstyle-2 {
background-color: #1e1e1e;
}
.cbi-rowstyle-1 {
background-color: #252526;
}
.cbi-section>h3:first-child,
.panel-title {
color: #ccc;
border-bottom: 0;
}
.cbi-section-table .cbi-section-table-titles .cbi-section-table-cell {
background-color: #1e1e1f;
}
.cbi-button {
color: #ccc;
background-color: #252526;
}
.cbi-section-node {
background: none;
border-radius: 0 0 .375rem .375rem;
padding: 0rem;
}
abbr {
color: #5e72e4;
}
div>table>tbody>tr:nth-of-type(2n),
div>.table>.tbody>.tr:nth-of-type(2n) {
background-color: #252526;
}
#content_syslog {
box-shadow: 0 0 0.5rem 0 rgba(0, 0, 0, .35)
}
#syslog {
color: #ccc;
background-color: #1e1e1e;
}
#iwsvg,
#iwsvg2,
#bwsvg {
overflow: hidden;
box-shadow: 0 0 0.5rem 0 rgba(0, 0, 0, .35);
background-color: #1e1e1e !important;
}
.tabs {
background-color: #252526;
}
.tabs>li[class~="active"]>a {
color: #ccc;
}
.tabs>li[class~="active"],
.tabs>li:hover {
border-bottom: 0.18751rem solid darkslateblue;
color: #ccc;
background-color: #181819;
}
.cbi-tabmenu>li>a,
.tabs>li>a {
color: #ccc;
&:hover {
color: #ccc;
}
}
.cbi-tabmenu>li {
background: #2d2d2d;
}
.cbi-tabmenu {
border-bottom: 0px solid #ddd !important;
}
.cbi-tabmenu li[class~="cbi-tab"] a {
color: #ccc;
}
.cbi-tabmenu>li:hover {
color: #ccc;
background: #2d2d2d;
}
.cbi-tabmenu>li[class~="cbi-tab"] {
background-color: #181819;
}
.cbi-tabcontainer>.cbi-value:nth-of-type(2n) {
background-color: #252526;
}
.cbi-value-title {
color: #ccc;
}
select,
input {
color: #ccc;
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: darkslateblue !important;
background-color: transparent;
outline: 0;
box-shadow: none;
}
select {
background-color: #1e1e1e !important;
}
#cbi-dropbear h2,
#cbi-dropbear .cbi-map-descr,
#cbi-dropbear .cbi-map-descr abbr,
#cbi-rc h2,
#cbi-rc .cbi-map-descr,
#cbi-distfeedconf h2,
#cbi-distfeedconf .cbi-map-descr,
#cbi-customfeedconf h2,
#cbi-customfeedconf .cbi-map-descr,
#cbi-download h2,
#cbi-filelist h2 {
color: #ccc !important;
}
.cbi-value-field>ul>li .ifacebadge {
background-color: #3c3c3c;
}
.cbi-section-descr {
color: #ccc;
}
.cbi-input-textarea {
background-color: #1e1e1e;
color: #ccc;
}
.cbi-section-remove:nth-of-type(2n),
.cbi-section-node:nth-of-type(2n) {
background-color: #1e1e1e;
}
.node-system-packages>.main table tr td:nth-last-child(1) {
color: #ccc;
}
.cbi-section-node .cbi-value {
padding: 1rem 1rem 0.3rem 1rem;
}
.ifacebox {
background-color: none;
border: 1px solid #1e1e1e;
}
.ifacebox-head {
color: #666;
}
.ifacebox-body {
background-color: #333;
}
.zonebadge strong {
color: #333;
}
.zonebadge>.ifacebadge {
background-color: #3c3c3c;
}
div.cbi-value var,
td.cbi-value-field var {
color: #5e72e4;
}
#diag-rc-output>pre {
color: #ccc;
background-color: #1e1e1e;
}
.node-services-vssr .block {
background-color: #3c3c3c !important;
box-shadow: 0 0 0.5rem 0 rgba(0, 0, 0, .35);
}
.node-services-vssr .block h4 {
color: #ccc !important;
}
.node-services-vssr .status-bar {
color: #ccc;
box-shadow: 0 0 0.5rem 0 rgba(0, 0, 0, .35);
background-color: #1e1e1e;
}
.node-services-vssr .cbi-section-table-row {
color: #ccc;
background-color: #3c3c3c !important;
box-shadow: 0 0 5px 0 rgba(0, 0, 0, .35)
}
.node-services-vssr .cbi-section-table-row.fast {
background: darkslateblue !important;
color: #fff;
}
.node-services-vssr .ssr-button {
color: #ccc;
}
.node-services-vssr .incon:nth-child(2) {
border-right: #1e1e1e 1px solid;
}
#xhr_poll_status>.label.success {
color: #ccc !important;
background-color: darkolivegreen !important;
}
.notice {
background-color: darkslateblue !important;
}
.cbi-input-find,
.cbi-input-save,
.cbi-button-add,
.cbi-button-save,
.cbi-button-find,
.cbi-input-reload,
.cbi-button-reload {
background-color: darkseagreen !important;
border-color: darkseagreen !important;
}
.cbi-button-reset,
.cbi-input-remove {
color: #fff !important;
background-color: darkorange !important;
border-color: darkorange !important;
}
.cbi-page-actions .cbi-button-apply,
.cbi-section-actions .cbi-button-edit,
.cbi-button-edit.important,
.cbi-button-apply.important,
.cbi-button-reload.important,
.cbi-button-action.important {
border: 1px darkslateblue solid !important;
}
fieldset[id^="cbi-apply-"] {
background-color: #333333;
}
#detail-bubble>div {
border: 1px solid #ccc;
border-radius: 2px;
padding: 5px;
background: #252525;
}
.cbi-section-error {
color: darkorange;
}
@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));
}
}
}
@media (prefers-color-scheme: dark) 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);
}
}

View File

@ -1,3 +1,4 @@
// compress: true
/**
* Argon is a clean HTML5 theme for LuCI. It is based on luci-theme-material and Argon Template
*
@ -63,16 +64,14 @@ body {
border-right: none !important;
}
}
}
.cbi-button-apply {
background-image: linear-gradient(-135deg, #6c61ab 0%, #594ca9 100%);
background-color: #483d8b !important;
background-color: var(--dark-primary) !important;
&:hover,
&:focus {
background-image: linear-gradient(-135deg, rgb(85, 76, 138) 0%, rgb(72, 61, 139) 100%);
opacity: 0.9;
}
}
}
@ -126,7 +125,8 @@ header::after {
}
.menu.active {
background-color: darkslateblue !important;
background-color: #483d8b !important;
background-color: var(--dark-primary) !important;
color: #cccccc !important;
a::after {
@ -141,7 +141,8 @@ header::after {
}
a:hover {
background-color: darkslateblue !important;
background-color: #483d8b !important;
background-color: var(--dark-primary) !important;
color: #cccccc !important;
@ -178,7 +179,8 @@ h3 {
a:-webkit-any-link {
color: -webkit-link;
cursor: pointer;
color: darkslateblue;
color: #483d8b;
color: var(--dark-primary);
}
@ -190,13 +192,16 @@ input:-webkit-autofill {
.cbi-button-apply,
.cbi-button-edit {
color: #fff !important;
background-color: darkslateblue !important;
border-color: darkslateblue !important;
background-color: #483d8b !important;
background-color: var(--dark-primary) !important;
border-color: #483d8b !important;
border-color: var(--dark-primary) !important;
}
.cbi-section em {
color: darkslateblue;
color: #483d8b;
color: var(--dark-primary);
}
@ -310,7 +315,8 @@ table>thead>tr>th {
}
abbr {
color: #5e72e4;
color: #483d8b;
color: var(--dark-primary);
}
@ -346,7 +352,8 @@ div>.table>.tbody>.tr:nth-of-type(2n) {
.tabs>li[class~="active"],
.tabs>li:hover {
border-bottom: 0.18751rem solid darkslateblue;
border-bottom: 0.18751rem solid #483d8b;
border-bottom: 0.18751rem solid var(--dark-primary);
color: #ccc;
background-color: #181819;
}
@ -399,7 +406,8 @@ input {
select:not([multiple="multiple"]):focus,
input:focus {
border-color: darkslateblue !important;
border-color: #483d8b !important;
border-color: var(--dark-primary) !important;
background-color: transparent;
outline: 0;
box-shadow: none;
@ -445,7 +453,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 {
@ -475,7 +485,8 @@ select {
div.cbi-value var,
td.cbi-value-field var {
color: #5e72e4;
color: #483d8b;
color: var(--dark-primary);
}
#diag-rc-output>pre {
@ -505,7 +516,8 @@ td.cbi-value-field var {
}
.node-services-vssr .cbi-section-table-row.fast {
background: darkslateblue !important;
background: #483d8b !important;
background: var(--dark-primary) !important;
color: #fff;
}
@ -529,7 +541,8 @@ td.cbi-value-field var {
}
.notice {
background-color: darkslateblue !important;
background-color: #483d8b !important;
background-color: var(--dark-primary) !important;
}
.cbi-input-find,
@ -556,7 +569,8 @@ td.cbi-value-field var {
.cbi-button-apply.important,
.cbi-button-reload.important,
.cbi-button-action.important {
border: 1px darkslateblue solid !important;
border: 1px #483d8b solid !important;
border: 1px var(--dark-primary) solid !important;
}

View File

@ -26,8 +26,9 @@
local util = require "luci.util"
local http = require "luci.http"
local disp = require "luci.dispatcher"
local fs = require "nixio.fs"
local fs = require "nixio.fs"
local nutil = require "nixio.util"
local uci = require 'luci.model.uci'.cursor()
local boardinfo = util.ubus("system", "board")
@ -185,6 +186,24 @@
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%>">
@ -203,7 +222,7 @@
<meta name="x5-page-mode" content="app">
<meta name="browsermode" content="application">
<meta name="msapplication-tap-highlight" content="no">
<meta name="msapplication-TileColor" content="#5e72e4">
<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">
@ -215,13 +234,29 @@
<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="#5e72e4">
<meta name="msapplication-TileColor" content="<%=bar_color%>">
<meta name="msapplication-TileImage" content="<%=media%>/icon/ms-icon-144x144.png">
<meta name="theme-color" content="#5e72e4">
<meta name="theme-color" content="<%=bar_color%>">
<link rel="stylesheet" href="<%=media%>/css/cascade.css?v=<%=math.random(1,100000)%>">
<% if nixio.fs.access("/etc/dark") then %>
<link rel="stylesheet" href="<%=media%>/css/dark.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%>">

View File

@ -29,7 +29,9 @@
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
@ -48,6 +50,23 @@
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>
@ -66,7 +85,7 @@
<meta name="x5-page-mode" content="app">
<meta name="browsermode" content="application">
<meta name="msapplication-tap-highlight" content="no">
<meta name="msapplication-TileColor" content="#5e72e4">
<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">
@ -79,13 +98,29 @@
<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="#5e72e4">
<meta name="msapplication-TileColor" content="<%=bar_color%>">
<meta name="msapplication-TileImage" content="<%=media%>/icon/ms-icon-144x144.png">
<meta name="theme-color" content="#5e72e4">
<meta name="theme-color" content="<%=bar_color%>">
<link rel="stylesheet" href="<%=media%>/css/cascade.css?v=<%=math.random(1,100000)%>">
<% if nixio.fs.access("/etc/dark") then %>
<link rel="stylesheet" href="<%=media%>/css/dark.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%>">