Update theme argon
|  | @ -8,18 +8,9 @@ include $(TOPDIR)/rules.mk | |||
| 
 | ||||
| LUCI_TITLE:=Argon Theme | ||||
| LUCI_DEPENDS:= | ||||
| PKG_VERSION:=2.2.4 | ||||
| PKG_RELEASE:=20200821 | ||||
| PKG_VERSION:=2.2.6 | ||||
| PKG_RELEASE:=20210215 | ||||
| 
 | ||||
| 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 | ||||
| [ -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
 | ||||
| # call BuildPackage - OpenWrt buildroot signature
 | ||||
|  |  | |||
|  | @ -1,36 +1,58 @@ | |||
| # luci-theme-argon ([中文](/README_ZH.md)) | ||||
| <div align="center"> | ||||
|   <img src="https://raw.githubusercontent.com/jerrykuku/staff/master/argon_title2.png"  > | ||||
|   <h1 align="center"> | ||||
|     A new LuCI theme for OpenWrt | ||||
|   </h1> | ||||
|     <h3 align="center"> | ||||
|     Argon is a clean HTML5 theme for LuCI. Users may<br>setup their own favorite logins, including beautiful<br>pics and customized mp4 videos.<br><br> | ||||
|   </h3> | ||||
| 
 | ||||
| [1]: https://img.shields.io/badge/license-MIT-brightgreen.svg | ||||
| [2]: /LICENSE | ||||
| [3]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg | ||||
| [4]: https://github.com/jerrykuku/luci-theme-argon/pulls | ||||
| [5]: https://img.shields.io/badge/Issues-welcome-brightgreen.svg | ||||
| [6]: https://github.com/jerrykuku/luci-theme-argon/issues/new | ||||
| [7]: https://img.shields.io/badge/release-v2.2.4-blue.svg? | ||||
| [8]: https://github.com/jerrykuku/luci-theme-argon/releases | ||||
| [9]: https://img.shields.io/github/downloads/jerrykuku/luci-theme-argon/total | ||||
| [10]: https://img.shields.io/badge/Contact-telegram-blue | ||||
| [11]: https://t.me/jerryk6 | ||||
| [![license][1]][2] | ||||
| [![PRs Welcome][3]][4] | ||||
| [![Issue Welcome][5]][6] | ||||
| [![Release Version][7]][8] | ||||
| [![Release Count][9]][8] | ||||
| [![Contact Me][10]][11] | ||||
|   <a href="/LICENSE"> | ||||
|     <img src="https://img.shields.io/badge/license-MIT-brightgreen.svg" alt=""> | ||||
|   </a> | ||||
| 
 | ||||
|  | ||||
|  | ||||
|   <a href="https://github.com/jerrykuku/luci-theme-argon/pulls"> | ||||
|     <img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" alt=""> | ||||
|   </a> | ||||
|    | ||||
|   <a href="https://github.com/jerrykuku/luci-theme-argon/issues/new"> | ||||
|     <img src="https://img.shields.io/badge/Issues-welcome-brightgreen.svg"> | ||||
|   </a> | ||||
|    | ||||
|   <a href="https://github.com/jerrykuku/luci-theme-argon/releases"> | ||||
|     <img src="https://img.shields.io/badge/release-v2.2.5-blue.svg?"> | ||||
|   </a> | ||||
|    | ||||
|   <a href="https://github.com/jerrykuku/luci-theme-argon/releases"> | ||||
|     <img src="https://img.shields.io/github/downloads/jerrykuku/luci-theme-argon/total"> | ||||
|   </a> | ||||
|    | ||||
|   <a href="https://t.me/jerryk6"> | ||||
|     <img src="https://img.shields.io/badge/Contact-telegram-blue"> | ||||
|   </a> | ||||
| </div> | ||||
| <br> | ||||
| <div align="center"> | ||||
|   <img src="https://raw.githubusercontent.com/jerrykuku/staff/master/argon2.gif"> | ||||
| </div> | ||||
| 
 | ||||
| A new Luci theme for LEDE/OpenWRT   | ||||
| Argon is a clean HTML5 theme for LuCI. It is based on luci-theme-material and Argon Template   | ||||
| <br>English | [简体中文](README_ZH.md) | ||||
| 
 | ||||
| ## Notice  | ||||
| It is strongly recommended to use the Chrome browser. Some new css3 features are used in the theme, and currently only Chrome has the best compatibility. | ||||
| The mainline version of IE series currently has bugs to be resolved. | ||||
| FireFox does not enable the backdrop-filter by default, see here for the opening method: https://developer.mozilla.org/zh-CN/docs/Web/CSS/backdrop-filter | ||||
| 
 | ||||
| v2.x.x Adapt to official mainline snapshot.   | ||||
| You can checkout branch 18.06 for OpenWRT 18.06 or lean 19.07. | ||||
| 
 | ||||
| ## Update log 2020.08.21 v2.2.4 | ||||
| ## Update Log 2020.09.13 v2.2.5 | ||||
| 
 | ||||
| - 【v2.2.5】New config app for argon theme. You can set the blur and transparency of the login page of argon theme, and manage the background pictures and videos.[Chrome is recommended] [Download](https://github.com/jerrykuku/luci-app-argon-config/releases/download/v0.8-beta/luci-app-argon-config_0.8-beta_all.ipk) | ||||
| - 【v2.2.5】Automatically set as the default theme when compiling. | ||||
| - 【v2.2.5】Modify the file structure to adapt to luci-app-argon-config. The old method of turning on dark mode is no longer applicable, please use it with luci-app-argon-config. | ||||
| - 【v2.2.5】Adapt to Koolshare lede 2.3.6。 | ||||
| - 【v2.2.5】Fix some Bug。 | ||||
| - 【v2.2.4】Fix the problem that the login background cannot be displayed on some phones. | ||||
| - 【v2.2.4】Remove the dependency of luasocket. | ||||
| - 【v2.2.3】Fix Firmware flash page display error in dark mode. | ||||
|  | @ -78,16 +100,19 @@ make -j1 V=s | |||
| ### For Lean openwrt 18.06 LuCI | ||||
| 
 | ||||
| ``` | ||||
| wget --no-check-certificate https://github.com/jerrykuku/luci-theme-argon/releases/download/v1.6.9/luci-theme-argon_1.6.9-20200821_all.ipk | ||||
| wget --no-check-certificate https://github.com/jerrykuku/luci-theme-argon/releases/download/v1.7.0/luci-theme-argon_1.7.0-20200909_all.ipk | ||||
| opkg install luci-theme-argon*.ipk | ||||
| ``` | ||||
| 
 | ||||
| ### For openwrt official 19.07 Snapshots LuCI master | ||||
| 
 | ||||
| ``` | ||||
| wget --no-check-certificate https://github.com/jerrykuku/luci-theme-argon/releases/download/v2.2.4/luci-theme-argon_2.2.4-20200821_all.ipk | ||||
| opkg install luci-compat | ||||
| wget --no-check-certificate https://github.com/jerrykuku/luci-theme-argon/releases/download/v2.2.5/luci-theme-argon_2.2.5-20200914_all.ipk | ||||
| opkg install luci-theme-argon*.ipk | ||||
| ``` | ||||
|  | ||||
|  | ||||
| 
 | ||||
| ## Thanks to | ||||
| 
 | ||||
|  |  | |||
|  | @ -5,7 +5,7 @@ | |||
| [4]: https://github.com/jerrykuku/luci-theme-argon/pulls | ||||
| [5]: https://img.shields.io/badge/Issues-welcome-brightgreen.svg | ||||
| [6]: https://github.com/jerrykuku/luci-theme-argon/issues/new | ||||
| [7]: https://img.shields.io/badge/release-v2.2.4-blue.svg? | ||||
| [7]: https://img.shields.io/badge/release-v2.2.5-blue.svg? | ||||
| [8]: https://github.com/jerrykuku/luci-theme-argon/releases | ||||
| [9]: https://img.shields.io/github/downloads/jerrykuku/luci-theme-argon/total | ||||
| [10]: https://img.shields.io/badge/Contact-telegram-blue | ||||
|  | @ -23,14 +23,21 @@ | |||
| 全新的 Openwrt 主题,基于luci-theme-material 和 开源免费的 Argon 模板进行移植。  | ||||
| 
 | ||||
| ## 注意 | ||||
| 
 | ||||
| 强烈建议使用Chrome 浏览器。主题中使用了一些新的css3特性,目前只有Chrome有最佳的兼容性。 | ||||
| 主线版本 IE 系列目前还有Bug有待解决。 | ||||
| FireFox 默认不开启backdrop-filter,开启方法见这里:https://developer.mozilla.org/zh-CN/docs/Web/CSS/backdrop-filter | ||||
| 当前master版本基于官方 OpenWrt 19.07.1  稳定版固件进行移植适配。   | ||||
| v2.x.x 适配主线快照版本。   | ||||
| v1.x.x 适配18.06 和 Lean Openwrt [如果你是lean代码 请选择这个版本] | ||||
| 
 | ||||
| 
 | ||||
| ## 更新日志 2020.08.21 v2.2.4 | ||||
| ## 更新日志 2020.09.13 v2.2.5 | ||||
| 
 | ||||
| - 【v2.2.5】全新的设置app.你可以设置argon 主题的登录页面的模糊和透明度,并管理背景图片与视频。[建议使用 Chrome][点击下载](https://github.com/jerrykuku/luci-app-argon-config/releases/download/v0.8-beta/luci-app-argon-config_0.8-beta_all.ipk) | ||||
| - 【v2.2.5】当编译固件时,将自动设置为默认主题。 | ||||
| - 【v2.2.5】修改文件结构,以适应luci-app-argon-config,旧的开启暗色模式方法将不再适用,请搭配luci-app-argon-config使用。 | ||||
| - 【v2.2.5】适配Koolshare lede 2.3.6。 | ||||
| - 【v2.2.5】修复了一些Bug。 | ||||
| - 【v2.2.4】修复了在某些手机下图片背景第一次加载不能显示的问题。 | ||||
| - 【v2.2.4】取消 luasocket 的依赖,无需再担心依赖问题。 | ||||
| - 【v2.2.3】修正了在暗色模式下,固件刷写弹窗内的显示错误。 | ||||
|  | @ -78,14 +85,14 @@ make -j1 V=s | |||
| ### Lean源码 | ||||
| 
 | ||||
| ``` | ||||
| wget --no-check-certificate https://github.com/jerrykuku/luci-theme-argon/releases/download/v1.6.9/luci-theme-argon_1.6.9-20200821_all.ipk | ||||
| wget --no-check-certificate https://github.com/jerrykuku/luci-theme-argon/releases/download/v1.7.0/luci-theme-argon_1.7.0-20200909_all.ipk | ||||
| opkg install luci-theme-argon*.ipk | ||||
| ``` | ||||
| 
 | ||||
| ### For openwrt official 19.07 Snapshots LuCI master  | ||||
| 
 | ||||
| ``` | ||||
| wget --no-check-certificate https://github.com/jerrykuku/luci-theme-argon/releases/download/v2.2.4/luci-theme-argon_2.2.4-20200821_all.ipk | ||||
| wget --no-check-certificate https://github.com/jerrykuku/luci-theme-argon/releases/download/v2.2.5/luci-theme-argon_2.2.5-20200914_all.ipk | ||||
| opkg install luci-theme-argon*.ipk | ||||
| ``` | ||||
| 
 | ||||
|  |  | |||
							
								
								
									
										
											BIN
										
									
								
								luci-theme-argon/Screenshots/screenshot_pc.jpg
									
										
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 658 KiB | 
							
								
								
									
										
											BIN
										
									
								
								luci-theme-argon/Screenshots/screenshot_phone.jpg
									
										
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 456 KiB | 
|  | @ -1,2 +1,2 @@ | |||
| Drop background here! | ||||
| accept jpg png gif and mp4 | ||||
| accept jpg png gif and mp4 | ||||
|  |  | |||
|  | @ -24,7 +24,7 @@ | |||
|  *  Login background | ||||
|  *      https://unsplash.com/ | ||||
|  * | ||||
|  *  Licensed to the public under the Apache License 2.0  | ||||
|  *  Licensed to the public under the Apache License 2.0 | ||||
|  */ | ||||
| body { | ||||
|   background: #1e1e1e; | ||||
|  | @ -50,11 +50,12 @@ body { | |||
|   box-shadow: none; | ||||
| } | ||||
| .login-page .login-container .login-form .form-login .cbi-button-apply { | ||||
|   background-image: linear-gradient(-135deg, #6c61ab 0%, #594ca9 100%); | ||||
|   background-color: #483d8b !important; | ||||
|   background-color: var(--dark-primary) !important; | ||||
| } | ||||
| .login-page .login-container .login-form .form-login .cbi-button-apply:hover, | ||||
| .login-page .login-container .login-form .form-login .cbi-button-apply:focus { | ||||
|   background-image: linear-gradient(-135deg, #554c8a 0%, #483d8b 100%); | ||||
|   opacity: 0.9; | ||||
| } | ||||
| header::after { | ||||
|   background-color: #1e1e1e !important; | ||||
|  | @ -79,7 +80,8 @@ header::after { | |||
|   background: none !important; | ||||
| } | ||||
| .main .main-left .nav .slide .menu.active { | ||||
|   background-color: darkslateblue !important; | ||||
|   background-color: #483d8b !important; | ||||
|   background-color: var(--dark-primary) !important; | ||||
|   color: #cccccc !important; | ||||
| } | ||||
| .main .main-left .nav .slide .menu.active a::after { | ||||
|  | @ -89,7 +91,8 @@ header::after { | |||
|   color: #cccccc !important; | ||||
| } | ||||
| .main .main-left .nav li a:hover { | ||||
|   background-color: darkslateblue !important; | ||||
|   background-color: #483d8b !important; | ||||
|   background-color: var(--dark-primary) !important; | ||||
|   color: #cccccc !important; | ||||
| } | ||||
| .main .main-left::-webkit-scrollbar-thumb { | ||||
|  | @ -113,7 +116,8 @@ h3 { | |||
| a:-webkit-any-link { | ||||
|   color: -webkit-link; | ||||
|   cursor: pointer; | ||||
|   color: darkslateblue; | ||||
|   color: #483d8b; | ||||
|   color: var(--dark-primary); | ||||
| } | ||||
| input:-webkit-autofill { | ||||
|   background-color: #3c3c3c !important; | ||||
|  | @ -122,8 +126,10 @@ input:-webkit-autofill { | |||
| .cbi-button-apply, | ||||
| .cbi-button-edit { | ||||
|   color: #fff !important; | ||||
|   background-color: darkslateblue !important; | ||||
|   border-color: darkslateblue !important; | ||||
|   background-color: #483d8b !important; | ||||
|   background-color: var(--dark-primary) !important; | ||||
|   border-color: #483d8b !important; | ||||
|   border-color: var(--dark-primary) !important; | ||||
| } | ||||
| .cbi-section em { | ||||
|   color: #ccc; | ||||
|  | @ -235,7 +241,8 @@ h4 { | |||
| } | ||||
| .cbi-button { | ||||
|   color: #ccc !important; | ||||
|   background-color: darkslateblue; | ||||
|   background-color: #483d8b; | ||||
|   background-color: var(--dark-primary); | ||||
| } | ||||
| .cbi-section-node { | ||||
|   background: none; | ||||
|  | @ -271,7 +278,8 @@ div > .table > .tbody > .tr:nth-of-type(2n) { | |||
| } | ||||
| .tabs > li[class~="active"], | ||||
| .tabs > li:hover { | ||||
|   border-bottom: 0.18751rem solid darkslateblue; | ||||
|   border-bottom: 0.18751rem solid #483d8b; | ||||
|   border-bottom: 0.18751rem solid var(--dark-primary); | ||||
|   color: #ccc; | ||||
|   background-color: #181819; | ||||
| } | ||||
|  | @ -311,7 +319,8 @@ input { | |||
| } | ||||
| select:not([multiple="multiple"]):focus, | ||||
| input:focus { | ||||
|   border-color: darkslateblue !important; | ||||
|   border-color: #483d8b !important; | ||||
|   border-color: var(--dark-primary) !important; | ||||
|   outline: 0; | ||||
| } | ||||
| select { | ||||
|  | @ -392,7 +401,8 @@ td.cbi-value-field var { | |||
|   box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.35); | ||||
| } | ||||
| .node-services-vssr .cbi-section-table-row.fast { | ||||
|   background: darkslateblue !important; | ||||
|   background: #483d8b !important; | ||||
|   background: var(--dark-primary) !important; | ||||
|   color: #fff; | ||||
| } | ||||
| .node-services-vssr .ssr-button { | ||||
|  | @ -406,7 +416,8 @@ td.cbi-value-field var { | |||
|   background-color: darkolivegreen !important; | ||||
| } | ||||
| .notice { | ||||
|   background-color: darkslateblue !important; | ||||
|   background-color: #483d8b !important; | ||||
|   background-color: var(--dark-primary) !important; | ||||
| } | ||||
| .cbi-input-find, | ||||
| .cbi-input-save, | ||||
|  | @ -431,7 +442,8 @@ td.cbi-value-field var { | |||
| .cbi-button-apply.important, | ||||
| .cbi-button-reload.important, | ||||
| .cbi-button-action.important { | ||||
|   border: 1px darkslateblue solid !important; | ||||
|   border: 1px #483d8b solid !important; | ||||
|   border: 1px var(--dark-primary) solid !important; | ||||
| } | ||||
| .btn[value="Dismiss"], | ||||
| .cbi-button[value="Terminate"], | ||||
|  | @ -442,8 +454,8 @@ td.cbi-value-field var { | |||
| .cbi-button-neutral[value="Disable"] { | ||||
|   font-weight: normal; | ||||
|   color: #fff; | ||||
|   border: thin solid darkorange!important; | ||||
|   background-color: darkorange!important; | ||||
|   border: thin solid darkorange !important; | ||||
|   background-color: darkorange !important; | ||||
| } | ||||
| fieldset[id^="cbi-apply-"] { | ||||
|   background-color: #333333; | ||||
|  | @ -477,7 +489,8 @@ header .fill .status span[data-style="active"] { | |||
| } | ||||
| td > .ifacebadge, | ||||
| .td > .ifacebadge { | ||||
|   background-color: darkslateblue; | ||||
|   background-color: #483d8b; | ||||
|   background-color: var(--dark-primary); | ||||
|   border: 0; | ||||
| } | ||||
| .btn.danger, | ||||
|  | @ -529,7 +542,8 @@ div[style="width:100%;height:300px;border:1px solid #000;background:#fff"] { | |||
|   background-color: darkorange !important; | ||||
| } | ||||
| .cbi-value input[type="password"] + .cbi-button-neutral { | ||||
|   background-color: darkslateblue !important; | ||||
|   background-color: #483d8b !important; | ||||
|   background-color: var(--dark-primary) !important; | ||||
| } | ||||
| .btn, | ||||
| button, | ||||
|  | @ -558,7 +572,8 @@ input, | |||
|   color: #adb5bd !important; | ||||
| } | ||||
| .cbi-dropdown[open] { | ||||
|   border-color: darkslateblue !important; | ||||
|   border-color: #483d8b !important; | ||||
|   border-color: var(--dark-primary) !important; | ||||
| } | ||||
| .cbi-dropdown[open] > ul.dropdown { | ||||
|   background: #252526 !important; | ||||
|  | @ -571,11 +586,13 @@ input, | |||
|   border-bottom: 1px solid #3c3c3c !important; | ||||
| } | ||||
| .cbi-dropdown[open] > ul.dropdown > li[selected] { | ||||
|   background-color: darkslateblue !important; | ||||
|   background-color: #483d8b !important; | ||||
|   background-color: var(--dark-primary) !important; | ||||
|   border-bottom: 1px solid #3c3c3c !important; | ||||
| } | ||||
| .cbi-dropdown[open] > ul.dropdown > li.focus { | ||||
|   background: darkslateblue; | ||||
|   background: #483d8b; | ||||
|   background: var(--dark-primary); | ||||
|   outline: none; | ||||
| } | ||||
| .ifacebadge { | ||||
|  | @ -594,7 +611,8 @@ input, | |||
| .cbi-button[value="Upload"], | ||||
| .cbi-button[value$="Apply"], | ||||
| .cbi-button[onclick="addKey(event)"] { | ||||
|   background: darkslateblue !important; | ||||
|   background: #483d8b !important; | ||||
|   background: var(--dark-primary) !important; | ||||
| } | ||||
| .btn.primary, | ||||
| .cbi-page-actions .cbi-button-save, | ||||
|  | @ -607,7 +625,8 @@ input, | |||
| .cbi-button[value="Scan"], | ||||
| .cbi-button[value^="Back"], | ||||
| .cbi-button-neutral[onclick="handleConfig(event)"] { | ||||
|   background: darkslateblue; | ||||
|   background: #483d8b; | ||||
|   background: var(--dark-primary); | ||||
| } | ||||
| [data-page="admin-system-opkg"] h2 { | ||||
|   color: #ccc !important; | ||||
|  |  | |||
|  | @ -24,7 +24,7 @@ | |||
|  *  Login background | ||||
|  *      https://unsplash.com/ | ||||
|  * | ||||
|  *  Licensed to the public under the Apache License 2.0  | ||||
|  *  Licensed to the public under the Apache License 2.0 | ||||
|  */ | ||||
| 
 | ||||
| 
 | ||||
|  | @ -183,4 +183,4 @@ | |||
| 
 | ||||
| .icon-app:before { | ||||
|     content: "\e915"; | ||||
| } | ||||
| } | ||||
|  |  | |||
							
								
								
									
										
											BIN
										
									
								
								luci-theme-argon/htdocs/luci-static/argon/favicon.ico
									
										
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 15 KiB | 
| Before Width: | Height: | Size: 535 B | 
							
								
								
									
										
											BIN
										
									
								
								luci-theme-argon/htdocs/luci-static/argon/icon/favicon-16x16.png
									
										
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 1,019 B | 
							
								
								
									
										
											BIN
										
									
								
								luci-theme-argon/htdocs/luci-static/argon/icon/favicon-32x32.png
									
										
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 1.7 KiB | 
							
								
								
									
										
											BIN
										
									
								
								luci-theme-argon/htdocs/luci-static/argon/icon/favicon-96x96.png
									
										
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 3.6 KiB | 
| Before Width: | Height: | Size: 535 B | 
							
								
								
									
										3
									
								
								luci-theme-argon/htdocs/luci-static/argon/js/polyfill.min.js
									
										
									
									
										vendored
									
									
										Normal 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 || {}); | ||||
|  | @ -7,7 +7,7 @@ | |||
|  *  Have a bug? Please create an issue here on GitHub! | ||||
|  *      https://github.com/jerrykuku/luci-theme-argon/issues
 | ||||
|  * | ||||
|  *  luci-theme-material:  | ||||
|  *  luci-theme-material: | ||||
|  *      Copyright 2015 Lutty Yang <lutty@wcan.in> | ||||
|  *		https://github.com/LuttyYang/luci-theme-material/
 | ||||
|  * | ||||
|  | @ -89,6 +89,11 @@ document.addEventListener('luci-loaded', function(ev) { | |||
| 	$(".main > .main-left > .nav > .slide > .menu").click(function () { | ||||
| 		var ul = $(this).next(".slide-menu"); | ||||
| 		var menu = $(this); | ||||
| 		$(".main > .main-left > .nav > .slide > .menu").each(function () { | ||||
| 			var ulNode = $(this); | ||||
| 			ulNode.removeClass("active"); | ||||
| 			ulNode.next(".slide-menu").stop(true).slideUp("fast") | ||||
| 		}); | ||||
| 		if (!ul.is(":visible")) { | ||||
| 			menu.addClass("active"); | ||||
| 			ul.addClass("active"); | ||||
|  |  | |||
|  | @ -1,3 +1,4 @@ | |||
| //  compress: false , sourceMap: false | ||||
| /** | ||||
|  *  Argon is a clean HTML5 theme for LuCI. It is based on luci-theme-material and Argon Template | ||||
|  * | ||||
|  | @ -24,7 +25,7 @@ | |||
|  *  Login background | ||||
|  *      https://unsplash.com/ | ||||
|  * | ||||
|  *  Licensed to the public under the Apache License 2.0  | ||||
|  *  Licensed to the public under the Apache License 2.0 | ||||
|  */ | ||||
| 
 | ||||
| body { | ||||
|  | @ -61,11 +62,12 @@ body { | |||
|             } | ||||
| 
 | ||||
|             .cbi-button-apply { | ||||
|                 background-image: linear-gradient(-135deg, #6c61ab 0%, #594ca9 100%); | ||||
|                 background-color: #483d8b !important; | ||||
|                 background-color: var(--dark-primary) !important; | ||||
| 
 | ||||
|                 &:hover, | ||||
|                 &:focus { | ||||
|                     background-image: linear-gradient(-135deg, rgb(85, 76, 138) 0%, rgb(72, 61, 139) 100%); | ||||
|                     opacity: 0.9; | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
|  | @ -113,7 +115,8 @@ header::after { | |||
|                 } | ||||
| 
 | ||||
|                 .menu.active { | ||||
|                     background-color: darkslateblue !important; | ||||
|                     background-color: #483d8b !important; | ||||
|                     background-color: var(--dark-primary) !important; | ||||
|                     color: #cccccc !important; | ||||
| 
 | ||||
|                     a::after { | ||||
|  | @ -128,7 +131,8 @@ header::after { | |||
|                 } | ||||
| 
 | ||||
|                 a:hover { | ||||
|                     background-color: darkslateblue !important; | ||||
|                     background-color: #483d8b !important; | ||||
|                     background-color: var(--dark-primary) !important; | ||||
|                     color: #cccccc !important; | ||||
|                 } | ||||
|             } | ||||
|  | @ -163,7 +167,8 @@ h3 { | |||
| a:-webkit-any-link { | ||||
|     color: -webkit-link; | ||||
|     cursor: pointer; | ||||
|     color: darkslateblue; | ||||
|     color: #483d8b; | ||||
|     color: var(--dark-primary); | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -175,8 +180,10 @@ input:-webkit-autofill { | |||
| .cbi-button-apply, | ||||
| .cbi-button-edit { | ||||
|     color: #fff !important; | ||||
|     background-color: darkslateblue !important; | ||||
|     border-color: darkslateblue !important; | ||||
|     background-color: #483d8b !important; | ||||
|     background-color: var(--dark-primary) !important; | ||||
|     border-color: #483d8b !important; | ||||
|     border-color: var(--dark-primary) !important; | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -316,7 +323,8 @@ h4 { | |||
| 
 | ||||
| .cbi-button { | ||||
|     color: #ccc !important; | ||||
|     background-color: darkslateblue; | ||||
|     background-color: #483d8b; | ||||
|     background-color: var(--dark-primary); | ||||
| } | ||||
| 
 | ||||
| .cbi-section-node { | ||||
|  | @ -361,7 +369,8 @@ div>.table>.tbody>.tr:nth-of-type(2n) { | |||
| 
 | ||||
| .tabs>li[class~="active"], | ||||
| .tabs>li:hover { | ||||
|     border-bottom: 0.18751rem solid darkslateblue; | ||||
|     border-bottom: 0.18751rem solid #483d8b; | ||||
|     border-bottom: 0.18751rem solid var(--dark-primary); | ||||
|     color: #ccc; | ||||
|     background-color: #181819; | ||||
| } | ||||
|  | @ -410,7 +419,8 @@ input { | |||
| 
 | ||||
| select:not([multiple="multiple"]):focus, | ||||
| input:focus { | ||||
|     border-color: darkslateblue !important; | ||||
|     border-color: #483d8b !important; | ||||
|     border-color: var(--dark-primary) !important; | ||||
|     outline: 0; | ||||
| 
 | ||||
| } | ||||
|  | @ -515,7 +525,8 @@ td.cbi-value-field var { | |||
| } | ||||
| 
 | ||||
| .node-services-vssr .cbi-section-table-row.fast { | ||||
|     background: darkslateblue !important; | ||||
|     background: #483d8b !important; | ||||
|     background: var(--dark-primary) !important; | ||||
|     color: #fff; | ||||
| } | ||||
| 
 | ||||
|  | @ -535,7 +546,8 @@ td.cbi-value-field var { | |||
| } | ||||
| 
 | ||||
| .notice { | ||||
|     background-color: darkslateblue !important; | ||||
|     background-color: #483d8b !important; | ||||
|     background-color: var(--dark-primary) !important; | ||||
| } | ||||
| 
 | ||||
| .cbi-input-find, | ||||
|  | @ -563,7 +575,8 @@ td.cbi-value-field var { | |||
| .cbi-button-apply.important, | ||||
| .cbi-button-reload.important, | ||||
| .cbi-button-action.important { | ||||
|     border: 1px darkslateblue solid !important; | ||||
|     border: 1px #483d8b solid !important; | ||||
|     border: 1px var(--dark-primary) solid !important; | ||||
| } | ||||
| 
 | ||||
| .btn[value="Dismiss"], | ||||
|  | @ -575,8 +588,8 @@ td.cbi-value-field var { | |||
| .cbi-button-neutral[value="Disable"] { | ||||
|     font-weight: normal; | ||||
|     color: #fff; | ||||
|     border: thin solid darkorange!important; | ||||
|     background-color: darkorange!important; | ||||
|     border: thin solid darkorange !important; | ||||
|     background-color: darkorange !important; | ||||
| } | ||||
| 
 | ||||
| fieldset[id^="cbi-apply-"] { | ||||
|  | @ -619,7 +632,8 @@ header .fill .status span[data-style="active"] { | |||
| td>.ifacebadge, | ||||
| .td>.ifacebadge { | ||||
| 
 | ||||
|     background-color: darkslateblue; | ||||
|     background-color: #483d8b; | ||||
|     background-color: var(--dark-primary); | ||||
|     border: 0; | ||||
| } | ||||
| 
 | ||||
|  | @ -684,7 +698,8 @@ div[style="width:100%;height:300px;border:1px solid #000;background:#fff"] { | |||
| } | ||||
| 
 | ||||
| .cbi-value input[type="password"]+.cbi-button-neutral { | ||||
|     background-color: darkslateblue !important; | ||||
|     background-color: #483d8b !important; | ||||
|     background-color: var(--dark-primary) !important; | ||||
| } | ||||
| 
 | ||||
| .btn, | ||||
|  | @ -722,7 +737,8 @@ input, | |||
| } | ||||
| 
 | ||||
| .cbi-dropdown[open] { | ||||
|     border-color: darkslateblue !important; | ||||
|     border-color: #483d8b !important; | ||||
|     border-color: var(--dark-primary) !important; | ||||
| } | ||||
| 
 | ||||
| .cbi-dropdown[open]>ul.dropdown { | ||||
|  | @ -740,12 +756,14 @@ input, | |||
| } | ||||
| 
 | ||||
| .cbi-dropdown[open]>ul.dropdown>li[selected] { | ||||
|     background-color: darkslateblue !important; | ||||
|     background-color: #483d8b !important; | ||||
|     background-color: var(--dark-primary) !important; | ||||
|     border-bottom: 1px solid #3c3c3c !important; | ||||
| } | ||||
| 
 | ||||
| .cbi-dropdown[open]>ul.dropdown>li.focus { | ||||
|     background: darkslateblue; | ||||
|     background: #483d8b; | ||||
|     background: var(--dark-primary); | ||||
|     outline: none; | ||||
| } | ||||
| 
 | ||||
|  | @ -767,7 +785,8 @@ input, | |||
| .cbi-button[value="Upload"], | ||||
| .cbi-button[value$="Apply"], | ||||
| .cbi-button[onclick="addKey(event)"] { | ||||
|     background: darkslateblue !important; | ||||
|     background: #483d8b !important; | ||||
|     background: var(--dark-primary) !important; | ||||
| } | ||||
| 
 | ||||
| .btn.primary, | ||||
|  | @ -781,7 +800,8 @@ input, | |||
| .cbi-button[value="Scan"], | ||||
| .cbi-button[value^="Back"], | ||||
| .cbi-button-neutral[onclick="handleConfig(event)"] { | ||||
|     background: darkslateblue; | ||||
|     background: #483d8b; | ||||
|     background: var(--dark-primary); | ||||
| } | ||||
| 
 | ||||
| [data-page="admin-system-opkg"] h2 { | ||||
|  | @ -805,4 +825,4 @@ input, | |||
|     } | ||||
| 
 | ||||
| 
 | ||||
| } | ||||
| } | ||||
|  |  | |||
|  | @ -7,13 +7,13 @@ | |||
| 	Have a bug? Please create an issue here on GitHub! | ||||
| 	https://github.com/jerrykuku/luci-theme-argon/issues | ||||
| 
 | ||||
| 	luci-theme-material:  | ||||
| 	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  | ||||
| 	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" %> | ||||
|  | @ -43,4 +43,4 @@ | |||
| </script> | ||||
| <script src="<%=media%>/js/script.js"></script> | ||||
| </body> | ||||
| </html> | ||||
| </html> | ||||
|  |  | |||
							
								
								
									
										46
									
								
								luci-theme-argon/luasrc/view/themes/argon/footer_login.htm
									
										
									
									
									
										Normal file
									
								
							
							
						
						|  | @ -0,0 +1,46 @@ | |||
| <%# | ||||
| 	Argon is a clean HTML5 theme for LuCI. It is based on luci-theme-material Argon Template | ||||
| 
 | ||||
| 	luci-theme-argon | ||||
| 	Copyright 2020 Jerrykuku <jerrykuku@qq.com> | ||||
| 
 | ||||
| 	Have a bug? Please create an issue here on GitHub! | ||||
| 	https://github.com/jerrykuku/luci-theme-argon/issues | ||||
| 
 | ||||
| 	luci-theme-material: | ||||
| 	Copyright 2015 Lutty Yang <lutty@wcan.in> | ||||
| 
 | ||||
| 	Agron Theme | ||||
| 	https://demos.creative-tim.com/argon-dashboard/index.html | ||||
| 
 | ||||
| 	Licensed to the public under the Apache License 2.0 | ||||
| -%> | ||||
| 
 | ||||
| <% local ver = require "luci.version" %> | ||||
| </div> | ||||
| <footer class="mobile-hide"> | ||||
| 	<div> | ||||
| 		<a class="luci-link" href="https://github.com/openwrt/luci">Powered by <%= ver.luciname %> (<%= ver.luciversion %>)</a> / | ||||
| 						<a href="https://github.com/jerrykuku/luci-theme-argon">ArgonTheme <%# vPKG_VERSION %></a> / | ||||
| 						<%= ver.distversion %> | ||||
| 		<ul class="breadcrumb pull-right" id="modemenu" style="display:none"></ul> | ||||
| 	</div> | ||||
| </footer> | ||||
| </div> | ||||
| </div> | ||||
| <script> | ||||
| 	// thanks for Jo-Philipp Wich <jow@openwrt.org> | ||||
| 	var luciLocation = <%= luci.http.write_json(luci.dispatcher.context.path) %>; | ||||
| 	var winHeight = $(window).height(); | ||||
| 	$(window).resize(function () { | ||||
| 		var winWidth = $(window).width() | ||||
| 		if(winWidth < 600){ | ||||
| 			var newHeight = $(this).height(); | ||||
| 			var keyboradHeight = newHeight - winHeight; | ||||
| 			$(".ftc").css("bottom", keyboradHeight + 30); | ||||
| 		} | ||||
| 	}) | ||||
| </script> | ||||
| <script src="<%=media%>/js/script.js"></script> | ||||
| </body> | ||||
| </html> | ||||
|  | @ -5,19 +5,19 @@ | |||
| 	Copyright 2020 Jerrykuku <jerrykuku@qq.com> | ||||
| 
 | ||||
| 	Have a bug? Please create an issue here on GitHub! | ||||
| 	https://github.com/jerrykuku/luci-theme-argon/issues  | ||||
| 	https://github.com/jerrykuku/luci-theme-argon/issues | ||||
| 
 | ||||
| 	luci-theme-material:  | ||||
| 	luci-theme-material: | ||||
| 	Copyright 2015 Lutty Yang <lutty@wcan.in> | ||||
| 	 | ||||
| 	Agron Theme | ||||
| 	https://demos.creative-tim.com/argon-dashboard/index.html  | ||||
| 
 | ||||
| 	Argon Theme | ||||
| 	https://demos.creative-tim.com/argon-dashboard/index.html | ||||
| 
 | ||||
| 	Licensed to the public under the Apache License 2.0 | ||||
| -%> | ||||
| 
 | ||||
| <% | ||||
|     local sys  = require "luci.sys" | ||||
| 	local sys = require "luci.sys" | ||||
| 	local util = require "luci.util" | ||||
| 	local http = require "luci.http" | ||||
| 	local disp = require "luci.dispatcher" | ||||
|  | @ -25,42 +25,87 @@ | |||
| 	local boardinfo = util.ubus("system", "board") | ||||
| 
 | ||||
| 	local node = disp.context.dispatched | ||||
|      | ||||
|     local fs	= require "nixio.fs" | ||||
| 
 | ||||
| 	local fs = require "nixio.fs" | ||||
| 	local nutil = require "nixio.util" | ||||
|      | ||||
| 	local uci = require 'luci.model.uci'.cursor() | ||||
| 
 | ||||
| 	-- send as HTML5 | ||||
| 	http.prepare_content("text/html") | ||||
|     math.randomseed(os.time()) | ||||
| 
 | ||||
| 	math.randomseed(os.time()) | ||||
| 
 | ||||
| 	-- Custom settings | ||||
| 	local mode = 'normal' | ||||
| 	local dark_css = fs.readfile('/www/luci-static/argon/css/dark.css') | ||||
| 	local bar_color = '#5e72e4' | ||||
| 	local primary, dark_primary, blur_radius, blur_radius_dark, blur_opacity | ||||
| 	if fs.access('/etc/config/argon') then | ||||
| 		primary = uci:get_first('argon', 'global', 'primary') | ||||
| 		dark_primary = uci:get_first('argon', 'global', 'dark_primary') | ||||
| 		blur_radius = uci:get_first('argon', 'global', 'blur') | ||||
| 		blur_radius_dark = uci:get_first('argon', 'global', 'blur_dark') | ||||
| 		blur_opacity = uci:get_first('argon', 'global', 'transparency') | ||||
| 		blur_opacity_dark = uci:get_first('argon', 'global', 'transparency_dark') | ||||
| 		mode = uci:get_first('argon', 'global', 'mode') | ||||
| 		bar_color = mode == 'dark' and dark_primary or primary | ||||
| 	end | ||||
| 
 | ||||
| 	-- Brand name | ||||
| 	local brand_name = boardinfo.hostname or "?" | ||||
| -%> | ||||
| <!DOCTYPE html> | ||||
| <html lang="<%=luci.i18n.context.lang%>"> | ||||
| 
 | ||||
| <head> | ||||
| 	<meta charset="utf-8"> | ||||
| 	<title> | ||||
| 		<%=striptags( (boardinfo.hostname or "?") .. ( (node and node.title) and ' - ' .. translate(node.title) or '')) %> | ||||
| 		- LuCI</title> | ||||
| 	<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" /> | ||||
| 	<meta name="format-detection" content="telephone=no, email=no" /> | ||||
| 	<meta name="apple-mobile-web-app-capable" content="yes"> | ||||
| 	<meta name="mobile-web-app-capable" content="yes"> | ||||
| 	<meta name="x5-fullscreen" content="true"> | ||||
| 	<meta name="full-screen" content="yes"> | ||||
| 	<meta name="x5-page-mode" content="app"> | ||||
| 	<meta name="browsermode" content="application"> | ||||
| 	<meta name="msapplication-tap-highlight" content="no"> | ||||
| 	<meta name="msapplication-TileColor" content="#5e72e4"> | ||||
| 	<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="shortcut icon" type="image/png" href="<%=media%>/icon/favicon.png"> | ||||
| 	<link rel="manifest" href="<%=media%>/icon/manifest.json"> | ||||
| 	<meta name="msapplication-TileColor" content="#5e72e4"> | ||||
| 	<meta name="theme-color" content="#5e72e4"> | ||||
| 	<link rel="stylesheet" href="<%=media%>/css/cascade.css?v=<%=math.random(1,100000)%>"> | ||||
| 	<% if nixio.fs.access("/etc/dark") then %> | ||||
| 	<link rel="stylesheet" href="<%=media%>/css/dark.css?v=<%=math.random(1,100000)%>"> | ||||
| 	<% end -%> | ||||
|     <meta charset="utf-8"> | ||||
|     <title> | ||||
|         <%=striptags( (boardinfo.hostname or "?") .. ( (node and node.title) and ' - ' .. translate(node.title) or '')) %> | ||||
|         - LuCI</title> | ||||
|     <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" /> | ||||
|     <meta name="format-detection" content="telephone=no, email=no" /> | ||||
|     <meta name="apple-mobile-web-app-capable" content="yes"> | ||||
|     <meta name="mobile-web-app-capable" content="yes"> | ||||
|     <meta name="x5-fullscreen" content="true"> | ||||
|     <meta name="full-screen" content="yes"> | ||||
|     <meta name="x5-page-mode" content="app"> | ||||
|     <meta name="browsermode" content="application"> | ||||
|     <meta name="msapplication-tap-highlight" content="no"> | ||||
|     <meta name="msapplication-TileColor" content="<%=bar_color%>"> | ||||
|     <meta name="application-name" content="<%=striptags( (boardinfo.hostname or "?") ) %> - LuCI"> | ||||
|     <meta name="apple-mobile-web-app-title" content="<%=striptags( (boardinfo.hostname or "?") ) %> - LuCI"> | ||||
|     <link rel="apple-touch-icon" sizes="60x60" href="<%=media%>/icon/apple-icon-60x60.png"> | ||||
|     <link rel="apple-touch-icon" sizes="72x72" href="<%=media%>/icon/apple-icon-72x72.png"> | ||||
|     <link rel="apple-touch-icon" sizes="144x144" href="<%=media%>/icon/apple-icon-144x144.png"> | ||||
|     <link rel="icon" type="image/png" sizes="192x192" href="<%=media%>/icon/android-icon-192x192.png"> | ||||
|     <link rel="icon" type="image/png" sizes="32x32" href="<%=media%>/icon/favicon-32x32.png"> | ||||
|     <link rel="icon" type="image/png" sizes="96x96" href="<%=media%>/icon/favicon-96x96.png"> | ||||
|     <link rel="icon" type="image/png" sizes="16x16" href="<%=media%>/icon/favicon-16x16.png"> | ||||
|     <link rel="manifest" href="<%=media%>/icon/manifest.json"> | ||||
|     <meta name="msapplication-TileColor" content="<%=bar_color%>"> | ||||
|     <meta name="msapplication-TileImage" content="<%=media%>/icon/ms-icon-144x144.png"> | ||||
|     <meta name="theme-color" content="<%=bar_color%>"> | ||||
|     <link rel="stylesheet" href="<%=media%>/css/cascade.css?v=<%=math.random(1,100000)%>"> | ||||
|     <style title="text/css"> | ||||
|         <% if mode == 'normal' then %> | ||||
|             @media (prefers-color-scheme: dark) { | ||||
|                 <%=dark_css%> | ||||
|             } | ||||
|         <% elseif mode == 'dark' then %> | ||||
|             <%=dark_css%> | ||||
|         <% end -%> | ||||
|         <% if fs.access('/etc/config/argon') then %> | ||||
|         :root { | ||||
|             --primary: <%=primary%>; | ||||
|             --dark-primary: <%=dark_primary%>; | ||||
|             --blur-radius:<%=blur_radius%>px; | ||||
|             --blur-opacity:<%=blur_opacity%>; | ||||
|             --blur-radius-dark:<%=blur_radius_dark%>px; | ||||
|             --blur-opacity-dark:<%=blur_opacity_dark%>; | ||||
|         } | ||||
|         <% end -%> | ||||
|     </style> | ||||
| 	<link rel="shortcut icon" href="<%=media%>/favicon.ico"> | ||||
| 	<% if node and node.css then %> | ||||
| 	<link rel="stylesheet" href="<%=resource%>/<%=node.css%>"> | ||||
| 	<% end -%> | ||||
|  | @ -69,136 +114,110 @@ | |||
| 		<%=css %> | ||||
| 	</style> | ||||
| 	<% end -%> | ||||
| 	<script src="<%=url('admin/translations', luci.i18n.context.lang)%><%# ?v=PKG_VERSION %>"></script> | ||||
| 	<script src="<%=resource%>/cbi.js<%# ?v=PKG_VERSION %>"></script> | ||||
| 	<script src="<%=resource%>/luci.js<%# ?v=PKG_VERSION %>"></script> | ||||
| 	<script src="<%=media%>/js/jquery.min.js<%# ?v=PKG_VERSION %>"></script> | ||||
| 	<script type="text/javascript">//<![CDATA[ | ||||
| 		(function () { | ||||
| 	<script src="<%=media%>/js/polyfill.min.js"></script> | ||||
| 	<script src="<%=url('admin/translations', luci.i18n.context.lang)%>?v=2.2.4"></script> | ||||
| 	<script src="<%=resource%>/cbi.js?v=2.2.4"></script> | ||||
| 	<script src="<%=resource%>/luci.js?v=2.2.4"></script> | ||||
| 	<script src="<%=media%>/js/jquery.min.js?v=2.2.4"></script> | ||||
| 		<script type="text/javascript">//<![CDATA[ | ||||
| 	function EF() { return L.dom.create.apply(L.dom, arguments) } | ||||
| 		(function() { | ||||
| 			function get_children(node) { | ||||
| 				var children = []; | ||||
| 
 | ||||
| 				for (var k in node.children) { | ||||
| 					if (!node.children.hasOwnProperty(k)) | ||||
| 						continue; | ||||
| 
 | ||||
| 					if (!node.children[k].satisfied) | ||||
| 						continue; | ||||
| 
 | ||||
| 					if (!node.children[k].hasOwnProperty('title')) | ||||
| 						continue; | ||||
| 
 | ||||
| 					children.push(Object.assign(node.children[k], { name: k })); | ||||
| 				} | ||||
| 
 | ||||
| 				return children.sort(function (a, b) { | ||||
| 				return children.sort(function(a, b) { | ||||
| 					return ((a.order || 1000) - (b.order || 1000)); | ||||
| 				}); | ||||
| 			} | ||||
| 
 | ||||
| 			function render_mainmenu(tree, url, level) { | ||||
| 				var l = (level || 0) + 1, | ||||
| 					ul = E('ul', { 'class': level ? 'slide-menu' : 'nav' }), | ||||
| 					children = get_children(tree); | ||||
| 				    ul = EF('ul', { 'class': level ? 'slide-menu' : 'nav' }), | ||||
| 				    children = get_children(tree); | ||||
| 				if (children.length == 0 || l > 2) | ||||
| 					return E([]); | ||||
| 
 | ||||
| 					return EF([]); | ||||
| 				for (var i = 0; i < children.length; i++) { | ||||
| 					var submenu = render_mainmenu(children[i], url + '/' + children[i].name, l), | ||||
| 						hasChildren = submenu.children.length; | ||||
| 					isLogout = (children[i].name == 'logout'); | ||||
| 					ul.appendChild(E('li', { 'class': hasChildren ? 'slide' : isLogout ? 'lg' : null }, [ | ||||
| 						E('a', { | ||||
| 					    hasChildren = submenu.children.length; | ||||
| 					ul.appendChild(EF('li', { 'class': hasChildren ? 'slide' : null }, [ | ||||
| 						EF('a', { | ||||
| 							'href': hasChildren ? '#' : L.url(url, children[i].name), | ||||
| 							'class': hasChildren ? 'menu' : isLogout ? "logout" : null, | ||||
| 							'data-title': children[i].title.replace(" ", "_"), | ||||
| 						}, [_(children[i].title)]), | ||||
| 							'class': hasChildren ? 'menu' : null, | ||||
| 							'data-title': hasChildren ?  children[i].title.replace(" ", "_") :  children[i].title.replace(" ", "_"), | ||||
| 						}, [ _(children[i].title) ]), | ||||
| 						submenu | ||||
| 					])); | ||||
| 				} | ||||
| 
 | ||||
| 				if (l == 1) { | ||||
| 					var container = document.querySelector('#mainmenu'); | ||||
| 
 | ||||
| 					container.appendChild(ul); | ||||
| 					container.style.display = ''; | ||||
| 				} | ||||
| 
 | ||||
| 				return ul; | ||||
| 			} | ||||
| 
 | ||||
| 			function render_modemenu(tree) { | ||||
| 				var ul = document.querySelector('#modemenu'), | ||||
| 					children = get_children(tree); | ||||
| 
 | ||||
| 				    children = get_children(tree); | ||||
| 				for (var i = 0; i < children.length; i++) { | ||||
| 					var isActive = (L.env.requestpath.length ? children[i].name == L.env.requestpath[0] : i == 0); | ||||
| 
 | ||||
| 					ul.appendChild(E('li', {}, [ | ||||
| 						E('a', { | ||||
| 					ul.appendChild(EF('li', {}, [ | ||||
| 						EF('a', { | ||||
| 							'href': L.url(children[i].name), | ||||
| 							'class': isActive ? 'active' : null | ||||
| 						}, [_(children[i].title)]) | ||||
| 						}, [ _(children[i].title) ]) | ||||
| 					])); | ||||
| 
 | ||||
| 					if (isActive) | ||||
| 						render_mainmenu(children[i], children[i].name); | ||||
| 				} | ||||
| 
 | ||||
| 				if (ul.children.length > 1) | ||||
| 					ul.style.display = ''; | ||||
| 			} | ||||
| 
 | ||||
| 			function render_tabmenu(tree, url, level) { | ||||
| 				var container = document.querySelector('#tabmenu'), | ||||
| 					l = (level || 0) + 1, | ||||
| 					ul = E('ul', { 'class': 'tabs' }), | ||||
| 					children = get_children(tree), | ||||
| 					activeNode = null; | ||||
| 
 | ||||
| 				    l = (level || 0) + 1, | ||||
| 				    ul = EF('ul', { 'class': 'tabs' }), | ||||
| 				    children = get_children(tree), | ||||
| 				    activeNode = null; | ||||
| 				if (children.length == 0) | ||||
| 					return E([]); | ||||
| 
 | ||||
| 					return EF([]); | ||||
| 				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)]) | ||||
| 					    activeClass = isActive ? ' active' : '', | ||||
| 					    className = 'tabmenu-item-%s %s'.format(children[i].name, activeClass); | ||||
| 					ul.appendChild(EF('li', { 'class': className }, [ | ||||
| 						EF('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(render_tabmenu(activeNode, url + '/' + activeNode.name, l)); | ||||
| 
 | ||||
| 				return ul; | ||||
| 			} | ||||
| 
 | ||||
| 			document.addEventListener('luci-loaded', function (ev) { | ||||
| 				var tree = <%= luci.http.write_json(luci.dispatcher.menu_json() or { }) %>, | ||||
| 				node = tree, | ||||
| 				url = ''; | ||||
| 
 | ||||
| 			render_modemenu(tree); | ||||
| 
 | ||||
| 			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]; | ||||
| 			document.addEventListener('luci-loaded', function(ev) { | ||||
| 				var tree = <%= luci.http.write_json(luci.dispatcher.menu_json() or {}) %>, | ||||
| 				    node = tree, | ||||
| 				    url = ''; | ||||
| 				render_modemenu(tree); | ||||
| 				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) | ||||
| 						render_tabmenu(node, url); | ||||
| 				} | ||||
| 
 | ||||
| 				if (node) | ||||
| 					render_tabmenu(node, url); | ||||
| 			} | ||||
| 		}); | ||||
| 		}) (); | ||||
| 			}); | ||||
| 		})(); | ||||
| 	//]]></script> | ||||
| </head> | ||||
| 
 | ||||
|  | @ -209,7 +228,7 @@ | |||
| 	<div class="main"> | ||||
| 		<div class="main-left" id="mainmenu" style="display:none"> | ||||
| 			<div class="sidenav-header d-flex align-items-center"> | ||||
| 				<a class="brand" href="#"><%=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" | ||||
|  | @ -228,7 +247,7 @@ | |||
| 				<div class="fill"> | ||||
| 					<div class="container"> | ||||
| 						<a class="showSide"></a> | ||||
| 						<a class="brand" href="#"><%=boardinfo.hostname or "?"%> ™</a> | ||||
| 						<a class="brand" href="#"><%=brand_name%></a> | ||||
| 						<div class="status" id="indicators"> | ||||
| 						<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> | ||||
|  | @ -244,7 +263,7 @@ | |||
| 					<%- if luci.sys.process.info("uid") == 0 and luci.sys.user.getuser("root") and not luci.sys.user.getpasswd("root") then -%> | ||||
| 					<div class="alert-message error"> | ||||
| 						<h4><%:No password set!%></h4> | ||||
| 						<p><%:There is no password set on this router. Please configure a root password to protect the web interface 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" | ||||
|  |  | |||
|  | @ -1,36 +1,55 @@ | |||
| <%# | ||||
| 	edge is a clean HTML5 theme for LuCI. It is based on luci-theme-material edge Template | ||||
| 	Argon is a clean HTML5 theme for LuCI. It is based on luci-theme-material Argon Template | ||||
| 
 | ||||
| 	luci-theme-edge | ||||
| 	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-edge/issues  | ||||
| 	https://github.com/jerrykuku/luci-theme-argon/issues | ||||
| 
 | ||||
| 	luci-theme-material:  | ||||
| 	luci-theme-material: | ||||
| 	Copyright 2015 Lutty Yang <lutty@wcan.in> | ||||
| 	 | ||||
| 	Agron Theme | ||||
| 	https://demos.creative-tim.com/edge-dashboard/index.html  | ||||
| 
 | ||||
| 	Argon Theme | ||||
| 	https://demos.creative-tim.com/argon-dashboard/index.html | ||||
| 
 | ||||
| 	Licensed to the public under the Apache License 2.0 | ||||
| -%> | ||||
| 
 | ||||
| <% | ||||
|     local sys  = require "luci.sys" | ||||
| 	local sys = require "luci.sys" | ||||
| 	local util = require "luci.util" | ||||
| 	local http = require "luci.http" | ||||
| 	local disp = require "luci.dispatcher" | ||||
| 
 | ||||
| 	local boardinfo = util.ubus("system", "board") | ||||
| 
 | ||||
| 	local node = disp.context.dispatched | ||||
|     local fs	= require "nixio.fs" | ||||
| 
 | ||||
| 	local fs = require "nixio.fs" | ||||
| 	local nutil = require "nixio.util" | ||||
|      | ||||
| 	local uci = require 'luci.model.uci'.cursor() | ||||
| 
 | ||||
| 	-- send as HTML5 | ||||
| 	http.prepare_content("text/html") | ||||
|      | ||||
|     math.randomseed(tonumber(tostring(os.time()):reverse():sub(1, 9))) | ||||
| 
 | ||||
| 	math.randomseed(tonumber(tostring(os.time()):reverse():sub(1, 9))) | ||||
| 
 | ||||
| 	-- Custom settings | ||||
| 	local mode = 'normal' | ||||
| 	local dark_css = fs.readfile('/www/luci-static/argon/css/dark.css') | ||||
| 	local bar_color = '#5e72e4' | ||||
| 	local primary, dark_primary, blur_radius, blur_radius_dark, blur_opacity | ||||
| 	if fs.access('/etc/config/argon') then | ||||
| 		primary = uci:get_first('argon', 'global', 'primary') | ||||
| 		dark_primary = uci:get_first('argon', 'global', 'dark_primary') | ||||
| 		blur_radius = uci:get_first('argon', 'global', 'blur') | ||||
| 		blur_radius_dark = uci:get_first('argon', 'global', 'blur_dark') | ||||
| 		blur_opacity = uci:get_first('argon', 'global', 'transparency') | ||||
| 		blur_opacity_dark = uci:get_first('argon', 'global', 'transparency_dark') | ||||
| 		mode = uci:get_first('argon', 'global', 'mode') | ||||
| 		bar_color = mode == 'dark' and dark_primary or primary | ||||
| 	end | ||||
| -%> | ||||
| <!DOCTYPE html> | ||||
| <html lang="<%=luci.i18n.context.lang%>"> | ||||
|  | @ -49,17 +68,41 @@ | |||
|     <meta name="x5-page-mode" content="app"> | ||||
|     <meta name="browsermode" content="application"> | ||||
|     <meta name="msapplication-tap-highlight" content="no"> | ||||
|     <meta name="msapplication-TileColor" content="#5e72e4"> | ||||
|     <meta name="msapplication-TileColor" content="<%=bar_color%>"> | ||||
|     <meta name="application-name" content="<%=striptags( (boardinfo.hostname or "?") ) %> - LuCI"> | ||||
|     <meta name="apple-mobile-web-app-title" content="<%=striptags( (boardinfo.hostname or "?") ) %> - LuCI"> | ||||
|     <link rel="shortcut icon" type="image/png" href="<%=media%>/icon/favicon.png"> | ||||
|     <link rel="apple-touch-icon" sizes="60x60" href="<%=media%>/icon/apple-icon-60x60.png"> | ||||
|     <link rel="apple-touch-icon" sizes="72x72" href="<%=media%>/icon/apple-icon-72x72.png"> | ||||
|     <link rel="apple-touch-icon" sizes="144x144" href="<%=media%>/icon/apple-icon-144x144.png"> | ||||
|     <link rel="icon" type="image/png" sizes="192x192" href="<%=media%>/icon/android-icon-192x192.png"> | ||||
|     <link rel="icon" type="image/png" sizes="32x32" href="<%=media%>/icon/favicon-32x32.png"> | ||||
|     <link rel="icon" type="image/png" sizes="96x96" href="<%=media%>/icon/favicon-96x96.png"> | ||||
|     <link rel="icon" type="image/png" sizes="16x16" href="<%=media%>/icon/favicon-16x16.png"> | ||||
|     <link rel="manifest" href="<%=media%>/icon/manifest.json"> | ||||
|     <meta name="msapplication-TileColor" content="#5e72e4"> | ||||
|     <meta name="theme-color" content="#5e72e4"> | ||||
|     <meta name="msapplication-TileColor" content="<%=bar_color%>"> | ||||
|     <meta name="msapplication-TileImage" content="<%=media%>/icon/ms-icon-144x144.png"> | ||||
|     <meta name="theme-color" content="<%=bar_color%>"> | ||||
|     <link rel="stylesheet" href="<%=media%>/css/cascade.css?v=<%=math.random(1,100000)%>"> | ||||
|     <% if nixio.fs.access("/etc/dark") then %> | ||||
| 	<link rel="stylesheet" href="<%=media%>/css/dark.css?v=<%=math.random(1,100000)%>"> | ||||
| 	<% end -%> | ||||
|     <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 -%> | ||||
|  | @ -72,10 +115,9 @@ | |||
|     <script src="<%=resource%>/cbi.js<%# ?v=PKG_VERSION %>"></script> | ||||
|     <script src="<%=resource%>/xhr.js<%# ?v=PKG_VERSION %>"></script> | ||||
|     <script src="<%=media%>/js/jquery.min.js<%# ?v=PKG_VERSION %>"></script> | ||||
|      | ||||
| 
 | ||||
| </head> | ||||
| 
 | ||||
| <body | ||||
|     class="lang_<%=luci.i18n.context.lang%> <% if node then %><%= striptags( node.title ) %><% end %> <% if luci.dispatcher.context.authsession then %>logged-in<% end %>" | ||||
|     data-page="<%= table.concat(disp.context.requestpath, "-") %>"> | ||||
|      | ||||
|  | @ -0,0 +1,27 @@ | |||
| <%# | ||||
|  Copyright 2008 Steven Barth <steven@midlink.org> | ||||
|  Copyright 2008-2019 Jo-Philipp Wich <jo@mein.io> | ||||
|  Licensed to the public under the Apache License 2.0. | ||||
| -%> | ||||
| 
 | ||||
| <% | ||||
| 	local is_rollback_pending, rollback_time_remaining, rollback_session, rollback_token = luci.model.uci:rollback_pending() | ||||
| 
 | ||||
| 	if is_rollback_pending or trigger_apply or trigger_revert then | ||||
| %> | ||||
| 	<script type="text/javascript"> | ||||
| 		document.addEventListener("luci-loaded", function() { | ||||
| 			<% if trigger_apply then -%> | ||||
| 				L.ui.changes.apply(true); | ||||
| 			<%- elseif trigger_revert then -%> | ||||
| 				L.ui.changes.revert(); | ||||
| 			<%- else -%> | ||||
| 				L.ui.changes.confirm(true, Date.now() + <%=rollback_time_remaining%> * 1000, <%=luci.http.write_json(rollback_token)%>); | ||||
| 			<%- end %> | ||||
| 		}); | ||||
| 	</script> | ||||
| <% | ||||
| 	end | ||||
| 
 | ||||
| 	include("themes/" .. theme .. "/footer_login") | ||||
| %> | ||||
|  | @ -13,8 +13,8 @@ | |||
| 	local applyconf = luci.config and luci.config.apply | ||||
| %> | ||||
| 
 | ||||
| <script type="text/javascript" src="<%=resource%>/promis.min.js?v=git-20.186.82389-282dbf8"></script> | ||||
| <script type="text/javascript" src="<%=resource%>/luci.js?v=git-20.186.82389-282dbf8"></script> | ||||
| <script type="text/javascript" src="<%=resource%>/promis.min.js"></script> | ||||
| <script type="text/javascript" src="<%=resource%>/luci.js"></script> | ||||
| <script type="text/javascript"> | ||||
| 	L = new LuCI(<%= luci.http.write_json({ | ||||
| 		token          = token, | ||||
|  | @ -29,7 +29,7 @@ | |||
| 		ubuspath       = luci.config.main.ubuspath or '/ubus/', | ||||
| 		sessionid      = luci.dispatcher.context.authsession, | ||||
| 		nodespec       = luci.dispatcher.context.dispatched, | ||||
| 		apply_rollback = math.max(applyconf and applyconf.rollback or 30, 30), | ||||
| 		apply_rollback = math.max(applyconf and applyconf.rollback or 90, 90), | ||||
| 		apply_holdoff  = math.max(applyconf and applyconf.holdoff or 4, 1), | ||||
| 		apply_timeout  = math.max(applyconf and applyconf.timeout or 5, 1), | ||||
| 		apply_display  = math.max(applyconf and applyconf.display or 1.5, 1), | ||||
|  |  | |||
|  | @ -14,18 +14,18 @@ | |||
| 
 | ||||
| 	MUI: | ||||
| 	https://github.com/muicss/mui | ||||
| 	 | ||||
| 	Agron Theme | ||||
| 
 | ||||
| 	Argon Theme | ||||
| 	https://demos.creative-tim.com/argon-dashboard/index.html | ||||
| 
 | ||||
| 	Licensed to the public under the Apache License 2.0 | ||||
| -%> | ||||
| 
 | ||||
| <%+header_login%> | ||||
| <%+themes/argon/out_header_login%> | ||||
| <% | ||||
| 	local util = require "luci.util" | ||||
| 	local boardinfo = util.ubus("system", "board") | ||||
| 	local fs	= require "nixio.fs" | ||||
| 	local fs = require "nixio.fs" | ||||
| 	local nutil = require "nixio.util" | ||||
| 
 | ||||
| 	function glob(...) | ||||
|  | @ -60,7 +60,7 @@ | |||
| 	end | ||||
| 
 | ||||
| 	if bgcount > 0 then | ||||
| 		currentBg =  bgs[math.random(1,bgcount)] | ||||
| 		currentBg = bgs[math.random(1,bgcount)] | ||||
| 	end | ||||
| %> | ||||
| <div class="login-page"> | ||||
|  | @ -82,25 +82,23 @@ | |||
| 			} | ||||
| 		}) | ||||
| 	</script> | ||||
| 	<% else %> | ||||
| 	<div class="main-bg" id="main-bg"  | ||||
| 	<% | ||||
| 	<% else  | ||||
| 	local bg_url = media .. "/img/bg1.jpg" | ||||
| 	local bing = "123" | ||||
| 	if (bgcount == 0 ) then | ||||
| 		local http = require "luci.sys" | ||||
| 		local sys = require "luci.sys" | ||||
| 		local json = require "luci.jsonc" | ||||
| 		local bg_url = media .. "/img/bg1.jpg" | ||||
| 		local bing = http.httpget("http://www.bing.com/HPImageArchive.aspx?format=js&idx=0&n=1&mkt=en-US") | ||||
| 		local remote_bg_url="http://www.bing.com/HPImageArchive.aspx?format=js&idx=0&n=1&mkt=en-US" | ||||
| 		--bing = sys.httpget(remote_bg_url) | ||||
| 		bing = sys.exec("wget --timeout=0.5 -qO- '%s'" %remote_bg_url) | ||||
| 		if (bing and bing ~= '') then | ||||
| 			local bingjson  = json.parse(bing) | ||||
| 			bg_url = "https://www.bing.com" .. bingjson.images[1].url | ||||
| 			bg_url = "https://www.bing.com" .. json.parse(bing).images[1].url | ||||
| 		end | ||||
| 	elseif (bgcount > 0 and currentBg["type"] ~= "mp4") then | ||||
| 		bg_url = currentBg.url | ||||
| 	end | ||||
| 	%> | ||||
| 		style="background-image:url(<%=bg_url%>)" | ||||
| 	<% elseif  (bgcount > 0 and currentBg["type"] ~= "mp4") then %> | ||||
| 		style="background-image:url(<%=currentBg.url%>)" | ||||
| 	<% end  %> | ||||
| 	></div> | ||||
| 	 | ||||
| 	<div class="main-bg" id="main-bg" style="background-image:url(<%=bg_url%>)"></div> | ||||
| 	<% end %> | ||||
| 	<div class="login-container"> | ||||
| 		<div class="login-form"> | ||||
|  | @ -156,4 +154,4 @@ | |||
| 				} | ||||
| 			//]]></script> | ||||
| 			<% end %> | ||||
| <%+footer%> | ||||
| <%+themes/argon/out_footer_login%> | ||||
|  |  | |||
|  | @ -1,9 +1,12 @@ | |||
| #!/bin/sh | ||||
| uci batch <<-EOF | ||||
| 	set luci.themes.Argon=/luci-static/argon | ||||
| 	commit luci | ||||
| EOF | ||||
| [ -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 | ||||
| 
 | ||||
| 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 | ||||
|  |  | |||