update 2024-08-02 22:20:19

This commit is contained in:
actions-user 2024-08-02 22:20:19 +08:00
parent 3349b83213
commit 8266e0173c
48 changed files with 6742 additions and 10130 deletions

View File

@ -13,8 +13,6 @@
<br>中文 | [English](README_en.md)
* 仓库里luci-theme-argon 与 luci-app-homeproxy 适配23.05 不适配18.06,切记!
* 把openwrt-packages与small仓库重新归类ssr、passwall、vssr以及依赖合并small
* 喜欢追新的可以去下载small-package该仓库每天自动同步更新

201
luci-theme-argon/LICENSE Normal file
View File

@ -0,0 +1,201 @@
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.

View File

@ -8,20 +8,11 @@ include $(TOPDIR)/rules.mk
LUCI_TITLE:=Argon Theme
LUCI_DEPENDS:=+curl +jsonfilter
PKG_VERSION:=1.8.3
PKG_RELEASE:=20230710
PKG_VERSION:=2.3.1
PKG_RELEASE:=20230420
CONFIG_LUCI_CSSTIDY:=
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

View File

@ -15,7 +15,7 @@
[issues]: https://github.com/jerrykuku/luci-theme-argon/issues/new
[issues-badge]: https://img.shields.io/badge/Issues-welcome-brightgreen.svg?style=flat-square
[release]: https://github.com/jerrykuku/luci-theme-argon/releases
[release-badge]: https://img.shields.io/badge/release-v1.8.3-blue.svg?
[release-badge]: https://img.shields.io/github/v/release/jerrykuku/luci-theme-argon?style=flat-square
[download]: https://github.com/jerrykuku/luci-theme-argon/releases
[download-badge]: https://img.shields.io/github/downloads/jerrykuku/luci-theme-argon/total?style=flat-square
[contact]: https://t.me/jerryk6
@ -26,22 +26,21 @@
[zh-cn-release-log]: /RELEASE_ZH.md
[config-link]: https://github.com/jerrykuku/luci-app-argon-config/releases
[lede]: https://github.com/coolsnowwolf/lede
[official-luci-18.06]: https://github.com/openwrt/luci/tree/openwrt-18.06
[official]: https://github.com/openwrt/openwrt
[immortalwrt]: https://github.com/immortalwrt/immortalwrt
<div align="center">
<img src="https://raw.githubusercontent.com/jerrykuku/staff/master/argon_title4.svg">
# A brand new OpenWrt LuCI theme
### • This branch only matches [Lean's LEDE][lede] / [OpenWrt LuCI 18.06][official-luci-18.06] •
Argon is **a clean and tidy OpenWrt LuCI theme** that allows<br/>
users to customize their login interface with images or videos.
It also supports automatic and manual switching between light and dark modes.
[![license][license-badge]][license]
[![prs][prs-badge]][prs]
[![议题][issues-badge]][issues]
[![issues][issues-badge]][issues]
[![release][release-badge]][release]
[![download][download-badge]][download]
[![contact][contact-badge]][contact]
@ -50,6 +49,8 @@ It also supports automatic and manual switching between light and dark modes.
[简体中文][zh-cn-link]
[Key Features](#key-features) •
[Branch](#branch-introduction) •
[Version History](#version-history) •
[Getting started](#getting-started) •
[Screenshots](#screenshots) •
[Contributors](#contributors) •
@ -68,26 +69,54 @@ It also supports automatic and manual switching between light and dark modes.
- Automatically switch between light and dark modes with the system, and can also be set to a fixed mode.
- Settings plugin with extensions [luci-app-argon-config][config-link]
## Notice
- Chrome & Edge browser is highly recommended. There are some new css3 features used in this theme, currently only Chrome & Edge has the best compatibility.
- FireFox does not enable the backdrop-filter by default, [see here](https://developer.mozilla.org/zh-CN/docs/Web/CSS/backdrop-filter) for the opening method.
## Branch Introduction
There are currently two main branches that are adapted to different versions of the **OpenWrt** source code.
The table below will provide a detailed introduction:
| Branch | Version | Description | Matching source |
| ------ | ------- | ---------------------------------- | --------------------------------------------------------- |
| master | v2.x.x | Support the latest version of LuCI | [Official OpenWrt][official] • [ImmortalWrt][immortalwrt] |
| 18.06 | v1.x.x | Support the 18.06 version of LuCI | [Lean's LEDE][lede] |
## Version History
The latest version is v2.3.1 [Click here][en-us-release-log] to view the full version history record.
## Getting started
### Build for Lean's LEDE project
```bash
cd lede
rm -rf feeds/luci/themes/luci-theme-argon
git clone -b 18.06 https://github.com/jerrykuku/luci-theme-argon.git package/downloads/luci-theme-argon
make menuconfig #choose LuCI->Themes->luci-theme-argon
cd lede/package/lean
rm -rf luci-theme-argon
git clone -b 18.06 https://github.com/jerrykuku/luci-theme-argon.git luci-theme-argon
make menuconfig #choose LUCI->Theme->Luci-theme-argon
make -j1 V=s
```
### Build for OpenWrt official SnapShots and ImmortalWrt
```bash
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
```
### Install for LuCI 18.06 ( Lean's LEDE )
```bash
wget --no-check-certificate https://github.com/jerrykuku/luci-theme-argon/releases/download/v1.8.3/luci-theme-argon_1.8.3-20230710_all.ipk
wget --no-check-certificate https://github.com/jerrykuku/luci-theme-argon/releases/download/v1.8.2/luci-theme-argon_1.8.2-20230609_all.ipk
opkg install luci-theme-argon*.ipk
```
### Install for OpenWrt official SnapShots and ImmortalWrt
```bash
opkg install luci-compat
opkg install luci-lib-ipkg
wget --no-check-certificate https://github.com/jerrykuku/luci-theme-argon/releases/download/v2.3.1/luci-theme-argon_2.3.1_all.ipk
opkg install luci-theme-argon*.ipk
```
@ -98,6 +127,12 @@ wget --no-check-certificate https://github.com/jerrykuku/luci-app-argon-config/r
opkg install luci-app-argon-config*.ipk
```
## Notice
- Chrome browser is highly recommended. There are some new css3 features used in this theme, currently only Chrome has the best compatibility.
- Microsoft has officially retired Internet Explorer, RIP IE🙏<del>Currently, the mainline version of the IE series has bugs that need to be addressed.</del>
- FireFox does not enable the backdrop-filter by default, [see here](https://developer.mozilla.org/zh-CN/docs/Web/CSS/backdrop-filter) for the opening method.
## Screenshots
![desktop](/Screenshots/screenshot_pc.jpg)
@ -106,7 +141,7 @@ opkg install luci-app-argon-config*.ipk
## Contributors
<a href="https://github.com/jerrykuku/luci-theme-argon/graphs/contributors">
<img src="https://contrib.rocks/image?repo=jerrykuku/luci-theme-argon" />
<img src="https://contrib.rocks/image?repo=jerrykuku/luci-theme-argon&v=2" />
</a>
Made with [contrib.rocks](https://contrib.rocks).
@ -114,7 +149,6 @@ Made with [contrib.rocks](https://contrib.rocks).
## Related Projects
- [luci-app-argon-config](https://github.com/jerrykuku/luci-app-argon-config): Argon theme config plugin
- [luci-app-vssr](https://github.com/jerrykuku/luci-app-vssr): An OpenWrt internet surfing plugin
- [openwrt-package](https://github.com/jerrykuku/openwrt-package): My OpenWrt package
- [CasaOS](https://github.com/IceWhaleTech/CasaOS): A simple, easy-to-use, elegant open-source Personal Cloud system (My current main project)

View File

@ -15,7 +15,7 @@
[issues]: https://github.com/jerrykuku/luci-theme-argon/issues/new
[issues-badge]: https://img.shields.io/badge/Issues-welcome-brightgreen.svg?style=flat-square
[release]: https://github.com/jerrykuku/luci-theme-argon/releases
[release-badge]: https://img.shields.io/badge/release-v1.8.3-blue.svg?
[release-badge]: https://img.shields.io/github/v/release/jerrykuku/luci-theme-argon?style=flat-square
[download]: https://github.com/jerrykuku/luci-theme-argon/releases
[download-badge]: https://img.shields.io/github/downloads/jerrykuku/luci-theme-argon/total?style=flat-square
[contact]: https://t.me/jerryk6
@ -26,22 +26,21 @@
[zh-cn-release-log]: /RELEASE_ZH.md
[config-link]: https://github.com/jerrykuku/luci-app-argon-config/releases
[lede]: https://github.com/coolsnowwolf/lede
[official-luci-18.06]: https://github.com/openwrt/luci/tree/openwrt-18.06
[official]: https://github.com/openwrt/openwrt
[immortalwrt]: https://github.com/immortalwrt/immortalwrt
<div align="center">
<img src="https://raw.githubusercontent.com/jerrykuku/staff/master/argon_title4.svg">
# 一个全新的 OpenWrt 主题
### • 该分支只适配 [Lean's LEDE][lede] / [OpenWrt LuCI 18.06][official-luci-18.06] •
Argon 是**一款干净整洁的 OpenWrt LuCI 主题**
允许用户使用图片或视频自定义其登录界面。
它还支持在浅色模式和深色模式之间自动或手动切换。
[![license][license-badge]][license]
[![prs][prs-badge]][prs]
[![议题][issues-badge]][issues]
[![issues][issues-badge]][issues]
[![release][release-badge]][release]
[![download][download-badge]][download]
[![contact][contact-badge]][contact]
@ -50,6 +49,8 @@ Argon 是**一款干净整洁的 OpenWrt LuCI 主题**
**简体中文**
[特色](#特色) •
[分支介绍](#分支介绍) •
[版本历史](#版本历史) •
[快速开始](#快速开始) •
[屏幕截图](#屏幕截图) •
[贡献者](#贡献者) •
@ -68,27 +69,54 @@ Argon 是**一款干净整洁的 OpenWrt LuCI 主题**
- 通过系统自动在明暗模式之间切换,也可设置为固定模式。
- 带有扩展功能的设置插件 [luci-app-argon-config][config-link]
## 注意
## 分支介绍
- 强烈建议使用 Chrome 和 Edge 浏览器。该主题中使用了一些新的 css3 功能,目前只有 Chrome 和 Edge 浏览器有最好的兼容性。
- FireFox 默认不启用 backdrop-filter[见这里](https://developer.mozilla.org/zh-CN/docs/Web/CSS/backdrop-filter)的打开方法。
目前有两个主要的分支,适应于不同版本的**OpenWrt**源代码。
下表为详细的介绍:
| 分支 | 版本 | 介绍 | 匹配源码 |
| ------ | ------ | --------------------------- | ----------------------------------------------------- |
| master | v2.x.x | 支持最新和比较新版本的 LuCI | [官方 OpenWrt][official] • [ImmortalWrt][immortalwrt] |
| 18.06 | v1.x.x | 支持 18.06 版本的 LuCI | [Lean's LEDE][lede] |
## 版本历史
当前最新的版本为 v2.3.1 [点击这里][zh-cn-release-log]查看完整的版本历史日志.
## 快速开始
### 使用 Lean's LEDE 构建
```bash
cd lede
rm -rf feeds/luci/themes/luci-theme-argon
git clone -b 18.06 https://github.com/jerrykuku/luci-theme-argon.git package/downloads/luci-theme-argon
make menuconfig #选择 LuCI->Themes->luci-theme-argon
cd lede/package/lean
rm -rf luci-theme-argon
git clone -b 18.06 https://github.com/jerrykuku/luci-theme-argon.git luci-theme-argon
make menuconfig #choose LUCI->Theme->Luci-theme-argon
make -j1 V=s
```
### 使用官方 OpenWrt SnapShots 和 ImmortalWrt
```bash
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
```
### 在 18.06 的 LuCI 上安装 ( Lean's LEDE )
```bash
wget --no-check-certificate https://github.com/jerrykuku/luci-theme-argon/releases/download/v1.8.3/luci-theme-argon_1.8.3-20230710_all.ipk
wget --no-check-certificate https://github.com/jerrykuku/luci-theme-argon/releases/download/v1.8.2/luci-theme-argon_1.8.2-20230609_all.ipk
opkg install luci-theme-argon*.ipk
```
### 在官方和 ImmortalWrt 上安装
```bash
opkg install luci-compat
opkg install luci-lib-ipkg
wget --no-check-certificate https://github.com/jerrykuku/luci-theme-argon/releases/download/v2.3.1/luci-theme-argon_2.3.1_all.ipk
opkg install luci-theme-argon*.ipk
```
@ -96,11 +124,15 @@ opkg install luci-theme-argon*.ipk
```bash
wget --no-check-certificate https://github.com/jerrykuku/luci-app-argon-config/releases/download/v0.9/luci-app-argon-config_0.9_all.ipk
wget --no-check-certificate https://github.com/jerrykuku/luci-app-argon-config/releases/download/v0.9/luci-i18n-argon-config-zh-cn_git-22.114.24542-d1474ba_all.ipk
opkg install luci-app-argon-config*.ipk
opkg install luci-i18n-argon-config*.ipk
```
## 注意
- 强烈建议使用 Chrome 浏览器。这个主题中使用了一些新的 css3 功能,目前只有 Chrome 浏览器有最好的兼容性。
- 微软已正式退役 Internet Explorer安息吧 IE🙏<del>目前IE 系列的主线版本有需要解决的错误。</del>
- FireFox 默认不启用 backdrop-filter[见这里](https://developer.mozilla.org/zh-CN/docs/Web/CSS/backdrop-filter)的打开方法。
## 屏幕截图
![desktop](/Screenshots/screenshot_pc.jpg)
@ -117,7 +149,6 @@ Made with [contrib.rocks](https://contrib.rocks).
## 相关项目
- [luci-app-argon-config](https://github.com/jerrykuku/luci-app-argon-config): Argon 主题的设置插件
- [luci-app-vssr](https://github.com/jerrykuku/luci-app-vssr): 一个 OpenWrt 的互联网冲浪插件
- [openwrt-package](https://github.com/jerrykuku/openwrt-package): 我的 OpenWrt Package
- [CasaOS](https://github.com/IceWhaleTech/CasaOS): 一个简单、易用且优雅的开源个人家庭云系统(我目前主要开发的项目)

View File

@ -0,0 +1,73 @@
# Update log for master branch
## v2.3.1 [ 2023.04.20 ]
- Fixed the issue where the dropdown menu was being clipped.
- Fixed the problem where the exit icon was replaced with the app store icon.
- Fixed the issue where some colors were out of control in dark mode.
- Fixed the problem where the local startup script textarea could not be scrolled in the startup item.
- Fixed the problem where the Passwall node list button was misaligned.
- Fixed the text overflow problem in dynlist
- Support wallpaper from Unsplashargon
- Fix menu style mis-match on macOS+Chrome
- Fixed the issue of the login page icon becoming larger
- Support wallpaper from wallhaven
> open footer links in new tab
- Remake theme icon
## v2.3 [ 2023.04.03 ]
- Updated the style of Loading.
- Fixed a large number of CSS style errors and made the overall more uniform.
- Fixed the problem of uncontrolled individual colors in dark mode.
## v2.2.9
- Unify the settings of css spacing
- Refactored the code of the login page
- Fix the problem that the Minify Css option is turned on when compiling, which causes the
- Fix the problem that the menu could not pop up in mobile mode
- Unify the settings of css spacing
- 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)
- Automatically set as the default theme when compiling.
- 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.
- Adapt to Koolshare lede 2.3.6。
- Fix some Bug。
## v2.2.4
- Fix the problem that the login background cannot be displayed on some phones.
- Remove the dependency of luasocket.
## v2.2.3
- Fix Firmware flash page display error in dark mode.
- 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.
- Add force dark mode, login ssh and type "touch /etc/dark" to open dark mode.
- Add a volume mute button for video background, default is muted.
- fix login page when keyboard show the bottom text overlay the button on mobile.
- fix select color in dark mode,and add a style for scrollbar.
- jquery update to v3.5.1.
- change request bing api method form wget to luasocket (DEPENDS).
## v2.2.1
- Add blur effect for login form.
- New login theme, Request background imge from bing.com, Auto change everyday.
- New theme icon.
- Add more menu category icon.
- Fix font-size and padding margin.
- Restructure css file.
- Auto adapt to dark mode.

View File

@ -0,0 +1,71 @@
# Master 分支的更新日志
## v2.3.1 [ 2023.04.20 ]
- 修复了下拉菜单被裁切的问题
- 修复了退出图标变成了应用商店图标的问题
- 修复了暗色模式下个别颜色不受控制的问题
- 修复了启动项--本地启动脚本文本框不能滑动的问题
- 修复了Passwall节点列表按钮错位的问题
- 修复在dynlist中的文本溢出问题
- 登录页面 支持自来 Unsplash 的在线壁纸
- 修复在macOS的Chrome中,菜单的style异常
- 修复在登录页面中,主题图标变大的问题
- 登录页面 支持自来 wallhaven 的在线壁纸
> 打开页脚链接时使用新标签页
- 重制主题图标
## v2.3 [ 2023.04.03 ]
- 更新了 Loading 的样式
- 修复了大量的 CSS 样式错误,整体更加统一
- 修复了暗色模式下个别颜色不受控制的问题
## v2.2.9
- 修复了在手机模式下无法弹出菜单的 bug
- 统一 css 间距的设置
- 重构了登录页面的代码
- 为导航菜单添加滑动效果
## v2.2.8
- 【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)
- 当编译固件时,将自动设置为默认主题。
- 修改文件结构,以适应 luci-app-argon-config旧的开启暗色模式方法将不再适用请搭配 luci-app-argon-config 使用。
- 适配 Koolshare lede 2.3.6。
- 修复了一些 Bug。
## v2.2.4
- 修复了在某些手机下图片背景第一次加载不能显示的问题。
- 取消 luasocket 的依赖,无需再担心依赖问题。
## v2.2.3
- 修正了在暗色模式下,固件刷写弹窗内的显示错误。
- 更新了图标库,为未定义的菜单增加了一个默认的图标。
## v2.2.2
- 背景文件策略调整为,同时接受 jpg png gif mp4, 自行上传文件至 /www/luci-static/argon/background 图片和视频同时随机。
- 增加强制暗色模式,进入 ssh 输入 "touch /etc/dark" 进行开启。
- 视频背景加了一个音量开关,喜欢带声音的可以自行点击开启,默认为静音模式。
- 修复了手机模式下,登录页面出现键盘时,文字覆盖按钮的问题。
- 修正了暗黑模式下下拉选项的背景颜色,同时修改了滚动条的样式。
- jquery 更新到 v3.5.1。
- 获取 Bing Api 的方法从 wget 更新到 luasocket 并添加依赖。
## v2.2.1
- 登录背景添加毛玻璃效果。
- 全新的登录界面,图片背景跟随 Bing.com每天自动切换。
- 全新的主题 icon。
- 增加多个导航 icon。
- 细致的微调了 字号大小边距等等。
- 重构了 css 文件。
- 自动适应的暗黑模式。

View File

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

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

@ -0,0 +1,3 @@
<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>

After

Width:  |  Height:  |  Size: 225 B

View File

@ -1,41 +1,41 @@
{
"name": "Openwrt",
"icons": [
{
"src": "\/android-icon-36x36.png",
"sizes": "36x36",
"type": "image\/png",
"density": "0.75"
},
{
"src": "\/android-icon-48x48.png",
"sizes": "48x48",
"type": "image\/png",
"density": "1.0"
},
{
"src": "\/android-icon-72x72.png",
"sizes": "72x72",
"type": "image\/png",
"density": "1.5"
},
{
"src": "\/android-icon-96x96.png",
"sizes": "96x96",
"type": "image\/png",
"density": "2.0"
},
{
"src": "\/android-icon-144x144.png",
"sizes": "144x144",
"type": "image\/png",
"density": "3.0"
},
{
"src": "\/android-icon-192x192.png",
"sizes": "192x192",
"type": "image\/png",
"density": "4.0"
}
]
"name": "Openwrt",
"icons": [
{
"src": "\/android-icon-36x36.png",
"sizes": "36x36",
"type": "image\/png",
"density": "0.75"
},
{
"src": "\/android-icon-48x48.png",
"sizes": "48x48",
"type": "image\/png",
"density": "1.0"
},
{
"src": "\/android-icon-72x72.png",
"sizes": "72x72",
"type": "image\/png",
"density": "1.5"
},
{
"src": "\/android-icon-96x96.png",
"sizes": "96x96",
"type": "image\/png",
"density": "2.0"
},
{
"src": "\/android-icon-144x144.png",
"sizes": "144x144",
"type": "image\/png",
"density": "3.0"
},
{
"src": "\/android-icon-192x192.png",
"sizes": "192x192",
"type": "image\/png",
"density": "4.0"
}
]
}

View File

@ -0,0 +1,3 @@
<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>

After

Width:  |  Height:  |  Size: 417 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 690 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 632 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 664 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 566 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 674 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 252 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 480 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 848 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 682 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

View File

@ -1 +1,3 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1597500707209" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="9192" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M484.430769 51.2L236.307692 354.461538H118.153846c-43.323077 0-78.769231 35.446154-78.769231 78.769231v157.538462c0 43.323077 35.446154 78.769231 78.769231 78.769231h118.153846l248.123077 303.261538c25.6 25.6 66.953846 7.876923 66.953846-27.569231V78.769231c0-35.446154-43.323077-53.169231-66.953846-27.569231z m354.461539 120.123077c-7.876923-7.876923-19.692308-7.876923-27.569231 0l-27.569231 27.569231c-7.876923 7.876923-7.876923 21.661538 0 27.56923C858.584615 299.323077 905.846154 399.753846 905.846154 512c0 112.246154-47.261538 212.676923-122.092308 285.538462-7.876923 7.876923-7.876923 19.692308 0 27.56923l27.569231 27.569231c7.876923 7.876923 19.692308 7.876923 27.569231 0C927.507692 768 984.615385 645.907692 984.615385 512c0-133.907692-55.138462-256-145.723077-340.676923z m-124.061539 126.030769c-7.876923-7.876923-19.692308-7.876923-27.569231 0l-27.56923 27.569231c-7.876923 7.876923-7.876923 19.692308 0 27.569231 43.323077 39.384615 68.923077 96.492308 68.923077 159.507692 0 63.015385-27.569231 120.123077-70.892308 159.507692-7.876923 7.876923-7.876923 19.692308 0 27.569231l27.569231 27.569231c7.876923 7.876923 19.692308 7.876923 27.56923 0 57.107692-53.169231 94.523077-129.969231 94.523077-216.615385 0-82.707692-35.446154-159.507692-92.553846-212.676923z" p-id="9193" fill="#ffffff"></path></svg>
<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200" class="icon" viewBox="0 0 1024 1024">
<path fill="#fff" d="M484.430769 51.2 236.307692 354.461538H118.153846c-43.323077 0-78.769231 35.446154-78.769231 78.769231v157.538462c0 43.323077 35.446154 78.769231 78.769231 78.769231h118.153846L484.430769 972.8c25.6 25.6 66.953846 7.876923 66.953846-27.569231V78.769231c0-35.446154-43.323077-53.169231-66.953846-27.569231zm354.461539 120.123077c-7.876923-7.876923-19.692308-7.876923-27.569231 0l-27.569231 27.569231c-7.876923 7.876923-7.876923 21.661538 0 27.56923C858.584615 299.323077 905.846154 399.753846 905.846154 512c0 112.246154-47.261538 212.676923-122.092308 285.538462-7.876923 7.876923-7.876923 19.692308 0 27.56923l27.569231 27.569231c7.876923 7.876923 19.692308 7.876923 27.569231 0C927.507692 768 984.615385 645.907692 984.615385 512s-55.138462-256-145.723077-340.676923zM714.830769 297.353846c-7.876923-7.876923-19.692308-7.876923-27.569231 0l-27.56923 27.569231c-7.876923 7.876923-7.876923 19.692308 0 27.569231C703.015385 391.876923 728.615385 448.984616 728.615385 512c0 63.015385-27.569231 120.123077-70.892308 159.507692-7.876923 7.876923-7.876923 19.692308 0 27.569231l27.569231 27.569231c7.876923 7.876923 19.692308 7.876923 27.56923 0 57.107692-53.169231 94.523077-129.969231 94.523077-216.615385 0-82.707692-35.446154-159.507692-92.553846-212.676923z"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -1 +1,3 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1597500723732" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="9385" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M484.430769 51.2L236.307692 354.461538H118.153846c-43.323077 0-78.769231 35.446154-78.769231 78.769231v157.538462c0 43.323077 35.446154 78.769231 78.769231 78.769231h118.153846l248.123077 303.261538c25.6 25.6 66.953846 7.876923 66.953846-27.569231V78.769231c0-35.446154-43.323077-53.169231-66.953846-27.569231zM882.215385 512l96.492307-96.492308c7.876923-7.876923 7.876923-19.692308 0-27.56923l-27.56923-27.569231c-7.876923-7.876923-19.692308-7.876923-27.569231 0L827.076923 456.861538l-96.492308-96.492307c-7.876923-7.876923-19.692308-7.876923-27.56923 0l-27.569231 27.569231c-7.876923 7.876923-7.876923 19.692308 0 27.56923l96.492308 96.492308-96.492308 96.492308c-7.876923 7.876923-7.876923 19.692308 0 27.56923l27.569231 27.569231c7.876923 7.876923 19.692308 7.876923 27.56923 0l96.492308-96.492307 96.492308 96.492307c7.876923 7.876923 19.692308 7.876923 27.569231 0l27.56923-27.569231c7.876923-7.876923 7.876923-19.692308 0-27.56923L882.215385 512z" p-id="9386" fill="#ffffff"></path></svg>
<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200" class="icon" viewBox="0 0 1024 1024">
<path fill="#fff" d="M484.430769 51.2 236.307692 354.461538H118.153846c-43.323077 0-78.769231 35.446154-78.769231 78.769231v157.538462c0 43.323077 35.446154 78.769231 78.769231 78.769231h118.153846L484.430769 972.8c25.6 25.6 66.953846 7.876923 66.953846-27.569231V78.769231c0-35.446154-43.323077-53.169231-66.953846-27.569231zM882.215385 512l96.492307-96.492308c7.876923-7.876923 7.876923-19.692308 0-27.56923l-27.56923-27.569231c-7.876923-7.876923-19.692308-7.876923-27.569231 0l-96.492308 96.492307-96.492308-96.492307c-7.876923-7.876923-19.692308-7.876923-27.56923 0l-27.569231 27.569231c-7.876923 7.876923-7.876923 19.692308 0 27.56923L771.938462 512l-96.492308 96.492308c-7.876923 7.876923-7.876923 19.692308 0 27.56923l27.569231 27.569231c7.876923 7.876923 19.692308 7.876923 27.56923 0l96.492308-96.492307 96.492308 96.492307c7.876923 7.876923 19.692308 7.876923 27.569231 0l27.56923-27.569231c7.876923-7.876923 7.876923-19.692308 0-27.56923L882.215385 512z"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -1,72 +0,0 @@
/*
* The background color of the [Light Mode] subtabs follow the custom primary color and reduce its transparency
* Author: SpeedPartner
*/
/*
* Get hex for the [Light mode] Primary Color ,then reduce it to 25% transparency and convert it to RGBA value
*/
const hexColor_primary_light = getComputedStyle(document.documentElement).getPropertyValue('--primary').replace(/\s/, "");
const hexToRgba_primary_light = (hex) => {
const r = parseInt(hex.substring(1, 3), 16);
const g = parseInt(hex.substring(3, 5), 16);
const b = parseInt(hex.substring(5, 7), 16);
const a = 0.15
return [r, g, b].map(x => x.toFixed()).concat(a);
};
const rgbaColor_primary_light = hexToRgba_primary_light(hexColor_primary_light);
console.log(rgbaColor_primary_light);
/*
* Constitute a css color variable named light-subtabs-background
*/
document.documentElement.style.setProperty('--light-subtabs-background', `rgba(`+rgbaColor_primary_light+`)`);
/*
* Improved link font color that follows custom [Dark mode] Primary Color
* Author: SpeedPartner
*/
/*
* Get hex for the [Dark mode] Primary Color ,then reduce it to 70% transparency and convert it to RGB value
*/
const hexColor_primary = getComputedStyle(document.documentElement).getPropertyValue('--dark-primary').replace(/\s/, "");
const hexToRgb_primary = (hex) => {
const r = parseInt(hex.substring(1, 3), 16);
const g = parseInt(hex.substring(3, 5), 16);
const b = parseInt(hex.substring(5, 7), 16);
const a = 0.7
return [r*a, g*a, b*a].map(x => x.toFixed(2));
};
const rgbColor_primary = hexToRgb_primary(hexColor_primary);
//console.log(rgbColor_primary);
/*
* Constitute overlay color #cccccc, then reduce it to 30% transparency and convert it to RGB value
*/
const hexColor_overlay = "#cccccc";
const hexToRgb_overlay = (hex) => {
const r = parseInt(hex.substring(1, 3), 16);
const g = parseInt(hex.substring(3, 5), 16);
const b = parseInt(hex.substring(5, 7), 16);
const a = 0.3
return [r*a, g*a, b*a].map(x => x.toFixed(2));
};
const rgbColor_overlay = hexToRgb_overlay(hexColor_overlay);
//console.log(rgbColor_overlay);
/*
* Overlay the RGB value of two colors
*/
const New_Color = [
Math.round(Number(rgbColor_primary[0]) + Number(rgbColor_overlay[0])),
Math.round(Number(rgbColor_primary[1]) + Number(rgbColor_overlay[1])),
Math.round(Number(rgbColor_primary[2]) + Number(rgbColor_overlay[2]))
];
//console.log(New_Color);
/*
* Constitute a css color variable named dark_webkit-any-link
*/
document.documentElement.style.setProperty('--dark_webkit-any-link', `rgb(`+New_Color+`)`);

File diff suppressed because one or more lines are too long

View File

@ -1,168 +0,0 @@
/**
* Argon is a clean HTML5 theme for LuCI. It is based on luci-theme-material and Argon Template
*
* luci-theme-argon
* Copyright 2023 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/
*
* Argon 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
*/
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;
}
/**
* 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;
}
});
/**
* 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);
}
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,3 @@
/* 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 || {});

View File

@ -1,64 +0,0 @@
/**
* Argon is a clean HTML5 theme for LuCI. It is based on luci-theme-material and Argon Template
*
* luci-theme-argon
* Copyright 2023 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/
*
* Argon 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
*/
/**
* 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;
}
});

View File

@ -1,103 +0,0 @@
/**
* Argon is a clean HTML5 theme for LuCI. It is based on luci-theme-material and Argon Template
*
* luci-theme-argon
* Copyright 2023 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/
*
* Argon 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, " ");
}
// 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);

File diff suppressed because it is too large Load Diff

View File

@ -1,908 +0,0 @@
/**
* Argon is a clean HTML5 theme for LuCI. It is based on luci-theme-material 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 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/
*
* Argon 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
*/
body {
background: #1e1e1e;
color: #cccccc;
}
.login-page .login-container {
.login-form {
background-color: #1e1e1e;
.brand {
color: #adb5bd;
}
.form-login {
.input-group {
&::before {
color: #adb5bd;
}
.border {
border-bottom: 1px var(--dark-primary) solid;
}
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-color: #483d8b !important;
background-color: var(--dark-primary) !important;
&:hover,
&:focus {
opacity: 0.9;
}
}
}
}
footer {
color: #adb5bd;
a {
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: #fff !important;
&::after {
background-color: var(--dark-primary) !important;
}
}
}
li {
a {
color: #cccccc;
&:hover {
background: none !important;
}
&::after {
background-color: var(--dark-primary) !important;
box-shadow: 0 0 1px #000 !important;
}
}
}
}
.menu {
&:hover,
&.active {
background-color: #483d8b !important;
background-color: var(--dark-primary) !important;
color: #fff !important;
box-shadow: 0 0 1px #000 !important;
}
}
.menu[data-title=Status]:before,
.menu[data-title=Control]:before {
color: var(--dark-primary) !important;
}
}
li {
a {
color: #cccccc !important;
}
a:hover {
background-color: #483d8b !important;
background-color: var(--dark-primary) !important;
color: #fff !important;
}
}
}
&::-webkit-scrollbar-thumb {
background-color: #252526 !important;
}
}
.main-right {
background-color: #1e1e1e;
}
}
h2 {
color: #ccc;
background: #333333;
}
h3 {
color: #ccc;
border-bottom: 0;
background: #333333;
}
a:link,
a:visited,
a:active {
color: var(--dark_webkit-any-link);
}
a:-webkit-any-link:not(li a, .main-left a, .brand, .pull-right a, .alert-message a, .login-container footer a, .cbi-button) {
color: var(--dark_webkit-any-link) !important;
text-shadow: 1px 1px 2px #000 !important;
}
input:-webkit-autofill {
background-color: #3c3c3c !important;
}
input[type="checkbox"]:checked {
background-color: #483d8b !important;
background-color: var(--dark-primary) !important;
}
.cbi-input-radio:checked {
background-color: #483d8b !important;
background-color: var(--dark-primary) !important;
}
.cbi-value-field .cbi-input-apply,
.cbi-button-apply,
.cbi-button-edit {
color: #fff !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: var(--dark_webkit-any-link);
text-shadow: 1px 1px 2px #000;
}
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: #483d8b !important;
background-color: var(--dark-primary) !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;
text-shadow: 1px 1px 2px #000 !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;
background-color: var(--dark-primary) !important;
}
}
}
table>tbody>tr>th,
table>tfoot>tr>th,
table>thead>tr>th {
background-color: #252526;
border-top: none;
border-bottom: black 1px solid !important;
}
.cbi-rowstyle-2 {
background-color: #2c2c2c !important;
}
.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: #2c2c2c;
}
.cbi-rowstyle-2 .cbi-button-up,
.cbi-rowstyle-2 .cbi-button-down {
background-color: #252526 !important;
}
.cbi-section-node {
background: none;
border-radius: 0 0 .375rem .375rem;
padding: 0rem;
}
abbr {
color: #8898aa;
}
div>table>tbody>tr:nth-of-type(2n),
div>.table>.tbody>.tr:nth-of-type(2n) {
background-color: #252526;
}
/* file selector button */
::file-selector-button {
border: 1px solid darkseagreen !important;
background-color: darkseagreen !important;
}
/* Fix background color of table-titles */
.cbi-section-node>.cbi-section-table>tbody>.cbi-section-table-titles th {
background-color: #1e1e1e;
border: none !important;
}
/* Fix background color of table-descr */
.cbi-section-node>.cbi-section-table>tbody>.cbi-section-table-descr th {
background-color: #333333;
border: none !important;
}
/* Fix background color not change when the H tag is in the table rowstyle-1 */
.cbi-section-node>.cbi-section-table>tbody>.cbi-rowstyle-1 th {
background-color: #252526;
border-top: 1px solid #252526;
border-bottom: none !important;
}
/* Fix background color not change when the H tag is in the table rowstyle-2 */
.cbi-section-node>.cbi-section-table>tbody>.cbi-rowstyle-2 th {
background-color: #2c2c2c;
border-top: 1px solid #252526;
border-bottom: none !important;
}
/* Change the color of the H label in the table to make it more visible */
th h1, td h1,
th h2, td h2,
th h3, td h3,
th h4, td h4,
th h5, td h5,
th h6, td h6 {
background: var(--gray-dark);
}
/* Improved the background color of each itemes in "UNSAVED CHANGES" (dark mode only) */
.uci-change-list del,
.uci-change-legend-label del {
background-color: #fb74008c;
}
.uci-change-list var,
.uci-change-legend-label var {
background-color: #333333;
}
.uci-change-list ins,
.uci-change-legend-label ins {
background-color: #00ff0a45 !important;
}
#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:hover,
.tabs>li[class~="active"],
.cbi-tabmenu>li:hover,
.cbi-tabmenu>li[class~="cbi-tab"] {
border-bottom: .18751rem solid var(--dark-primary);
background-color: #3c3c3c;
}
.tabs>li>a,
.cbi-tabmenu>li>a {
color: #ccc !important;
}
.cbi-tabmenu>li>a:hover,
.cbi-tabmenu>li:hover>a,
.cbi-tabmenu>.cbi-tab>a,
.tabs>li>a:hover,
.tabs>li:hover>a,
.tabs>li[class~="active"]>a {
color: #fff !important;
}
.cbi-tabmenu>li {
background: #2d2d2d;
}
.cbi-tabmenu {
border-bottom: 0px solid #ddd !important;
}
.cbi-tab-descr {
color: #ccc;
}
.cbi-tabcontainer>.cbi-value:nth-of-type(2n),
.cbi-tabcontainer>.cbi-value:nth-of-type(2n)>textarea {
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"]):hover,
input:hover,
input:focus {
border-color: #483d8b !important;
border-color: var(--dark-primary) !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;
}
/*textarea for dark mode*/
textarea {
border: 1px solid #3c3c3c !important;
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;
}
.node-system-packages > .main .cbi-value > pre {
background-color: #333;
}
.cbi-section-node .cbi-value {
padding: 1rem 1rem 0.3rem 1rem;
}
.ifacebox {
background-color: #1e1e1e;
border: 1px solid #1e1e1e;
}
.ifacebox-head {
color: #666;
}
.ifacebox-body {
background-color: #333;
}
.zonebadge strong {
color: #333;
}
.zonebadge>.ifacebadge {
background-color: #3c3c3c;
}
/* Fix firewall zone: "unspecified -or- create: " background color (dark mode only) */
div[onclick$="._fwzone_new').checked=true"] {
border: 1px solid #3c3c3c;
background-color: transparent !important;
}
/* Improve the background color of "Any zone" and "Device" when ADD/EDIT Rules in Firewall > Traffic Rules (dark mode only) */
label[for$=".src_any"],
label[for$=".dest_empty"],
label[for$=".dest_any"] {
background-color: #2888db !important;
}
/* Fix/add background color of wireless signal strength badge for dark mode */
td>.ifacebadge,
.td>.ifacebadge {
background-color: #3c3c3c;
}
/* Improved loading process gif color (dark mode only) */
img[src="/luci-static/resources/icons/loading.gif"] {
filter: invert(1);
}
div.cbi-value var,
td.cbi-value-field var,
.td.cbi-value-field var {
color: #483d8b;
color: var(--dark_webkit-any-link);
text-shadow: 1px 1px 2px #000;
}
#diag-rc-output>pre {
color: #ccc;
background-color: #1e1e1e;
}
.node-services-vssr .block {
background-color: #1e1e1e !important;
box-shadow: 0 0 .5rem 0 rgba(0,0,0,0.35) !important;
}
.node-services-vssr .block h4 {
color: #ccc !important;
}
.node-services-vssr .status-bar {
color: #ccc;
background: #333333f0;
box-shadow: #00000094 10px 10px 30px 5px;
}
.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: #483d8b !important;
background: var(--dark-primary) !important;
color: #fff;
}
.node-services-vssr .ssr-button {
color: #ccc;
}
.node-services-vssr .incon:nth-child(2) {
border-right: #1e1e1e 1px solid;
}
.main .main-right #maincontent .container p {
color: #ccc;
}
#xhr_poll_status>.label.success {
color: #ccc !important;
background-color: darkolivegreen !important;
}
/* Define the warning background-color breathe display animation (dark mode) */
@keyframes warning-background-color-breathe-dark {
0%{
color: #fff;
background-color: darkorange;
}
50%{
color: #ccc;
background-color: #333333;
}
100%{
color: #fff;
background-color: darkorange;
}
}
.warning,
.warning * {
animation: warning-background-color-breathe-dark 1.5s ease-in-out infinite !important;
}
.notice {
background-color: #483d8b !important;
background-color: var(--dark-primary) !important;
}
/* Improved the aleart-message background color during device restart (dark mode only) */
.errorbox,
.alert-message {
background-color: #333333;
}
.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 #483d8b solid !important;
border: 1px var(--dark-primary) solid !important;
}
fieldset[id^="cbi-apply-"] {
background-color: #333333;
}
#detail-bubble>div {
border: 1px solid #ccc;
border-radius: 2px;
padding: 5px;
background: #252525;
}
/* Define the error text border breathe display animation (dark mode) */
@keyframes error-border-breathe-dark {
0%{
border-color: darkorange;
}
50%{
border-color: transparent;
}
100%{
border-color: darkorange;
}
}
/* Add border for error text box, and border breathe display animation to make it more noticeable (dark mode) */
.cbi-section-error>ul>li {
color: darkorange;
border: 2px solid darkorange ;
animation: error-border-breathe-dark 1.5s ease-in-out infinite;
}
.cbi-input-invalid,
.cbi-value-error input {
color: darkorange;
border: 1px dashed darkorange !important;
}
.node-services-vssr .block h4 span{
color: #ccc !important;
}
/* luci-app-passwall */
#cbi-passwall #add_link_div,
#cbi-passwall #set_node_div {
background: #333333f0 !important;
box-shadow: #00000094 10px 10px 30px 5px !important;
}
/* luci-app-bypass */
#cbi-bypass .status-bar {
color: #ccc;
background: #333333f0;
box-shadow: #00000094 10px 10px 30px 5px;
}
/* luci-app-clash */
#cbi-clash .cbi-section .pure-u-1-4 .pure-g,
#cbi-clash .cbi-section .siz .pure-g {
background-color: #1e1e1e !important;
box-shadow: 0 0 .5rem 0 rgba(0,0,0,0.35) !important;
}
/* luci-app-openclash */
#cbi-openclash #eye-icon,
#cbi-openclash img[title="刷新"] {
filter: invert(100%);
}
#cbi-openclash #cbi-openclash-config fieldset[control-id="ControlID-46"],
#cbi-openclash .CodeMirror-merge-copybuttons-right,
.CodeMirror-scroll {
background-color: #333333 !important;
}
#cbi-openclash .cbi-section .cbi-tabmenu li {
border-right: 1px solid #3c3c3c !important;
}
#cbi-openclash .CodeMirror-merge {
border: 1px solid transparent !important;
}
#cbi-openclash-config-clog .cbi-section {
border: 1px solid #3c3c3c !important;
}
#cbi-openclash .CodeMirror-gutters {
border-right: 1px solid #3c3c3c !important;
background-color: #1e1e1e !important;
}
/* luci-app-dockerman */
#cbi-dockerd .img-con img {
filter: invert(0.4);
}
/* luci-app-istorex (interface config[NetworkPort]) */
#cbi-nfs-mount .app-container_status-label_bg {
background: #333333;
}
#cbi-nfs-mount td svg {
filter: invert(0.3);
}
#actioner .actioner-dns {
background-color: #333333;
}
#actioner .actioner-dns_header,
#actioner .actioner-container_header {
border-bottom: 1px solid #cbcbcb !important;
}
#actioner .actioner-dns_footer {
border-top: 1px solid #cbcbcb !important;
}
/* luci-app-istorex (Network Guide) */
#app #main #page .title,
#app #main #page .desc {
color: #cccccc;
background-color: #333333;
}
#app #main #page .network-message li:not(span):not(a) {
color: #8d8d8d;
}
#app #main #page code {
background-color: #333333;
}
/* luci-app-istorex (Quick Start) */
#app #main #page .network-container_flow-container,
#app #main #page .app-container_status-container,
#app #main #page .nas-container .nas-container_card .app-container,
#app #main #page .app-container {
background-color: #333333;
}
#app #main #page .flow-data span,
#app #main #page .app-container_status-label_block span,
#app #main #page .app-container .item-label span:not(#app #main #page .app-container .progress-value span) {
color: #cccccc;
}
#app #main #page .app-container_status-info span,
#app #main #page .app-container_status-info span,
#app #main #page .app-container_title span {
color: #dddddd;
}
.app-container_body .app-container_status-label_bg {
background-color: #282828 !important;
}
#app #main #page .item-label_value .progress {
background-color: rgb(118, 118, 118);
}
#app #main #page .app-container_nas-menu button[class=""] {
background-color: #8b8b8b;
}
#app #main #page .app-container_nas-menu button[class="on"] {
background-color: #555555;
}
#app #main #page .app-container_title .DeviceBlock ul {
background-color: #cccccc;
}
#actioner div.action,
#actioner div.actioner-container {
background-color: #3c3c3c;
}
#actioner div.action .title {
color: #cccccc;
}
#actioner div.action .desc {
color: #cbcbcb;
}
#actioner div.action div.roots span,
#actioner div.action div.move span:not(span.tip),
#actioner div.action div.left span,
#actioner div.action div.input_row span,
#actioner div.label-item label span {
color: #cbcbcb;
}
#actioner div.action span.tooltip-trigger svg path {
fill: #cbcbcb;
}
#actioner div.actioner-dns_body div.label-item_value select {
height: 43px;
}
#actioner div.actioner-container_footer div.close {
color: #ffffff;
}
#app #main div.app-container div.app-container_title span a svg path,
#app #main #page span.disk_infoicon svg g {
fill: #8b8b8b;
}
@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 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);
}
}

View File

@ -0,0 +1,158 @@
'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;
var collapse = false;
document.querySelectorAll('.main .main-left .nav > li >ul.active').forEach(function (ul) {
$(ul).stop(true).slideUp("fast", function () {
ul.classList.remove('active');
ul.previousElementSibling.classList.remove('active');
});
if (!collapse && ul === slide_menu) {
collapse = true;
}
});
if (!slide_menu)
return;
if (!collapse) {
$(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' : 'food';
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');
}
}
});

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -7,73 +7,40 @@
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>
luci-theme-material:
Copyright 2015 Lutty Yang <lutty@wcan.in>
Agron Theme
https://demos.creative-tim.com/argon-dashboard/index.html
MUI:
https://github.com/muicss/mui
luci-theme-material:
https://github.com/LuttyYang/luci-theme-material/
Argon 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
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)
%>
<% local ver = require "luci.version" %>
</div>
<footer>
<div class="ftc">
<a class="luci-link" href="https://github.com/openwrt/luci" target="_blank">Powered by <%= ver.luciname %>
(<%= ver.luciversion %>)</a> /
<a href="https://github.com/jerrykuku/luci-theme-argon" target="_blank">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 %>
<footer class="mobile-hide">
<div>
<a class="luci-link" href="https://github.com/openwrt/luci" target="_blank">Powered by <%= ver.luciname %> (<%= ver.luciversion %>)</a> /
<a href="https://github.com/jerrykuku/luci-theme-argon" target="_blank">ArgonTheme <%# vPKG_VERSION %></a> /
<%= ver.distversion %>
<ul class="breadcrumb pull-right" id="modemenu" style="display:none"></ul>
</div>
</footer>
</div>
</div>
<script>
if (window.innerHeight < 660) {
document.getElementsByClassName("ftc")[0].style.display = "none";
} else {
document.getElementsByClassName("ftc")[0].style.display = "block";
<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);
}
window.addEventListener('resize', function() {
if (window.innerHeight < 660) {
document.getElementsByClassName("ftc")[0].style.display = "none";
} else {
document.getElementsByClassName("ftc")[0].style.display = "block";
}
})
</script>
<script src="<%=media%>/js/styles-argon.js<%# ?v=PKG_VERSION %>"></script>
})
</script>
<script type="text/javascript">L.require('menu-argon')</script>
</body>
</html>

View File

@ -0,0 +1,44 @@
<%#
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" target="_blank">Powered by <%= ver.luciname %> (<%= ver.luciversion %>)</a> /
<a href="https://github.com/jerrykuku/luci-theme-argon" target="_blank">ArgonTheme <%# vPKG_VERSION %></a> /
<%= ver.distversion %>
</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>
</body>
</html>

View File

@ -1,20 +1,15 @@
<%#
Argon is a clean HTML5 theme for LuCI. It is based on luci-theme-bootstrap and MUI and Argon Template
Argon is a clean HTML5 theme for LuCI. It is based on luci-theme-material Argon Template
luci-theme-argon
Copyright 2020 Jerryk <jerrykuku@gmail.com>
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-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>
luci-theme-material:
Copyright 2015 Lutty Yang <lutty@wcan.in>
MUI:
https://github.com/muicss/mui
Argon Theme
https://demos.creative-tim.com/argon-dashboard/index.html
@ -22,169 +17,23 @@
-%>
<%
local sys = require "luci.sys"
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 ver = require "luci.version"
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
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")
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
@ -202,12 +51,13 @@
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>
@ -223,13 +73,12 @@
<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="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">
@ -239,63 +88,82 @@
<meta name="theme-color" content="<%=bar_color%>">
<link rel="stylesheet" href="<%=media%>/css/cascade.css<%# ?v=PKG_VERSION %>">
<style title="text/css">
<% if mode == 'normal' then %>
@media (prefers-color-scheme: dark) {
<%=dark_css%>
<% if mode ~= 'dark' then %>
@media (prefers-color-scheme: dark) {
<%=dark_css%>
}
<% if fs.access('/etc/config/argon') then %>
:root {
--primary: <%=primary%>;
--dark-primary: <%=dark_primary%>;
--bar-bg: <%=primary%>;
--blur-radius:<%=blur_radius%>px;
--blur-opacity:<%=blur_opacity%>;
--blur-radius-dark:<%=blur_radius_dark%>px;
--blur-opacity-dark:<%=blur_opacity_dark%>;
}
<% 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 -%>
<% end -%>
<% elseif mode == 'dark' then %>
<%=dark_css%>
<% if fs.access('/etc/config/argon') then %>
:root {
--primary: <%=primary%>;
--dark-primary: <%=dark_primary%>;
--bar-bg: <%=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 -%>
<% 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>
<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/polyfill.min.js"></script>
<script src="<%=url('admin/translations', luci.i18n.context.lang)%>?v=<%=ver.luciversion%>"></script>
<script src="<%=resource%>/cbi.js?v=<%=ver.luciversion%>"></script>
<script src="<%=resource%>/luci.js?v=<%=ver.luciversion%>"></script>
<script src="<%=media%>/js/jquery.min.js?v=3.5.1"></script>
<script src="<%=media%>/js/color_calc-argon.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%> <%=mode %> ">
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">
<div class="main-left" id="mainmenu" style="display:none">
<div class="sidenav-header d-flex align-items-center">
<a class="brand" href="#"><%=boardinfo.hostname or "?"%></a>
<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>
<% 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 class="flex1">
<a class="showSide"></a>
<a class="brand" href="#"><%=brand_name%></a>
</div>
<div class="status" id="indicators"></div>
</div>
</div>
</header>
@ -303,29 +171,22 @@
<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">
<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 and enable SSH.%>
<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 warning">
<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>
<% if category then render_tabmenu(category, cattree) end %>
<script>
// thanks for Jo-Philipp Wich <jow@openwrt.org>
var luciLocation = <%= luci.http.write_json(luci.dispatcher.context.path) %>;
</script>
<script src="<%=media%>/js/menu-argon.js<%# ?v=PKG_VERSION %>"></script>
<script src="<%=media%>/js/sidebar-argon.js<%# ?v=PKG_VERSION %>"></script>
<div id="tabmenu" style="display:none"></div>

View File

@ -1,5 +1,5 @@
<%#
Argon is a clean HTML5 theme for LuCI. It is based on luci-theme-bootstrap and MUI and Argon Template
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>
@ -7,14 +7,9 @@
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>
luci-theme-material:
Copyright 2015 Lutty Yang <lutty@wcan.in>
MUI:
https://github.com/muicss/mui
Argon Theme
https://demos.creative-tim.com/argon-dashboard/index.html
@ -22,32 +17,23 @@
-%>
<%
local sys = require "luci.sys"
local sys = require "luci.sys"
local util = require "luci.util"
local http = require "luci.http"
local disp = require "luci.dispatcher"
local ver = require "luci.version"
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 fs = require "nixio.fs"
local nutil = require "nixio.util"
local uci = require 'luci.model.uci'.cursor()
-- send as HTML5
http.prepare_content("text/html")
local c = tree
local i, r
math.randomseed(tonumber(tostring(os.time()):reverse():sub(1, 9)))
-- Custom settings
@ -70,67 +56,64 @@
<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=PKG_VERSION %>">
<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=3.5.1"></script>
<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=PKG_VERSION %>">
<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/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%> ">
<body>

View File

@ -5,6 +5,8 @@
-%>
<%
local ver = require "luci.version"
if not luci.dispatcher.context.template_header_sent then
include("themes/" .. theme .. "/header_login")
luci.dispatcher.context.template_header_sent = true

View File

@ -2,7 +2,7 @@
Argon is a clean HTML5 theme for LuCI. It is based on luci-theme-bootstrap and MUI and Argon Template
luci-theme-argon
Copyright 2021 Jerryk <jerrykuku@gmail.com>
Copyright 2020 Jerryk <jerrykuku@gmail.com>
Have a bug? Please create an issue here on GitHub!
https://github.com/jerrykuku/luci-theme-argon/issues
@ -21,7 +21,7 @@
Licensed to the public under the Apache License 2.0
-%>
<%+header_login%>
<%+themes/argon/out_header_login%>
<%
local util = require "luci.util"
local fs = require "nixio.fs"
@ -67,7 +67,7 @@
return backgroundTable, backgroundCount
end
local function selectBackground(themeDir)
local bgUrl = media .. "/img/bg1.jpg"
local bgUrl = media .. "/img/bg1.jpg"
local backgroundType = "Image"
local mimeType = ""
@ -129,8 +129,9 @@
<div class="login-container">
<div class="login-form">
<!-- Logo Start -->
<a class="brand" href="/"><img src="<%=media%>/img/argon.svg" class="icon"></a>
<span class="brand-text"><%=striptags( (boardinfo.hostname or "?") ) %></span>
<a class="brand" href="/"><img src="<%=media%>/img/argon.svg" class="icon">
<span class="brand-text"><%=striptags( (boardinfo.hostname or "?") ) %></span>
</a>
<!-- Logo End -->
<!-- Login Form Start -->
<form class="form-login" method="post" action="<%=pcdata(luci.http.getenv("REQUEST_URI"))%>">
@ -150,7 +151,7 @@
</div>
</div>
<div>
<input type="submit" value="<%:Login%>" class="cbi-button cbi-button-apply" />
<input type="submit" value="<%:Log in%>" class="cbi-button cbi-button-apply" />
</div>
</form>
<!-- Login Form End -->
@ -159,28 +160,4 @@
if (input)
input.focus();
//]]></script>
<%
local uci = require "luci.model.uci".cursor()
local fs = require "nixio.fs"
local https_key = uci:get("uhttpd", "main", "key")
local https_port = uci:get("uhttpd", "main", "listen_https")
if type(https_port) == "table" then
https_port = https_port[1]
end
if https_port and fs.access(https_key) then
https_port = https_port:match("(%d+)$")
%>
<script type="text/javascript">//<![CDATA[
if (document.location.protocol != 'https:') {
var url = 'https://' + window.location.hostname + ':' + '<%=https_port%>' + window.location.pathname;
var img = new Image;
img.onload = function () { window.location = url };
img.src = 'https://' + window.location.hostname + ':' + '<%=https_port%>' + '<%=resource%>/cbi/up.gif?' + Math.random();;
setTimeout(function () {
img.src = ''
}, 5000);
}
//]]></script>
<% end %>
<%+footer%>
<%+themes/argon/footer_login%>

View File

@ -0,0 +1,12 @@
#!/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

View File

@ -1,12 +0,0 @@
#!/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

View File

@ -4,6 +4,11 @@
# the script will be excuted when `argon.@global[0].bing_background == '1'`
# defaults to 'bing' to be compatible with old config
WEB_PIC_SRC=$(uci -q get argon.@global[0].online_wallpaper || echo 'bing')
# For now, the next two variables are used for wallhaven.cc with specified Tag ID
# API_KEY if user has an account with wallhaven and want to use their apikey to allow for more images
# EXACT_RESO is used for exact resolution by default, if not use 'atleast' instead of 'resolutions'
API_KEY=$(uci -q get argon.@global[0].use_api_key)
EXACT_RESO=$(uci -q get argon.@global[0].use_exact_resolution || echo '1')
CACHE=/var/run/argon_${WEB_PIC_SRC}.url
WRLOCK=/var/lock/argon_${WEB_PIC_SRC}.lock
@ -12,19 +17,46 @@ fetch_pic_url() {
bing)
local picpath=$(curl -fks --max-time 3 \
"https://www.bing.com/HPImageArchive.aspx?format=js&n=1" |
jsonfilter -q -e '@.images[0].url')
jsonfilter -qe '@.images[0].url')
[ -n "${picpath}" ] && echo "//www.bing.com${picpath}"
;;
unsplash)
curl -fks --max-time 3 \
"https://source.unsplash.com/1920x1080/daily?wallpapers" |
sed -E 's#^.*href="([^?]+)\?.*$#\1?fm=jpg\&fit=crop\&w=1920\&h=1080#'
if [ -z "$API_KEY" ]; then
curl -fks --max-time 3 \
"https://source.unsplash.com/1920x1080/daily?wallpapers" |
sed -E 's#^.*href="([^?]+)\?.*$#\1?fm=jpg\&fit=crop\&w=1920\&h=1080#'
else
curl -fks --max-time 3 \
"https://api.unsplash.com/photos/random?client_id=${API_KEY}" |
jsonfilter -qe '@["urls"]["regular"]'
fi
;;
unsplash_*)
local collection_id=${WEB_PIC_SRC#unsplash_}
if [ -z "$API_KEY" ]; then
curl -fks --max-time 3 \
"https://source.unsplash.com/collection/${collection_id}/1920x1080" |
sed -E 's#^.*href="([^?]+)\?.*$#\1?fm=jpg\&fit=crop\&w=1920\&h=1080#'
else
curl -fks --max-time 3 \
"https://api.unsplash.com/photos/random?client_id=${API_KEY}&collections=${collection_id}" |
jsonfilter -qe '@["urls"]["regular"]'
fi
;;
wallhaven)
curl -fks --max-time 3 \
"https://source.unsplash.com/collection/${collection_id}/1920x1080" |
sed -E 's#^.*href="([^?]+)\?.*$#\1?fm=jpg\&fit=crop\&w=1920\&h=1080#'
"https://wallhaven.cc/api/v1/search?resolutions=1920x1080&sorting=random" |
jsonfilter -qe '@.data[0].path'
;;
wallhaven_*)
local tag_id=${WEB_PIC_SRC#wallhaven_}
local has_api_key=""
[ -n "$API_KEY" ] && has_api_key="apikey=$API_KEY&" || has_api_key=""
local use_reso="resolutions"
[ "$EXACT_RESO" -eq "1" ] && use_reso='resolutions' || use_reso='atleast'
curl -fks --max-time 3 \
"https://wallhaven.cc/api/v1/search?${has_api_key}q=id%3A${tag_id}&${use_reso}=1920x1080&sorting=random" |
jsonfilter -qe '@.data[0].path'
;;
esac
}
@ -35,6 +67,9 @@ try_update() {
if flock -n 200 >/dev/null 2>&1; then
local picurl=$(fetch_pic_url)
if [[ "$WEB_PIC_SRC" == wallhave* ]] ; then
curl -fks --max-time 3 --url "${picurl}" > /dev/null
fi
if [ -n "$picurl" ]; then
echo "${picurl}" | tee "$CACHE"
else