add luci-theme-kucat v1.5.6

This commit is contained in:
Pdboy Sir 2024-03-11 23:17:24 +08:00 committed by GitHub
parent 0f882eaafa
commit 5fb6c5b695
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
27 changed files with 6001 additions and 0 deletions

27
luci-theme-kucat/Makefile Normal file
View File

@ -0,0 +1,27 @@
#
# Copyright (C) 2019-2024 The Sirpdboy Team <herboy2008@gmail.com>
#
# This is free software, licensed under the Apache License, Version 2.0 .
#
include $(TOPDIR)/rules.mk
THEME_NAME:=kucat
THEME_TITLE:=Kucat Theme
PKG_NAME:=luci-theme-$(THEME_NAME)
LUCI_TITLE:=Kucat Theme by sirpdboy
LUCI_DEPENDS:=
PKG_VERSION:=1.5.6
PKG_RELEASE:=20240305
define Package/luci-theme-$(THEME_NAME)/postinst
#!/bin/sh
rm -Rf /var/luci-modulecache
rm -Rf /var/luci-indexcache
exit 0
endef
include $(TOPDIR)/feeds/luci/luci.mk
# call BuildPackage - OpenWrt buildroot signature

View File

@ -0,0 +1,784 @@
/*
* luci-theme-kucat
* Copyright (C) 2019-2024 The Sirpdboy Team <herboy2008@gmail.com>
*
* Have a bug? Please create an issue here on GitHub!
* https://github.com/sirpdboy/luci-theme-kucat/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>
*
* luci-theme-material:
* https://github.com/LuttyYang/luci-theme-material/
* luci-theme-argon:
* https://github.com/jerrykuku/luci-theme-argon
* luci-theme-opentopd:
* https://github.com/sirpdboy/luci-theme-opentopd
*
* Licensed to the public under the Apache License 2.0
*/
body {
font-family: "Microsoft Yahei", "Google Sans", "WenQuanYi Micro Hei", "sans-serif", "Helvetica Neue", "Helvetica", "Hiragino Sans GB"!important
}
body {
color: #98a6ad;
}
*::-webkit-scrollbar {
background: transparent
}
*::-webkit-scrollbar-thumb {
background: #666;
height: 10px;
border-radius: 5px
}
*::-webkit-scrollbar-thumb:hover {
background-color: #bbb
}
*::-webkit-scrollbar-track {
background: transparent
}
::selection {
background-color: #374564!important;
color: #ccc;
}
a:link,
a:visited,
a:active {
color: #d0d7de;
}
a {
color: #d0d7de;
}
header.bar-primary .container-bar-right,
header.bar-primary .container-bar-left {
background-color: rgba(var(--primary-rgbm), 1);
box-shadow: 0 0.5rem 1rem rgba(255, 255, 255, 0.15);
transition: all .2s ease;
transition: 0.3s ease-in-out
}
header.bar-primary .container-bar-right .labelbar:hover::before,
header.bar-primary .container-bar-left .labelbar:hover::before {
color: #d0d7de;
}
header.bar-primary .container-bar-left .pdboy-closebar:before {
color: #d0d7de
}
header.bar-primary .container-bar-right .pdboy-openbar:before {
color: #d0d7de
}
header.bar-primary .container-bar-left .pdboy-gohome:before {
color: #d0d7de
}
header.bar-primary .container-bar-left .pdboy-gossr:before {
color: #d0d7de
}
header.bar-primary .container-bar-left .pdboy-gonet:before {
color: #d0d7de
}
header.bar-primary .container-bar-left .pdboy-gouser:before {
color: #d0d7de
}
header.bar-primary .container-bar-left .pdboy-gocontrol:before {
color: #d0d7de
}
header.bar-primary .container-bar-left .pdboy-goadvanced:before {
color: #d0d7de
}
#detail-bubble>div {
border: 1px solid rgba(255,255,255,0.3);
border-radius: 3px;
padding: 1px;
background-color: rgba(var(--primary-rgbbody), 1)!important;
}
#detail-bubble .head .dismiss {
color: #8391a2;
}
#bubble-arrow {
border: 1px solid rgba(255,255,255,0.3);
background-color: rgba(var(--primary-rgbbody), 1);
}
header.bg-primary {
box-shadow: 0 0.5rem 1rem rgba(255, 255, 255, 0.35);
}
.uci_change_indicator.label.notice,
.pd-primary .fill .container .flex1 .showSide,
.pd-primary .fill .container .flex1 .brand,
.showWord::after,
.showWord::before ,
header>.fill>.container>.showWord ,
.showWord {
color: #e9eff3
}
header>.fill>.container>.brand {
font-family: "Microsoft Yahei", "Google Sans", "WenQuanYi Micro Hei", "sans-serif", "Helvetica Neue", "Helvetica", "Hiragino Sans GB";
color: #e9eff3;
}
.pull-right a,
.pull-right span a {
color: #bbb;
}
.pull-right a:hover,
.pull-right span a:hover {
background-color: rgba(255, 255, 255, 0.2);
color: #f8f8f8;
}
.pdboy-status_on::before {
color: #e9eff3
}
.showSide {
color: #e9eff3;
}
.notice {
color: #bbb
}
.label {
color: #bbb;
}
footer {
color: #bbb;
}
footer a {
color: #bbb;
}
.main .main-left {
-webkit-box-shadow: rgb(250 250 250 / 75%) 0 0 15px -5px;
box-shadow: 2px 2px 8px #666,-2px -2px 8px #bbb;
}
.main .main-left::-webkit-scrollbar-thumb {
height: 8px;
background: #555;
border-radius: 5px
}
.main .main-left::-webkit-scrollbar-thumb:hover,
.main .main-left::-webkit-scrollbar-thumb:active {
background: #bbb;
border: none
}
.main .main-left .nav li.slide .menu {
color: #bbb
}
.main .main-left .nav .slide .menu:after,
.main .main-left .nav li.slide .menu::after {
color: #bbb;
}
.main .main-left .nav li.slide .menu:hover a::after,
.main .main-left .nav li.slide .menu.active a::after {
color: #bbb;
}
.main>.main-left>.nav>.slide>.menu.active::before,
.main .main-left .nav li.slide .menu:hover::after,
.main .main-left .nav li.slide .menu.active::after {
color: #e9eff3
}
.main .main-left .nav>li>a:hover,
.main .main-left .nav>li>a.active,
.main .main-left .nav li.slide .menu:hover,
.main .main-left .nav li.slide .menu.active {
background-color: rgba(255, 255, 255, 0.2);
color: #e9eff3 !important;
}
.main .main-left .nav li.slide .menu:hover a,
.main .main-left .nav li.slide .menu.active a {
color: #e9eff3
}
.main .main-left .nav li.slide .menu:hover::before,
.main .main-left .nav li.slide .menu.active::before {
color: #e9eff3
}
.main .main-left .nav li.slide .slide-menu li a {
color: #bbb;
}
.main .main-left .nav .slide .slide-menu .active a {
color: #e9eff3;
}
.main .main-left .nav .slide .slide-menu > li.active {
color: #e9eff3;
background-color: rgba(255, 255, 255, 0.2);
border-left: 4px solid #fd8c73
}
.main .main-left .nav .slide .slide-menu li:hover {
background-color: rgba(255, 255, 255, 0.2);
}
.main .main-left .nav .slide .slide-menu li:active a {
color: #e9eff3
}
.main .main-left .nav .slide .slide-menu li:hover a {
color: #e9eff3;
}
.main .main-left .sidenav-header .brand {
font-family: "Microsoft Yahei",-apple-system, "WenQuanYi Micro Hei", "sans-serif";
color: #ccc;
}
.main .main-right #maincontent .container>div:nth-child(1).alert-message.warning>a {
color: #ccc;
}
.main .main-left .nav>li>a:first-child,
.main .main-left .nav li.slide .menu::before,
.main .main-left .nav>li>a:first-child::before,
.main .main-left .nav .slide .menu::before {
color: #bbb
}
select,
input {
font-family: "Microsoft Yahei", "WenQuanYi Micro Hei", "sans-serif", "Helvetica Neue", "Helvetica", "Hiragino Sans GB";
}
input[type="checkbox"] {
background: rgba(255,255,255,0.1);
}
input:checked[type="checkbox"]:before {
transform: rotate(45deg);
width: 12px;
margin-left: 5px;
border-color: #f5f5f5;
border-width: 3px;
border-top-color: transparent;
border-left-color: transparent;
border-radius: 0
}
.cbi-input-radio:checked {
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: rgba(255,255,255,0.7) !important;
background-size: 70%;
background-repeat: no-repeat;
background-position: center
}
select:not([multiple="multiple"]):focus, input:not(.cbi-button):focus, .cbi-dropdown:focus {
background-color: rgba(255,255,255,0.18);
box-shadow: 0 0.5rem 1rem rgba(255,255,255, 0.35);
-webkit-box-shadow: 0 0 6px rgba(255,255,255, 0.35);
-moz-box-shadow: 0 0 6px rgba(255,255,255, 0.35);
}
.btn, button, select, input, .cbi-dropdown,.item::after {
color: #d0d7de;
border: 1px solid rgba(255,255,255,0.12)!important;
box-shadow: 0 0.5rem 1rem rgba(255, 255, 255, 0.12)!important;
}
.btn, .cbi-button, .item::after {
color: #eee;
}
.cbi-input-textarea,
textarea {
color: #8391a2;
background-color: rgba(255,255,255,0.1);
border: 1px solid rgba(255,255,255,0.12)!important;
box-shadow: 0 0.5rem 1rem rgba(255, 255, 255, 0.12)!important;
}
#diag-rc-output>pre {
color: #bbb
}
#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-main-login .main .main-right #maincontent .alert-message p {
color: #eee;
font-weight: normal;
}
.node-main-login .errorbox {
color: #eee !important;
}
.table {
color: #8391a2;
}
.table-titles .th {
color: #8391a2
}
button:hover,
.btn:hover,
.cbi-button:hover,
.item:hover::after {
box-shadow: 0 0.5rem 1rem rgba(255,255,255, 0.35);
-webkit-box-shadow: 0 0 6px rgba(255,255,255, 0.35);
-moz-box-shadow: 0 0 6px rgba(255,255,255, 0.35);
}
.btn:active ,
.cbi-button:active ,
button:active,
.item:hover::after {
box-shadow: 0 0.5rem 1rem rgba(255,255,255, 0.15);
-webkit-box-shadow: 0 0 6px rgba(255,255,255, 0.15);
-moz-box-shadow: 0 0 6px rgba(255,255,255, 0.15);
}
fieldset[id^="cbi-apply-"] {
box-shadow: 0 2px 2px 0 rgba(255, 255, 255, 0.14), 0 3px 1px -2px rgba(255, 255, 255, 0.32), 0 1px 5px 0 rgba(255, 255, 255, 0.2);
}
.cbi-section>h3:first-child,
.panel-title {
color: #bbb
}
table>tbody>tr>td,
table>tbody>tr>th,
table>tfoot>tr>td,
table>tfoot>tr>th,
table>thead>tr>td,
table>thead>tr>th,
.table>.tbody>.tr>.td,
.table>.tbody>.tr>.th,
.table>.tfoot>.tr>.td,
.table>.tfoot>.tr>.th,
.table>.thead>.tr>.td,
.table>.thead>.tr>.th {
color: #8391a2
}
.cbi-tabcontainer>.cbi-value:nth-of-type(4n+2):hover,.cbi-map>.cbi-section .cbi-value:nth-of-type(4n+2):hover,fieldset>table>tbody>tr:nth-of-type(4n+2):hover,table>tbody>tr:nth-of-type(4n+2):hover,div>.table>.tr:nth-of-type(4n+2):hover {
background-color: rgba(250,250,250,0.05);
}
.cbi-tabcontainer>.cbi-value:nth-of-type(2n+1):hover,.cbi-map>.cbi-section .cbi-value:nth-of-type(2n+1):hover,fieldset>table>tbody>tr:nth-of-type(2n+1):hover,table>tbody>tr:nth-of-type(2n+1):hover,div>.table>.tr:nth-of-type(2n+1):hover {
background-color: rgba(250,250,250,0.05);
}
.cbi-tabcontainer>.cbi-value:nth-of-type(4n):hover,.cbi-map>.cbi-section .cbi-value:nth-of-type(4n):hover,fieldset>table>tbody>tr:nth-of-type(4n):hover,table>tbody>tr:nth-of-type(4n):hover,div>.table>.tr:nth-of-type(4n):hover {
background-color: rgba(250,250,250,0.05);
}
.cbi-rowstyle-2 .cbi-button-up, .cbi-rowstyle-2 .cbi-button-down, body:not(.Interfaces) .cbi-rowstyle-2:first-child {
background-color: rgba(0,0,0,0, 0.2) !important;
}
.cbi-rowstyle-1 .cbi-button-up, .cbi-rowstyle-1 .cbi-button-down, body:not(.Interfaces) .cbi-rowstyle-1:first-child {
background-color: rgba(0,0,0,0, 0.1) !important;
}
.status-bar {
font-size: var(--font-x);
color: #8391a2 !important;
background-color: rgba(var(--primary-rgbbody), 0.9)
}
.success {
color: #ddd;
}
.danger {
color: #ddd;
}
.errorbox {
color: #ccc;
}
h2 {
color: #bbb
}
h3 {
color: #bbb;
}
.panel-title {
color: #bbb;
}
.tabs {
margin: 1rem;
color: #b4c9e3;
}
.tabs::-webkit-scrollbar-thumb {
background-color: #555
}
.tabs::-webkit-scrollbar-track {
background: transparent
}
.tabs>li {
background: #343a40;
box-shadow: 0 0.5rem 1rem rgba(255, 255, 255, 0.15);
}
.tabs li[class~="active"] {
border-right: 0.18751rem solid #fd8c73;
border-left: 0.18751rem solid #fd8c73;
box-shadow: 0 0.5rem 1rem rgba(255, 255, 255, 0.15);
background-color: rgba(255, 255, 255, 0.2);
}
.tabs li[class~="hover"] {
background-color: rgba(255, 255, 255, 0.2);
}
.tabs li:hover {
box-shadow: 0 0.5rem 1rem rgba(255, 255, 255, 0.35);
background-color: rgba(255, 255, 255, 0.2);
}
.tabs li[class~="active"] a {
color: #bbb
}
.tabs li:hover a {
color: #bbb
}
.tabs li a {
color: #8391a2
}
.cbi-tabmenu {
color: #8391a2;
}
.cbi-tabmenu::-webkit-scrollbar {
width: 5px;
height: 5px;
}
.cbi-tabmenu::-webkit-scrollbar-thumb {
background-color: #555;
}
.cbi-tabmenu li {
background: #343a40;
font-size: 1rem;
border-radius: 0.25rem;
box-shadow: 0 0.5rem 1rem rgba(255, 255, 255, 0.15);
}
.cbi-tabmenu li a {
color: ##8391a2;
}
.cbi-tabmenu li:hover {
color: #bbb;
box-shadow: 0 0.5rem 1rem rgba(255, 255, 255, 0.35);
background-color: rgba(255, 255, 255, 0.2);
}
.cbi-tabmenu li:hover a {
color: #bbb
}
.cbi-tabmenu li[class~="cbi-tab"] {
border-right: 0.18751rem solid #fd8c73;
border-left: 0.18751rem solid #fd8c73;
box-shadow: 0 0.5rem 1rem rgba(255, 255, 255, 0.15);
background-color: rgba(255, 255, 255, 0.2);
}
.cbi-tabmenu li[class~="cbi-tab"] a {
color: #bbb
}
.cbi-tab-descr {
color: #8391a2;
}
.cbi-dropdown>.open {
background: #333
}
.cbi-dropdown>.more,
.cbi-dropdown>ul>li[placeholder] {
text-shadow: 1px 1px 0 #ccc;
}
.cbi-dropdown[open]>ul.dropdown {
background: #ccc;
}
.cbi-dropdown[open]>ul.dropdown>li[selected] {
background-color: #8391a2;
color: #fff;
}
.cbi-progressbar {
color: #8391a2;
}
.cbi-value-title {
color: #8391a2;
}
.cbi-section-descr {
color: #8391a2
}
.cbi-map-descr {
color: #8391a2;
}
#content_syslog{
box-shadow: 0 0 1px rgba(255, 255, 255, 0.12);
}
#syslog {
color: #8391a2;
font-family: monospace;
background-color: rgba(0,0,0,0.1);
}
.request>.requestBody,
.response .markdown-body,
.markdown-body {
color: #8391a2!important;
background-color: rgba(255,255,255,0)!important;
}
.bottom_wrapper .message_input_wrapper .message_input_text{
background-color: rgba(255,255,255,0.35)!important;
color: #d0d7de!important;
}
#chatlog .response .markdown-body>pre {
background-color: rgba(0,0,0,0.15)!important;
}
#chatlog .response {
background-color: rgba(255,255,255,0.03)!important;
}
.ifacebox-head {
color: #8391a2
}
.zonebadge {
color: #8391a2;
}
.zonebadge strong {
color: #8391a2
}
.Reboot>.main>.main-right #maincontent .container p {
color: #8391a2;
}
.node-services-vssr .block h4 {
color: #8391a2
}
.node-services-vssr .status-bar {
color: #8391a2;
box-shadow: 0 0 .5rem 0 rgba(0, 0, 0, 0.35);
background-color: rgba(0, 0, 0, 0.1) !important;
}
.node-services-vssr .block,
.node-services-shadowsocksr>.block,
.node-services-ssrpro>.block,
.block,
.node-services-bypass>.main .block,
.node-services-vssr>.main .block,
.main .block {
color: #8391a2;
background-color: rgba(255, 255, 255, 0.08) !important;
}
.node-services-shadowsocksr>.block:active,
.node-services-ssrpro>.block:active,
.block:active,
.node-services-bypass>.main .block:active,
.main .block:active,
.node-services-shadowsocksr>.block:hover,
.node-services-ssrpro>.block:hover,
.block:hover,
.node-services-bypass>.main .block:hover,
.main .block:hover {
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 4px 6px rgba(0, 0, 0, 0.35);
background-color: rgba(250, 250, 250, 0.1)
}
/* log */
#cbi-openclash .CodeMirror.cm-s-idea.CodeMirror-wrap {
background: rgba(0,0,0,0.1)!important;
color: #adbcc9!important;
}
/* set modi file */
#cbi-openclash .cm-s-material.CodeMirror
{
background-color: #1b4c53!important;
color: #31b9c1!important;
}
/* card */
#cbi-openclash .card
{
background: linear-gradient(#337ab7, #a8bfcf)!important;
box-shadow: 0 8px 16px -8px rgba(255,255,255,0.5)!important;
}
.node-services-adguardhome>.main .cbi-value .cbi-input-textarea {
box-shadow: 0 0 1px rgba(255, 255, 255, 0.3)!important;
}
.Software >.main table tr td:nth-last-child(1) ,
.node-system-packages>.main table tr td:nth-last-child(1) {
color: #8391a2
}
.node-system-packages>.main .cbi-value>pre {
background-color: rgba(0, 0, 0, 0.22) ;
}
.Software >.main .cbi-section-node:first-child .cbi-value-last>div,
.node-system-packages>.main .cbi-section-node:first-child .cbi-value-last>div {
border-color: rgba(255, 255, 255, 0.3) !important;
background-color: rgba(255, 255, 255,0.22) !important;
}
.node-system-packages>.main .cbi-section-node:first-child .cbi-value-last>div>div {
background-color: rgba(var(--primary-rgbm), 1)!important;
}
.cbi-section {
box-shadow: 0px 1px 0px rgba(255, 255, 255, 0.08);
}
.cbi-section em {
color: #8391a2;
}
.node-status-realtime table>tbody>tr>td,
.node-status-realtime table>tfoot>tr>td,
.node-status-realtime table>thead>tr>td {
color: #8391a2;
border-bottom: 1px solid rgba(255,255,255,0.3);
}
.cbi-dynlist > .item > span
{
color: #aaa;
}
.cbi-dropdown[open]>ul.dropdown {
background-color: rgba(var(--primary-rgbbody), 1);
}
.ifacebox {
color: #bbb;
}
.ifacebadge {
background-color: #797d7f;
color: #bbb;
}
.cbi-dropdown > .open,
.cbi-dropdown > .more {
background-color: rgba(255,255,255,0)!important;
}
@media screen and (max-width:992px) {
.main .main-left {
-webkit-box-shadow: rgba(250 250 250, 0.75) 0 0 20px -5px;
box-shadow: rgba(250 250 250, 0.75) 0 0 20px -5px;
}
.showSide:hover {
background-color: rgba(255, 255, 255, 0.2);
}
table>tbody>tr>td,
table>tfoot>tr>td,
table>thead>tr>td {
color: #8391a2;
}
}

View File

@ -0,0 +1,265 @@
/*
* luci-theme-kucat
* Copyright (C) 2019-2024 The Sirpdboy Team <herboy2008@gmail.com>
*
* Have a bug? Please create an issue here on GitHub!
* https://github.com/sirpdboy/luci-theme-kucat/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>
*
* luci-theme-material:
* https://github.com/LuttyYang/luci-theme-material/
* luci-theme-argon:
* https://github.com/jerrykuku/luci-theme-argon
* luci-theme-opentopd:
* https://github.com/sirpdboy/luci-theme-opentopd
*
* Licensed to the public under the Apache License 2.0
*/
@font-face {
font-family: 'kucat';
src: url('../fonts/kucat.eot?9qz8zf');
src: url('../fonts/kucat.eot?9qz8zf#iefix') format('embedded-opentype'),
url('../fonts/kucat.ttf?9qz8zf') format('truetype'),
url('../fonts/kucat.woff?9qz8zf') format('woff'),
url('../fonts/kucat.svg?9qz8zf#kucat') format('svg');
font-weight: normal;
font-style: normal;
font-display: block;
}
[class^="icon-"], [class*=" icon-"] {
/* use !important to prevent issues with browser extensions that change fonts */
font-family: 'kucat' !important;
speak: never;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
/* Better Font Rendering =========== */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-brightness_low:before {
content: "\e926";
}
.icon-brightness_4:before {
content: "\e92e";
}
.icon-sync_disabled:before {
content: "\e932";
}
.icon-sync_problem:before {
content: "\e933";
}
.icon-power_settings_new:before {
content: "\e934";
}
.icon-logout:before {
content: "\e935";
}
.icon-menu_open:before {
content: "\e92f";
}
.icon-menu_open1:before {
content: "\e930";
}
.icon-published_with_changes:before {
content: "\e936";
}
.icon-update_disabled:before {
content: "\e937";
}
.icon-arrow-left:before {
content: "\e938";
}
.icon-arrow-right:before {
content: "\e939";
}
.icon-chevrons-right:before {
content: "\e931";
}
.icon-download:before {
content: "\e904";
}
.icon-eye:before {
content: "\e92b";
}
.icon-eye-off:before {
content: "\e92c";
}
.icon-fast-forward:before {
content: "\e93a";
}
.icon-gitlab:before {
content: "\e93d";
}
.icon-heart:before {
content: "\e927";
}
.icon-key:before {
content: "\e93b";
}
.icon-message-square:before {
content: "\e91f";
}
.icon-more-horizontal:before {
content: "\e928";
}
.icon-navigation-2:before {
content: "\e93e";
}
.icon-rewind:before {
content: "\e921";
}
.icon-save:before {
content: "\e923";
}
.icon-slash:before {
content: "\e92d";
}
.icon-thumbs-up:before {
content: "\e924";
}
.icon-twitch:before {
content: "\e925";
}
.icon-unlock:before {
content: "\e93c";
}
.icon-upload-cloud:before {
content: "\e929";
}
.icon-user-plus:before {
content: "\e92a";
}
.icon-airplay:before {
content: "\e900";
}
.icon-align-justify:before {
content: "\e922";
}
.icon-archive:before {
content: "\e901";
}
.icon-box:before {
content: "\e902";
}
.icon-chevron-down:before {
content: "\e20b";
}
.icon-chevron-right:before {
content: "\e920";
}
.icon-chevron-up:before {
content: "\e20a";
}
.icon-chevrons-left:before {
content: "\e903";
}
.icon-clock:before {
content: "\e905";
}
.icon-codesandbox:before {
content: "\e906";
}
.icon-database:before {
content: "\e907";
}
.icon-download-cloud:before {
content: "\e908";
}
.icon-gift:before {
content: "\e909";
}
.icon-globe:before {
content: "\e90a";
}
.icon-grid:before {
content: "\e90b";
}
.icon-help-circle:before {
content: "\f059";
}
.icon-home:before {
content: "\e90c";
}
.icon-layers:before {
content: "\e90d";
}
.icon-lock:before {
content: "\e90e";
}
.icon-log-out:before {
content: "\e90f";
}
.icon-menu:before {
content: "\e20e";
}
.icon-minus-circle:before {
content: "\e910";
}
.icon-monitor:before {
content: "\e911";
}
.icon-moon:before {
content: "\e912";
}
.icon-pie-chart:before {
content: "\e913";
}
.icon-plus-circle:before {
content: "\e914";
}
.icon-power:before {
content: "\e915";
}
.icon-refresh-cw:before {
content: "\e916";
}
.icon-send:before {
content: "\e917";
}
.icon-server:before {
content: "\e918";
}
.icon-settings:before {
content: "\e919";
}
.icon-sliders:before {
content: "\e91a";
}
.icon-sun:before {
content: "\e91b";
}
.icon-tool:before {
content: "\e91c";
}
.icon-user:before {
content: "\e91d";
}
.icon-wifi:before {
content: "\e91e";
}
.icon-spinner3:before {
content: "\e602";
}
.icon-spinner6:before {
content: "\e603";
}
.icon-github:before {
content: "\eab0";
}
.icon-appleinc:before {
content: "\eabe";
}
.icon-eye1:before {
content: "\e9ce";
}

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 790 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,157 @@
/**
* luci-theme-kucat
* Copyright (C) 2024 The Sirpdboy Team <herboy2008@gmail.com>
*
* Have a bug? Please create an issue here on GitHub!
* https://github.com/sirpdboy/luci-theme-kucat/issues
*
* luci-theme-argon
* Copyright 2023 Jerrykuku <jerrykuku@qq.com>
*
* luci-theme-material:
* Copyright 2015 Lutty Yang
*
* luci-theme-bootstrap:
* Copyright 2008 Steven Barth <steven@midlink.org>
* Copyright 2008-2016 Jo-Philipp Wich <jow@openwrt.org>
* Copyright 2012 David Menting <david@nut-bolt.nl>
* MUI:
* https://github.com/muicss/mui
*
* Licensed to the public under the Apache License 2.0
*/
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;
const urlReg = new RegExp(nodeUrl + "$")
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 (urlReg.test(href)) {
ulNode.click();
ulNode.next(".slide-menu").stop(true, true);
lastNode = that.parent();
lastNode.addClass("active");
ret = true;
return true;
}
});
});
return ret;
}
$(".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
}
});
/**
* 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);
}
/**
* 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
});
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;
}
}

View File

@ -0,0 +1,145 @@
/*
* luci-theme-kucat
* Copyright (C) 2019-2024 The Sirpdboy Team <herboy2008@gmail.com>
*
* Have a bug? Please create an issue here on GitHub!
* https://github.com/sirpdboy/luci-theme-kucat/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>
*
* luci-theme-material:
* https://github.com/LuttyYang/luci-theme-material/
* luci-theme-argon:
* https://github.com/jerrykuku/luci-theme-argon
* luci-theme-opentopd:
* https://github.com/sirpdboy/luci-theme-opentopd
*
* 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, " ");
}
// define what element should be observed by the observer
// and what types of mutations trigger the callback
const observer = new MutationObserver(() => {
console.log("callback that runs when observer is triggered");
});
if ($("#cbi-dhcp-lan-ignore").length > 0) {
observer.observe(document.getElementById("cbi-dhcp-lan-ignore"), {
subtree: true,
attributes: true
});
}
$(".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;
}
});
}
});
/**
* 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");
})(jQuery);
function pdopenbar() {
document.getElementById("header-bar-left").style.width = "300px";
document.getElementById("header-bar-left").style.display = "block";
document.getElementById("header-bar-right").style.width = "0";
document.getElementById("header-bar-right").style.display = "none"
}
function pdclosebar() {
document.getElementById("header-bar-left").style.display = "none";
document.getElementById("header-bar-left").style.width = "0";
document.getElementById("header-bar-right").style.display = "block";
document.getElementById("header-bar-right").style.width = "50px"
}
/**
* 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("17rem");
$(".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;
}
});

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -0,0 +1,10 @@
<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg">
<g>
<title>Layer 1</title>
<path d="m51.5,53.8a6.6,6.6 0 1 0 0,13.2a6.6,6.6 0 0 0 0,-13.2m-40.5,-33.9l7,6.8a47.5,47.5 0 0 1 67.2,0l7,-6.8a57.2,57.2 0 0 0 -81.2,0" fill="#00ace2" id="svg_2"/>
<path d="m23.5,32.2l6.8,7a30,30 0 0 1 42.6,0l6.8,-7a39.7,39.7 0 0 0 -56.3,0" fill="#00ace2" id="svg_3"/>
<path d="m35.8,44.6l6.8,6.9a12.6,12.6 0 0 1 18,0l6.8,-6.9a22.3,22.3 0 0 0 -31.6,0" fill="#00ace2" id="svg_4"/>
<path d="m75.9,40.7a30.2,30.2 0 1 1 -48.7,0l-6.9,-7a39.9,39.9 0 1 0 62.5,0l-6.9,7z" fill="#002B49" id="svg_5"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 609 B

View File

@ -0,0 +1,22 @@
{
"name":"Kucat",
"short_name":"Kucat",
"description":"Kucat for OpenWRT by sirpdboy.",
"start_url":"/",
"scope": "/",
"orientation":"portrait",
"prompt_message":"fast read Kucat",
"icons":[
{
"src":"img/apple-touch-icon.png",
"sizes":"144x144",
"type":"image/png"
},
{
"src":"logo.png",
"sizes":"192x192",
"type":"image/png"
}
],
"display":"standalone"
}

View File

@ -0,0 +1,42 @@
<%#
Copyright (C) 2019-2024 The Sirpdboy Team <herboy2008@gmail.com>
luci-theme-material:
Copyright 2015 Lutty Yang <lutty@wcan.in>
Licensed to the public under the Apache License 2.0
-%>
<%
local ver = require "luci.version"
local disp = require "luci.dispatcher"
local request = disp.context.path
local category = request[1]
local tree = disp.node()
local categories = disp.node_childs(tree)
%>
</div>
<footer class="mobile-hide">
<a class="luci-link" href="https://github.com/openwrt/luci" target="_blank">Powered by <%= ver.luciname %>
(<%= ver.luciversion %>)</a> /
<a href="https://github.com/sirpdboy/luci-theme-kucat" target="_blank">KuCatTheme <%# 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 %>
</footer>
</div>
</div>
<script src="<%=media%>/js/styles-kucat.js<%# ?v=PKG_VERSION %>"></script>
</body>
</html>

View File

@ -0,0 +1,463 @@
<%#
Copyright (C) 2019-2024 The Sirpdboy Team <herboy2008@gmail.com>
luci-theme-material:
Copyright 2015 Lutty Yang <lutty@wcan.in>
luci-theme-bootstrap:
Copyright 2008 Steven Barth <steven@midlink.org>
Copyright 2008 Jo-Philipp Wich <jow@openwrt.org>
Copyright 2012 David Menting <david@nut-bolt.nl>
MUI:
https://github.com/muicss/mui
Licensed to the public under the Apache License 2.0
-%>
<%
local sys = require "luci.sys"
local util = require "luci.util"
local http = require "luci.http"
local disp = require "luci.dispatcher"
local json = require "luci.jsonc"
local fs = require "nixio.fs"
local nutil = require "nixio.util"
local uci = require 'luci.model.uci'.cursor()
local urlencode
if luci.http.protocol and luci.http.protocol.urlencode then
urlencode = luci.http.protocol.urlencode
else
urlencode = luci.util.urlencode
end
local boardinfo = util.ubus("system", "board")
local request = disp.context.path
local request2 = disp.context.request
local category = request[1]
local cattree = category and disp.node(category)
local leaf = request2[#request2]
local tree = disp.node()
local node = disp.context.dispatched
local categories = disp.node_childs(tree)
local c = tree
local i, r
function glob(...)
local iter, code, msg = fs.glob(...)
if iter then
return nutil.consume(iter)
else
return nil, code, msg
end
end
function getExtension(str)
return urlencode(str:match(".+%.(%w+)$"))
end
-- tag all nodes leading to this page
for i, r in ipairs(request) do
if c.nodes and c.nodes[r] then
c = c.nodes[r]
c._menu_selected = true
end
end
-- send as HTML5
http.prepare_content("text/html")
local function nodeurl(prefix, name, query)
local u = url(prefix, name)
if query then
u = u .. http.build_querystring(query)
end
return pcdata(u)
end
local function render_tabmenu(prefix, node, level)
if not level then
level = 1
end
local childs = disp.node_childs(node)
if #childs > 0 then
if level > 2 then
write('<ul class="tabs">')
end
local selected_node
local selected_name
local i, v
for i, v in ipairs(childs) do
local nnode = node.nodes[v]
if nnode._menu_selected then
selected_node = nnode
selected_name = v
end
if level > 2 then
write('<li class="tabmenu-item-%s %s"><a href="%s">%s</a></li>' %{
v, (nnode._menu_selected or (node.leaf and v == leaf)) and 'active' or '',
nodeurl(prefix, v, nnode.query),
striptags(translate(nnode.title))
})
end
end
if level > 2 then
write('</ul>')
end
if selected_node then
render_tabmenu(prefix .. "/" .. selected_name, selected_node, level + 1)
end
end
end
local function render_submenu(prefix, node)
local childs = disp.node_childs(node)
if #childs > 0 then
write('<ul class="slide-menu">')
for i, r in ipairs(childs) do
local nnode = node.nodes[r]
local title = pcdata(striptags(translate(nnode.title)))
write('<li><a data-title="%s" href="%s">%s</a></li>' %{
title,
nodeurl(prefix, r, nnode.query),
title
})
end
write('</ul>')
end
end
local function render_topmenu()
local childs = disp.node_childs(cattree)
if #childs > 0 then
write('<ul class="nav">')
for i, r in ipairs(childs) do
local nnode = cattree.nodes[r]
local grandchildren = disp.node_childs(nnode)
if #grandchildren > 0 then
local title = pcdata(striptags(translate(nnode.title)))
local en_title = pcdata(striptags(string.gsub(nnode.title," ","_")))
write('<li class="slide"><a class="menu" data-title="%s" href="#">%s</a>' %{
en_title,
title
})
render_submenu(category .. "/" .. r, nnode)
write('</li>')
else
local title = pcdata(striptags(translate(nnode.title)))
local en_title = pcdata(striptags(nnode.title))
write('<li class="slide"><a class="menu exit" data-title="%s" href="%s">%s</a></li>' %{
en_title,
nodeurl(category, r, nnode.query),
title
})
end
end
write('</ul>')
end
end
local function render_changes()
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
local bar='/cgi-bin/luci/admin/'
local bk_use='rgba(var(--primary-rgbbody),1)'
local loginbk_use = 'background: linear-gradient(0deg, rgba(var(--primary-rgbm), 1) 0%, rgba(var(--primary-rgbbody), 1) 100%)'
if fs.access('/etc/config/advancedplus') then
kucat = 'advancedplus'
elseif fs.access('/etc/config/kucat') then
kucat = 'kucat'
end
if (kucat and kucat ~= '') then
local config = uci:get_all(kucat, "@basic[0]")
primary_rgbbody,primary_rgbm,primary_rgbm_ts,primary_opacity,primary_rgbs,primary_rgbs_ts,mode = config.primary_rgbbody,config.primary_rgbm,config.primary_rgbm_ts,config.primary_opacity,config.primary_rgbs,config.primary_rgbs_ts,config.mode
gohome,gouser,gossr = bar .. "status/" .. config.gohome,bar .. "system/" .. config.gouser,bar .. "services/" .. config.gossr
background,bkuse,bklock,fontd,fontz,fontx = config.background,config.bkuse,config.bklock,config.font_d,config.font_z,config.font_x
bgqs,setbar,dayword = config.bgqs,config.setbar,config.dayword
else
primary_rgbbody,primary_rgbm,primary_rgbm_ts,primary_opacity,primary_rgbs,primary_rgbs_ts,mode = '248,248,248','45,102,147','0.8','0','132,188,218','0.1','light'
gohome,gouser,gossr = bar .. "status/" ,bar .. "system/" ,bar .. "services/"
background,bkuse,bklock,fontd,fontz,fontx = '0','0','1','1.2rem' ,'0.92rem' ,'0.875rem'
bgqs,setbar,dayword = '1','1','0'
end
local ufilter = string.format("blur(%dpx)", tonumber(primary_opacity))
if primary_opacity == '0' then
ufilter = 'none'
end
local bgqs_image = '-webkit-linear-gradient(135deg, rgba(255, 255, 255, 0.1) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.1) 75%, transparent 75%, transparent)'
if bgqs == '1' then
bgqs_image = 'none'
end
local bg_url = media..'/img/bg1.jpg'
if background == '0' then
math.randomseed(os.time())
local theme_dir = resource .. '/background/'
if not fs.access('/www' .. resource .. '/background/') then
local theme_dir = media .. '/background/'
end
local bgcount = 0
local currentBg = {}
local bgs,attr = {}
for i, f in ipairs(glob("/www" .. theme_dir .. "*")) do
attr = fs.stat(f)
if attr then
local ext = getExtension(fs.basename(f))
if ext == "jpg" or ext == "png" or ext == "gif" then
local bg = {}
bg.type = ext
bg.url = theme_dir .. fs.basename(f)
table.insert(bgs,bg)
bgcount = bgcount + 1
end
end
end
if bgcount > 0 then
currentBg = bgs[math.random(1,bgcount)]
picurl = currentBg.url
end
else
picurl = sys.exec("/usr/libexec/kucat/kucat_wallpaper")
end
if (picurl and picurl ~= '') then
bg_url = picurl
end
local bg_lock = bg_url
if bklock == '0' then
math.randomseed(os.time())
local bk_dir = media .. "/bg/"
local bkcount = 0
local currentbk = {}
local bgs,attr = {}
for i, f in ipairs(glob("/www" .. bk_dir .. "*")) do
attr = fs.stat(f)
if attr then
local ext = getExtension(fs.basename(f))
if ext == "jpg" or ext == "png" or ext == "gif" then
local bg = {}
bg.type = ext
bg.url = bk_dir .. fs.basename(f)
table.insert(bgs,bg)
bkcount = bkcount + 1
end
end
end
if bkcount > 0 then
currentbk = bgs[math.random(1,bkcount)]
bg_lock = currentbk.url
end
end
if dayword == '1' then
showword = sys.exec("/usr/libexec/kucat/kucat_word")
end
if bkuse == '1' then
bk_use='background:url('..bg_lock..') no-repeat center center fixed'
loginbk_use = "background:url(" .. bg_url .. ") no-repeat center center fixed"
end
-%>
<!DOCTYPE html>
<html lang="<%=luci.i18n.context.lang%>">
<head>
<meta charset="utf-8">
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
<link rel="manifest" href="<%=media%>/manifest.json" crossorigin="use-credentials">
<title> <%=striptags( (boardinfo.hostname or "?") .. ( (node and node.title) and ' - ' .. translate(node.title) or '')) %> - LuCI</title>
<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="theme-color" media="(prefers-color-scheme: light)" content="white">
<meta name="theme-color" media="(prefers-color-scheme: dark)" content="black">
<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="144x144" href="<%=media%>/img/apple-touch-icon.png">
<link rel="apple-touch-icon-precomposed" href="<%=media%>/img/apple-touch-icon.png" sizes="144x144">
<link rel="icon" type="image/png" sizes="192x192" href="<%=media%>/logo.png">
<meta name="msapplication-TileColor" content="<%=bar_color%>">
<meta name="msapplication-TileImage" content="<%=media%>/logo.png"/>
<meta name="theme-color" content="<%=bar_color%>">
<link rel="shortcut icon" href="<%=media%>/favicon.ico" type="image/x-icon">
<link rel="icon" href="<%=media%>/logo.png" type="image/png">
<link rel="icon" href="<%=media%>/logo.svg" sizes="any">
<link rel="stylesheet" href="<%=media%>/css/style.css?v=<%=math.random(1,100000)%>">
<style title="text/css">
:root {
--primary-rgbbody:<%=primary_rgbbody%>;
--primary-rgbm: <%=primary_rgbm%>;
--primary-rgbm-ts: <%=primary_rgbm_ts%>;
--primary-rgbs: <%=primary_rgbs%>;
--primary-rgbs-ts: <%=primary_rgbs_ts%>;
--font-d: <%=fontd%>;
--font-z: <%=fontz%>;
--font-x: <%=fontx%>;
--ufilter: <%=ufilter%>;
--bgqs-image: <%=bgqs_image%>;
}
img[src*="/luci-static/resources/cbi/add.gif"] {
background-image: url(<%=media%>/img/add.png);
}
img[src*="/luci-static/resources/cbi/remove.gif"] {
background-image: url(<%=media%>/img/del.png);
}
img[src*="/luci-static/resources/cbi/reload.gif"] {
background-image: url(<%=media%>/img/reload.png);
}
<% if setbar == "1" then %>
header.bar-primary .container-bar-left {
width: 300px;
display: block;
}
header.bar-primary .container-bar-right {
width: 0;
display: none;
}
<% else %>
header.bar-primary .container-bar-left {
width: 0;
display: none;
}
header.bar-primary .container-bar-right {
width: 50px;
display: block;
}
<% end -%>
</style>
<% 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=3.5.1"></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%> " style="<%=bk_use%>;"
<% if mode ~= 'auto' then %>
data-theme = "<%= mode %>"
<% end -%>
>
<% if mode == 'auto' then %>
<script>
function setTheme() {
let color_scheme = window.matchMedia('(prefers-color-scheme: dark)');
document.body.setAttribute('data-theme', color_scheme.matches? 'dark': 'light');
}
setTheme();
window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', setTheme);
</script>
<% end -%>
<header class="bar-primary">
<div id="header-bar-left" class="container-bar-left">
<a class="labelbar pdboy-closebar" href="javascript:void(0)" onclick="pdclosebar()" title="Close" ></a>
<a class="labelbar pdboy-gohome" href="<%=gohome%>" title="<%=Status%>"></a>
<a class="labelbar pdboy-goadvanced" href="<%=gouser%>" title="<%=System%>"></a>
<a class="labelbar pdboy-gossr" href="<%=gossr%>" title="<%=Services%>"></a>
<a class="labelbar pdboy-gonet" href="<%=url("admin/network/network")%>" title="<%:Network%>"></a>
<a class="labelbar pdboy-gopoweroff" href="<%=url("admin/system/reboot")%>" title="<%:Reboot%>"></a>
</div>
<div id="header-bar-right" class="container-bar-right">
<a class="labelbar pdboy-openbar" href="javascript:void(0)" title="Open" onclick="pdopenbar()"></a>
</div>
</header>
<div class="main">
<div style="" class="loading">
</div>
<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="pd-primary">
<div class="fill">
<div class="container">
<div class="flex1">
<a class="showSide" title="<%:Menu%>" ></a>
<a class="brand" href="#"><%=striptags(boardinfo.hostname or "OpenWrt")%></a>
</div>
<% if dayword == '1' then %>
<a class="showWord" href="#"><%=showword%></a>
<% end -%>
<% render_changes() %>
<span id="xhr_poll_status" style="display:none" onclick="XHR.running() ? XHR.halt() : XHR.run()">
<a class="pdboy-status_on" id="xhr_poll_status_on" title="Disable Refresh"></a>
<a class="pdboy-status_off" id="xhr_poll_status_off" style="display:none" title="Enable Refresh"></a>
</span>
<span > <a class="pdboy-qlogout" href="<%=url("admin/logout")%>" title="<%:Logout%>" > </a></span>
</div>
</div>
</header>
<div class="darkMask"></div>
<div class="login-bg" style="<%=loginbk_use%>"></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 %>
<script>
var luciLocation = <%= luci.http.write_json(luci.dispatcher.context.path) %>;
</script>
<script src="<%=media%>/js/menu-kucat.js<%# ?v=PKG_VERSION %>"></script>

View File

@ -0,0 +1,37 @@
#!/bin/sh
if [ "$PKG_UPGRADE" != 1 ]; then
uci get luci.themes.KuCat >/dev/null 2>&1 || \
uci batch <<-EOF
set luci.themes.KuCat=/luci-static/kucat
set luci.main.mediaurlbase=/luci-static/kucat
commit luci
EOF
fi
chmod +x /usr/libexec/kucat/kucat*
if [ ! -s "/etc/config/advancedplus" ];then
[ ! -s "/etc/config/kucat" ] && {
cat <<-EOF >/etc/config/kucat
config basic
option gossr ''
option gouser ''
option gohome ''
option bklock '1'
option fontmode '0'
option font_d '1.1rem'
option font_z '0.92rem'
option font_x '0.875rem'
option background '0'
option setbar '1'
option bkuse '0'
option mode 'auto'
option primary_rgbm_ts '0.8'
option primary_opacity '0'
option primary_rgbm '26,131,97'
option primary_rgbs '76,157,69'
option primary_rgbs_ts '0.2'
option primary_rgbbody '248,248,248'
EOF
}
fi
rm -rf /tmp/luci-*
exit 0

View File

@ -0,0 +1,71 @@
#!/bin/sh
# luci-theme-kucat
# Copyright (C) 2019-2024 The Sirpdboy Team <herboy2008@gmail.com>
#
# Have a bug? Please create an issue here on GitHub!
# https://github.com/sirpdboy/luci-theme-kucat/issues
#
# Licensed to the public under the Apache License 2.0
# author github@sirpdboy
kucat='kucat'
[ -s "/etc/config/advancedplus" ] && kucat='advancedplus'
background="$(uci -q get $kucat.@basic[0].background || echo '0')"
KUCATTMP="/var/kucat_date_${background}.tmp"
BGURL="/www/luci-static/kucat/img/down${background}.jpg"
REBGURL="/luci-static/kucat/img/down${background}.jpg"
DFBGURL="/luci-static/kucat/img/bg1.jpg"
LOCK="/var/lock/kucat_lock_${background}.lock"
curl_bgurl() {
case "$background" in
1)
local ppath=`curl -s 'https://open.iciba.com/dsapi/' | jsonfilter -qe '@.picture4'`
[ -n "${ppath}" ] && echo "$ppath"
;;
2)
local ppath="$(curl -s "https://source.unsplash.com/1920x1080/daily?wallpapers" 2>&1 |grep -Eo "photo-\w+-\w+" | head -n1)"
[ -n "${ppath}" ] && echo "https://images.unsplash.com/${ppath}?fm=jpg&fit=crop&w=1920&h=1080"
;;
3)
local ppath=`curl -s "https://www.bing.com/HPImageArchive.aspx?format=js&n=1" |jsonfilter -qe '@.images[0].url'`
[ -n "${ppath}" ] && echo "https://www.bing.com${ppath}"
;;
4)
local i=`awk 'BEGIN{srand();print int(rand()*8)}'`
local j=`awk 'BEGIN{srand();print int(rand()*200)}'`
local ppath=`curl -s "http://wp.birdpaper.com.cn/intf/search?content=4k&pageno=$j&count=9" | awk -F '\"count\":9' '{print $2}' | awk -F ',\"processTime\"' '{print $1}' | sed 's#,#{#' | jsonfilter -e "@.list[$i].url"`
[ -n "${ppath}" ] && echo "$ppath"
;;
esac
}
bgurl_down() {
local bgurl="$(curl_bgurl)"
if [ -n "$bgurl" ]; then
rm -rf $BGURL
curl -kLfsm 3 $bgurl -o $BGURL
date +%Y%m%d > $KUCATTMP
fi
[ -s "$BGURL" ] && echo -ne $REBGURL || echo -ne $DFBGURL
}
check_url() {
if [ -s $KUCATTMP ]; then
localtime=`cat $KUCATTMP | grep $(date +%Y%m%d) `
if [ $localtime ]; then
if [ -s $BGURL ] ; then
echo -ne $REBGURL
return
fi
fi
fi
checknet=`ping -c 1 -W 1 223.5.5.5 > /dev/null 2>&1 &&echo 1 || echo 2`
if [ "x$checknet" == "x1" ]; then
bgurl_down
else
[ -s "$DFBGURL" ] && echo -ne $DFBGURL
fi
}
check_url

View File

@ -0,0 +1,96 @@
#!/bin/sh
# luci-theme-kucat
# Copyright (C) 2019-2024 The Sirpdboy Team <herboy2008@gmail.com>
#
# Have a bug? Please create an issue here on GitHub!
# https://github.com/sirpdboy/luci-theme-kucat/issues
#
# Licensed to the public under the Apache License 2.0
LANG=`uci get luci.main.lang`
WORDDATETMP="/var/dayword_kucatword_date.tmp"
LOCK="/var/lock/dayword_kucatword.lock"
WORDTMP="/var/dayword_kucatword_$LANG.tmp"
test_url() {
url=$1
status="$(/usr/bin/curl -I -o /dev/null -skL --connect-timeout 1 --retry 1 -w %{http_code} "$url")"
case "$status" in
204|\
200)
echo '1'
;;
esac
}
get_word() {
kucat='kucat'
[ -s "/etc/config/advancedplus" ] &&kucat='advancedplus'
dayword="$(uci -q get $kucat.@basic[0].dayword || echo '0')"
case "$dayword" in
1)
[ "X$LANG" == "Xen" ] && gwordjson=`curl -s 'https://open.iciba.com/dsapi/' | jsonfilter -qe '@.content'` || gwordjson=`curl -s 'https://open.iciba.com/dsapi/' | jsonfilter -qe '@.note'`
[ -n "${gwordjson}" ] && echo "$gwordjson"
;;
2)
# form iciba : https://api.vvhan.com/api/en
[ "X$LANG" == "Xen" ] && gwordjson=`curl -s 'https://api.vvhan.com/api/en?type=sj'| jsonfilter -qe '@.data.zh'` || gwordjson=`curl -s 'https://api.vvhan.com/api/en?type=sj'| jsonfilter -qe '@.data.en'`
[ -n "${gwordjson}" ] && echo "$gwordjson"
;;
3)
local gwordjson=`curl -s 'https://api.yixiangzhilv.com/yiyan/sentence/get/'`
local gword=`echo $gwordjson | jsonfilter -qe '@.content'`
local gfrom=`echo $gwordjson | jsonfilter -qe '@.author'`
[ -n "${gfrom}" ] && gfrom=$(echo " ---- $gfrom")|| gfrom=''
[ -n "${gword}" ] && echo "$gword $gfrom"
;;
4)
local gwordjson=`curl -s 'https://yijuzhan.com/api/word.php?m=json'`
local gword=`echo $gwordjson | jsonfilter -qe '@.content'`
local gfrom=`echo $gwordjson | jsonfilter -qe '@.source'`
[ -n "${gfrom}" ] && gfrom=$(echo " ---- $gfrom")|| gfrom=''
[ -n "${gword}" ] && echo "$gword $gfrom"
;;
5)
local gword=`curl -s https://v.api.aa1.cn/api/api-wenan-dujitang/index.php?aa1=json | sed 's/\[//g' | sed 's/\]//g'| jsonfilter -qe '@.dujitang'`
[ -n "${gword}" ] && echo "$gword"
;;
*)
local gwordjson=`curl -s 'https://v1.hitokoto.cn'`
local gword=`echo $gwordjson | jsonfilter -qe '@.hitokoto'`
local gfrom=`echo $gwordjson | jsonfilter -qe '@.from_who'`
[ -n "${gfrom}" ] && gfrom=$(echo " ---- $gfrom")|| gfrom=''
[ -n "${gword}" ] && echo "$gword $gfrom"
;;
esac
}
kucatword() {
lock="$LOCK"
exec 200>"$lock"
if flock -n 200 >"/dev/null" 2>&1; then
local localword="$(get_word)"
if [ -n "$localword" ]; then
echo "$localword" >$WORDTMP
date +%Y%m%d > $WORDDATETMP
fi
flock -u 200 >"/dev/null" 2>&1
fi
[ -s "$WORDTMP" ] && cat $WORDTMP || echo -ne "Acquisition failed ,Please Issues:github@sirpdboy"
}
check_url() {
if [ -f "$WORDDATETMP" ]; then
localtime=`cat $WORDDATETMP | grep $(date +%Y%m%d) `
if [ $localtime ]; then
[ -s "$WORDTMP" ] && cat $WORDTMP && return
fi
fi
local checknet=`ping -c 1 -W 1 223.5.5.5 > /dev/null 2>&1 &&echo 1 || echo 2`
if [ "x$checknet" == "x1" ]; then
kucatword
else
echo -ne "No internet connection, no information."
fi
}
check_url