-
Notifications
You must be signed in to change notification settings - Fork 784
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
分离script.js为menu-argon.js和styles-argon.js,这也将改进一些基于script处理主题风格的效率, 如 软件包[Software] 中 空闲空间[Free space] 的占用指示条; 合并master的footer.htm,header_login.htm,out_header_login.htm; 修复资源版本号
- Loading branch information
1 parent
5bd4a5e
commit a7e51bd
Showing
6 changed files
with
235 additions
and
257 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
/** | ||
* 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; | ||
} | ||
}); | ||
} | ||
}); | ||
|
||
/** | ||
* Sidebar expand | ||
*/ | ||
var showSide = false; | ||
$(".showSide").click(function () { | ||
if (showSide) { | ||
$(".darkMask").stop(true).fadeOut("fast"); | ||
$(".main-left").width(0); | ||
$(".main-right").css("overflow-y", "auto"); | ||
showSide = false; | ||
} else { | ||
$(".darkMask").stop(true).fadeIn("fast"); | ||
$(".main-left").width("15rem"); | ||
$(".main-right").css("overflow-y", "hidden"); | ||
showSide = true; | ||
} | ||
}); | ||
|
||
$(".darkMask").click(function () { | ||
if (showSide) { | ||
showSide = false; | ||
$(".darkMask").stop(true).fadeOut("fast"); | ||
$(".main-left").width(0); | ||
$(".main-right").css("overflow-y", "auto"); | ||
} | ||
}); | ||
|
||
$(window).resize(function () { | ||
if ($(window).width() > 921) { | ||
$(".main-left").css("width", ""); | ||
$(".darkMask").stop(true); | ||
$(".darkMask").css("display", "none"); | ||
showSide = false; | ||
} | ||
}); | ||
|
||
/** | ||
* fix legend position | ||
*/ | ||
$("legend").each(function () { | ||
var that = $(this); | ||
that.after("<span class='panel-title'>" + that.text() + "</span>"); | ||
}); | ||
|
||
$(".cbi-section-table-titles, .cbi-section-table-descr, .cbi-section-descr").each(function () { | ||
var that = $(this); | ||
if (that.text().trim() == "") { | ||
that.css("padding", "0px"); | ||
} | ||
}); | ||
|
||
$(".node-main-login > .main .cbi-value.cbi-value-last .cbi-input-text").focus(function () { | ||
//$(".node-main-login > .main > .main-right > .login-bg").addClass("blur"); | ||
}); | ||
$(".node-main-login > .main .cbi-value.cbi-value-last .cbi-input-text").blur(function () { | ||
//$(".node-main-login > .main > .main-right > .login-bg").removeClass("blur"); | ||
}); | ||
|
||
$(".main-right").focus(); | ||
$(".main-right").blur(); | ||
$("input").attr("size", "0"); | ||
|
||
})(jQuery); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,33 @@ | ||
<%# | ||
Argon is a clean HTML5 theme for LuCI. It is based on luci-theme-material and Argon Template | ||
Argon is a clean HTML5 theme for LuCI. It is based on luci-theme-material Argon Template | ||
|
||
luci-theme-argon | ||
Copyright 2019 Jerrykuku <jerrykuku@qq.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> | ||
|
||
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">Powered by <%= ver.luciname %> | ||
(<%= ver.luciversion %>)</a> / | ||
<a href="https://github.com/jerrykuku/luci-theme-argon">ArgonTheme <%# vPKG_VERSION %></a> / | ||
<%= ver.distversion %> | ||
<% if #categories > 1 then %> | ||
<ul class="breadcrumb pull-right" id="modemenu"> | ||
<% for i, r in ipairs(categories) do %> | ||
<li<% if request[1] == r then %> class="active" <%end%>><a | ||
href="<%=controller%>/<%=r%>/"><%=striptags(translate(tree.nodes[r].title))%></a> <span | ||
class="divider">|</span></li> | ||
<% end %> | ||
</ul> | ||
<% end %> | ||
<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 src="<%=media%>/js/styles-argon.js<%# ?v=PKG_VERSION %>"></script> | ||
</body> | ||
</html> | ||
</html> |
Oops, something went wrong.