mirror of
https://github.com/derisamedia/luci-theme-alpha.git
synced 2025-01-07 03:06:42 +08:00
Merge pull request #23 from animegasan/master
Add iStore and Fix Logout
This commit is contained in:
commit
5154da69bc
4
Makefile
4
Makefile
@ -10,7 +10,7 @@ THEME_NAME:=alpha
|
||||
THEME_TITLE:=Alpha
|
||||
|
||||
PKG_NAME:=luci-theme-$(THEME_NAME)
|
||||
PKG_VERSION:=3.9.2-beta
|
||||
PKG_VERSION:=3.9.4-beta
|
||||
PKG_RELEASE:=9
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
@ -40,6 +40,8 @@ define Package/luci-theme-$(THEME_NAME)/install
|
||||
$(CP) -a ./template/* $(1)/usr/lib/lua/luci/view/themes/$(THEME_NAME)/ 2>/dev/null || true
|
||||
$(INSTALL_DIR) $(1)/www/luci-static/resources
|
||||
$(CP) -a ./js/* $(1)/www/luci-static/resources/ 2>/dev/null || true
|
||||
$(INSTALL_DIR) $(1)/etc/config
|
||||
$(CP) -a ./root/etc/config/* $(1)/etc/config/ 2>/dev/null || true
|
||||
endef
|
||||
|
||||
define Package/luci-theme-$(THEME_NAME)/postinst
|
||||
|
@ -688,9 +688,7 @@
|
||||
float: left;
|
||||
text-align: center;
|
||||
padding: 8px 0;
|
||||
width: calc(100% / 6);
|
||||
text-decoration: none;
|
||||
max-width: 100px;
|
||||
}
|
||||
|
||||
.navbar a img {
|
||||
@ -827,7 +825,7 @@
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.main>.main-left>.nav>li:last-child {
|
||||
.main>.main-left>.nav>li>[data-title="Logout"] {
|
||||
display: flex;
|
||||
padding: 0.5rem 1rem;
|
||||
}
|
||||
@ -837,7 +835,8 @@
|
||||
color: #cbcbcb;
|
||||
}
|
||||
|
||||
.main>.main-left>.nav>li>[data-title="Logout"] {
|
||||
.main>.main-left>.nav>li>[data-title="Logout"],
|
||||
.main>.main-left>.nav>li>[data-title="iStore"] {
|
||||
font-size: 1rem;
|
||||
color: #fff;
|
||||
}
|
||||
@ -852,6 +851,7 @@
|
||||
|
||||
.main>.main-left>.nav>.slide>.menu,
|
||||
.main>.main-left>.nav>li>[data-title="Logout"],
|
||||
.main>.main-left>.nav>li>[data-title="iStore"],
|
||||
.main>.main-left>.nav>li>[data-title="Dashboard"] {
|
||||
font-size: 1rem;
|
||||
font-weight: 500;
|
||||
@ -957,6 +957,16 @@
|
||||
background-size: 25px;
|
||||
}
|
||||
|
||||
.main>.main-left>.nav>li>[data-title="iStore"]:before {
|
||||
position: absolute;
|
||||
right: 14px;
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
content: "";
|
||||
background: url(./icon/sidebar-icon/istore.svg) no-repeat;
|
||||
background-size: 25px;
|
||||
}
|
||||
|
||||
/* End Sidebar */
|
||||
|
||||
.modemenu-buttons {
|
||||
@ -1032,7 +1042,7 @@
|
||||
transition: transform 0.2s ease-in-out;
|
||||
}
|
||||
|
||||
.main>.main-left>.nav>li:last-child::before {
|
||||
.main>.main-left>.nav>li>[data-title="Logout"]::before {
|
||||
position: absolute;
|
||||
right: 14px;
|
||||
width: 25px;
|
||||
@ -1062,7 +1072,8 @@
|
||||
|
||||
.main>.main-left>.nav>.slide>.menu,
|
||||
.main>.main-left>.nav>.slide>.slide-menu>li,
|
||||
.main>.main-left>.nav>li:last-child {
|
||||
.main>.main-left>.nav>li>[data-title="Logout"],
|
||||
.main>.main-left>.nav>li>[data-title="iStore"] {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
transform: translate3d(0, 0, 0);
|
||||
@ -1070,7 +1081,8 @@
|
||||
|
||||
.main>.main-left>.nav>.slide>.menu::after,
|
||||
.main>.main-left>.nav>.slide>.slide-menu>li::after,
|
||||
.main>.main-left>.nav>li:last-child::after {
|
||||
.main>.main-left>.nav>li>[data-title="Logout"]::after,
|
||||
.main>.main-left>.nav>li>[data-title="iStore"]::after {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
@ -1089,7 +1101,8 @@
|
||||
|
||||
.main>.main-left>.nav>.slide>.menu:active::after,
|
||||
.main>.main-left>.nav>.slide>.slide-menu>li:active::after,
|
||||
.main>.main-left>.nav>li:last-child:active::after {
|
||||
.main>.main-left>.nav>li>[data-title="Logout"]:active::after,
|
||||
.main>.main-left>.nav>li>[data-title="iStore"]:active::after {
|
||||
transition: 0s;
|
||||
transform: scale(0, 0);
|
||||
opacity: 0.2;
|
||||
@ -3117,7 +3130,8 @@
|
||||
.main>.main-left>.nav>li,
|
||||
.main>.main-left>.nav>li a,
|
||||
.main>.main-left>.nav>.slide>.menu,
|
||||
.main>.main-left>.nav>li>[data-title="Logout"] {
|
||||
.main>.main-left>.nav>li>[data-title="Logout"],
|
||||
.main>.main-left>.nav>li>[data-title="iStore"] {
|
||||
font-size: 1rem;
|
||||
color: #fff;
|
||||
}
|
||||
@ -3389,7 +3403,8 @@
|
||||
}
|
||||
|
||||
.main>.main-left>.nav>.slide>.menu,
|
||||
.main>.main-left>.nav>li>[data-title="Logout"] {
|
||||
.main>.main-left>.nav>li>[data-title="Logout"],
|
||||
.main>.main-left>.nav>li>[data-title="iStore"] {
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
|
||||
@ -3590,4 +3605,4 @@
|
||||
::-webkit-scrollbar-thumb:active {
|
||||
background: #424242;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
BIN
luasrc/gaya/icon/navbar/neko.png
Normal file
BIN
luasrc/gaya/icon/navbar/neko.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 28 KiB |
12
luasrc/gaya/icon/sidebar-icon/istore.svg
Normal file
12
luasrc/gaya/icon/sidebar-icon/istore.svg
Normal file
@ -0,0 +1,12 @@
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Transformed by: SVG Repo Mixer Tools -->
|
||||
<svg fill="#fff" width="800px" height="800px" viewBox="0 0 1024 1024" t="1569683928793" class="icon" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="15091" xmlns:xlink="http://www.w3.org/1999/xlink" transform="matrix(-1, 0, 0, 1, 0, 0)" stroke="#fff">
|
||||
<g id="SVGRepo_bgCarrier" stroke-width="0"/>
|
||||
<g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<g id="SVGRepo_iconCarrier">
|
||||
<defs>
|
||||
<style type="text/css"/>
|
||||
</defs>
|
||||
<path d="M464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16z m-52 268H212V212h200v200zM864 144H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16z m-52 268H612V212h200v200zM864 544H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16z m-52 268H612V612h200v200zM424 712H296V584c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v128H104c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h128v128c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V776h128c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z" p-id="15092"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.2 KiB |
10
root/etc/config/alpha
Normal file
10
root/etc/config/alpha
Normal file
@ -0,0 +1,10 @@
|
||||
|
||||
config alpha 'config'
|
||||
option nav_01 '/cgi-bin/luci/admin/status/overview'
|
||||
option nav_02 '/cgi-bin/luci/admin/services/ttyd'
|
||||
option nav_03 '/cgi-bin/luci/admin/services/openclash'
|
||||
option nav_04 '/cgi-bin/luci/admin/nas/tinyfm'
|
||||
option nav_05 '/cgi-bin/luci/admin/modem/main'
|
||||
option nav_06 '/cgi-bin/luci/admin/network/network'
|
||||
option blur '20'
|
||||
option color '#2222359a'
|
@ -17,49 +17,92 @@
|
||||
|
||||
Licensed to the public under the Apache License 2.0
|
||||
-%>
|
||||
<%
|
||||
local ver = require "luci.version"
|
||||
local uci = require "luci.model.uci".cursor()
|
||||
local config = uci:get_all("alpha", "config")
|
||||
local icon = {
|
||||
['/cgi-bin/luci/admin/status/overview'] = '/gaya/icon/navbar/status.png',
|
||||
['/cgi-bin/luci/admin/services/ttyd'] = '/gaya/icon/navbar/terminal.png',
|
||||
['/cgi-bin/luci/admin/services/openclash'] = '/gaya/icon/navbar/oc.png',
|
||||
['/cgi-bin/luci/admin/nas/tinyfm'] = '/gaya/icon/navbar/nas.png',
|
||||
['/cgi-bin/luci/admin/modem/main'] = '/gaya/icon/navbar/modem.png',
|
||||
['/cgi-bin/luci/admin/network/network'] = '/gaya/icon/navbar/interface.png',
|
||||
['/cgi-bin/luci/admin/services/neko'] = '/gaya/icon/navbar/neko.png'
|
||||
}
|
||||
|
||||
<% local ver = require "luci.version" %>
|
||||
</div>
|
||||
|
||||
<footer class="mobile">
|
||||
<a href="https://github.com/derisamedia/luci-theme-alpha"><%= ver.luciname %> | <%= ver.luciversion %> | Alpha OS Theme v3.9</a>
|
||||
</footer>
|
||||
</div>
|
||||
<div class="navbar active">
|
||||
<div class="dropdown">
|
||||
|
||||
<a href="/cgi-bin/luci/admin/status/overview"><img src="<%=media%>/gaya/icon/navbar/status.png" /></a>
|
||||
<a href="/cgi-bin/luci/admin/services/ttyd"><img src="<%=media%>/gaya/icon/navbar/terminal.png" /></a>
|
||||
<a href="/cgi-bin/luci/admin/services/openclash"><img src="<%=media%>/gaya/icon/navbar/oc.png" /></a>
|
||||
<a href="/cgi-bin/luci/admin/nas/tinyfm"><img src="<%=media%>/gaya/icon/navbar/nas.png" /></a>
|
||||
<a href="/cgi-bin/luci/admin/modem/main"><img src="<%=media%>/gaya/icon/navbar/modem.png" /></a>
|
||||
<a href="/cgi-bin/luci/admin/network/network"><img src="<%=media%>/gaya/icon/navbar/interface.png" /></a>
|
||||
local function getLink(nav)
|
||||
local link = config[nav]
|
||||
return (link and link ~= "none") and link or nil
|
||||
end
|
||||
|
||||
</div>
|
||||
<label class="toggler">
|
||||
<img src="<%=media%>/gaya/icon/arrow.svg" alt="">
|
||||
</label>
|
||||
local num_links = 0
|
||||
for i = 1, 6 do
|
||||
local nav_key = 'nav_0' .. i
|
||||
local link = getLink(nav_key)
|
||||
if link then
|
||||
num_links = num_links + 1
|
||||
end
|
||||
end
|
||||
|
||||
local link_width = string.format("calc(100%% / %d)", num_links)
|
||||
local blur_value = tonumber(config.blur)
|
||||
local link_blur = string.format("blur(%dpx)", blur_value)
|
||||
local background_color = config.color
|
||||
%>
|
||||
|
||||
<style>
|
||||
.main>.main-left, .cbi-section, .cbi-section-error, #iptables, .Firewall form, #cbi-network>.cbi-section-node, #cbi-wireless>.cbi-section-node, #cbi-wireless>#wifi_assoclist_table, [data-tab-title], [data-page^="admin-system-admin"]:not(.node-main-login) .cbi-map:not(#cbi-dropbear), [data-page="admin-system-opkg"] #maincontent>.container, .tabs, .cbi-tabmenu, .cbi-tooltip {
|
||||
background-color: <%=background_color%>;
|
||||
backdrop-filter: <%=link_blur%>;
|
||||
-webkit-backdrop-filter: <%=link_blur%>;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 720px) {
|
||||
.navbar a {
|
||||
width: <%=link_width%>;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
</div>
|
||||
<footer class="mobile">
|
||||
<a href="https://github.com/derisamedia/luci-theme-alpha"><%=ver.luciname%> | <%=ver.luciversion%> | Alpha OS Theme v3.9</a>
|
||||
</footer>
|
||||
</div>
|
||||
<div class="navbar active">
|
||||
<div class="dropdown">
|
||||
<% for i = 1, 6 do
|
||||
local nav_key = 'nav_0' .. i
|
||||
local link = getLink(nav_key)
|
||||
if link then %>
|
||||
<a href="<%=link%>">
|
||||
<img src="<%=media%><%=icon[link]%>" />
|
||||
</a>
|
||||
<% end
|
||||
end %>
|
||||
</div>
|
||||
<label class="toggler">
|
||||
<img src="<%=media%>/gaya/icon/arrow.svg">
|
||||
</label>
|
||||
</div>
|
||||
<script>
|
||||
{
|
||||
const nav = document.querySelector(".navbar");
|
||||
let lastScrollY = window.scrollY;
|
||||
|
||||
window.addEventListener("scroll", () => {
|
||||
if (lastScrollY < window.scrollY) {
|
||||
nav.classList.add("navbar--hidden");
|
||||
} else {
|
||||
nav.classList.remove("navbar--hidden");
|
||||
}
|
||||
|
||||
lastScrollY = window.scrollY;
|
||||
});
|
||||
{
|
||||
const nav = document.querySelector(".navbar");
|
||||
let lastScrollY = window.scrollY;
|
||||
window.addEventListener("scroll", () => {
|
||||
if (lastScrollY < window.scrollY) {
|
||||
nav.classList.add("navbar--hidden");
|
||||
}
|
||||
else {
|
||||
nav.classList.remove("navbar--hidden");
|
||||
}
|
||||
lastScrollY = window.scrollY;
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">L.require('menu-alpha')</script>
|
||||
<script src="<%=media%>/app.js"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
Reference in New Issue
Block a user