mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-10-26 23:32:51 +08:00
🤞 Sync 2026-03-16 20:29:27
This commit is contained in:
1 parent
84bdc6917f
commit
97f5d8e7ee
4 files changed
+284
-3
No files matched your search
@@ -10,8 +10,8 @@ THEME_NAME:=alpha
|
||||
THEME_TITLE:=Alpha
|
||||
|
||||
PKG_NAME:=luci-theme-$(THEME_NAME)
|
||||
PKG_VERSION:=3.9.5-beta
|
||||
PKG_RELEASE:=1
|
||||
PKG_VERSION:=3.9.6_beta
|
||||
PKG_RELEASE:=2
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
@@ -36,8 +36,15 @@ define Package/luci-theme-$(THEME_NAME)/install
|
||||
echo "uci set luci.themes.$(THEME_TITLE)=/luci-static/$(THEME_NAME); uci commit luci" > $(1)/etc/uci-defaults/30-luci-theme-$(THEME_NAME)
|
||||
$(INSTALL_DIR) $(1)/www/luci-static/$(THEME_NAME)
|
||||
$(CP) -a ./luasrc/* $(1)/www/luci-static/$(THEME_NAME)/ 2>/dev/null || true
|
||||
|
||||
# Install HTML templates for OpenWrt 23.xx and older (Lua)
|
||||
$(INSTALL_DIR) $(1)/usr/lib/lua/luci/view/themes/$(THEME_NAME)
|
||||
$(CP) -a ./template/* $(1)/usr/lib/lua/luci/view/themes/$(THEME_NAME)/ 2>/dev/null || true
|
||||
$(CP) -a ./template/*.htm $(1)/usr/lib/lua/luci/view/themes/$(THEME_NAME)/ 2>/dev/null || true
|
||||
|
||||
# Install Ucode templates for OpenWrt 24.xx / 25.xx and newer (ucode)
|
||||
$(INSTALL_DIR) $(1)/usr/share/ucode/luci/template/themes/$(THEME_NAME)
|
||||
$(CP) -a ./template/*.ut $(1)/usr/share/ucode/luci/template/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
|
||||
|
||||
@@ -0,0 +1,102 @@
|
||||
{#
|
||||
Alpha os is made from me for all .. especially for indo wrt members and fan of OpenWrt or DBAI Community
|
||||
luci-theme-alpha
|
||||
Copyright 2024 derisamedia <facebook.com/derisamedia>
|
||||
-#}
|
||||
{%
|
||||
import { cursor } from 'uci';
|
||||
let uci = cursor();
|
||||
let config = uci.get_all("alpha", "theme") || {};
|
||||
let icon = {};
|
||||
|
||||
uci.foreach("alpha", "navbar", function(section) {
|
||||
let address = section.address;
|
||||
let icon_url = section.icon;
|
||||
if (address && icon_url) {
|
||||
icon_url = replace(icon_url, /^\/www\/luci\-static\/alpha\//, "");
|
||||
icon[address] = icon_url;
|
||||
}
|
||||
});
|
||||
|
||||
let navbar_enabled = (config.navbar == "1");
|
||||
let num_links = 0;
|
||||
uci.foreach("alpha", "navbar", function(section) {
|
||||
if (section.enable == "Enable") {
|
||||
num_links++;
|
||||
}
|
||||
});
|
||||
|
||||
let link_width = `calc(100% / ${num_links})`;
|
||||
let background_color = config.color || '#2222359a';
|
||||
let blur_value = config.blur || 20;
|
||||
let link_blur = `blur(${blur_value}px)`;
|
||||
%}
|
||||
|
||||
<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 }};
|
||||
}
|
||||
}
|
||||
|
||||
{% if (!navbar_enabled): %}
|
||||
.navbar {
|
||||
display: none;
|
||||
}
|
||||
{% endif %}
|
||||
</style>
|
||||
|
||||
</div>
|
||||
<footer class="mobile">
|
||||
<a href="https://github.com/derisamedia/luci-theme-alpha">{{ version.luciname }} | Alpha OS Theme v3.9.5</a>
|
||||
</footer>
|
||||
</div>
|
||||
<div class="navbar active">
|
||||
{% if (navbar_enabled): %}
|
||||
<div class="dropdown">
|
||||
{%
|
||||
uci.foreach("alpha", "navbar", function(section) {
|
||||
let address = section.address;
|
||||
let icon_url = icon[address] || 'default/icon.png';
|
||||
let target_blank = (section.newtab == "Yes") ? 'target="_blank"' : '';
|
||||
|
||||
if (section.enable == "Enable") {
|
||||
%}
|
||||
<a href="{{ address }}" {{ target_blank }}>
|
||||
<img src="{{ media }}/{{ icon_url }}" />
|
||||
</a>
|
||||
{%
|
||||
}
|
||||
});
|
||||
%}
|
||||
</div>
|
||||
{% endif %}
|
||||
<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;
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
<script type="text/javascript">L.require('menu-alpha')</script>
|
||||
<script src="{{ media }}/app.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,92 @@
|
||||
{#
|
||||
Alpha os is made from me for all .. especially for indo wrt members and fan of OpenWrt or DBAI Community
|
||||
luci-theme-alpha
|
||||
Copyright 2022 derisamedia <facebook.com/derisamedia>
|
||||
-#}
|
||||
{%
|
||||
import { getuid, getspnam } from 'luci.core';
|
||||
|
||||
const boardinfo = ubus.call('system', 'board') || {};
|
||||
|
||||
http.prepare_content("text/html; charset=UTF-8");
|
||||
-%}
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ dispatcher.lang }}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport"/>
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="mobile-web-app-capable" content="yes">
|
||||
<meta name="theme-color" content="#09c">
|
||||
<meta name="msapplication-tap-highlight" content="no">
|
||||
<meta name="msapplication-TileColor" content="#09c">
|
||||
<meta name="application-name" content="{{ striptags(boardinfo.hostname ?? "?") }} - LuCI">
|
||||
<meta name="apple-mobile-web-app-title" content="{{ striptags(boardinfo.hostname ?? "?") }} - LuCI">
|
||||
<link rel="stylesheet" href="{{ media }}/gaya/gaya.css">
|
||||
<link rel="shortcut icon" href="{{ media }}/favicon.ico">
|
||||
{% if (node?.css): %}
|
||||
<link rel="stylesheet" href="{{ resource }}/{{ node.css }}">
|
||||
{% endif %}
|
||||
<script src="{{ dispatcher.build_url('admin/translations', dispatcher.lang) }}"></script>
|
||||
<script src="{{ resource }}/cbi.js"></script>
|
||||
<title>{{ striptags(`${boardinfo.hostname ?? '?'}${dispatched?.title ? ` - ${_(dispatched.title)}` : ''}`) }} - LuCI</title>
|
||||
{% if (css): %}
|
||||
<style title="text/css">
|
||||
{{ css }}
|
||||
</style>
|
||||
{% endif %}
|
||||
</head>
|
||||
<body class="lang_{{ dispatcher.lang }} {% if (ctx.authsession): %}logged-in{% endif %} {% if (length(ctx.request_path) > 0): %}node-{{ join('-', ctx.request_path) }}{% else %}node-main-login{% endif %}" data-page="{{ entityencode(join('-', ctx.request_path), true) }}" style="background-image:url('/luci-static/alpha/background/dashboard.png')">
|
||||
<header>
|
||||
<div class="fill">
|
||||
<div class="container">
|
||||
<a id="logo" href="{% if (ctx.authsession): %}{{ dispatcher.build_url('admin/status/overview') }}{% else %}#{% endif %}">
|
||||
<img src="{{ media }}/brand.png" alt="OpenWrt">
|
||||
</a>
|
||||
<div class="status" id="indicators"></div>
|
||||
<div class="logout" >
|
||||
<a href="/cgi-bin/luci/admin/logout" data-title="Logout">Keluar</a>
|
||||
</div>
|
||||
<div class="showSide">
|
||||
<img src="{{ media }}/gaya/icon/menu_icon.svg" alt="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<div class="main">
|
||||
<div style="" class="loading"><span><div class="loading-img"></div></span></div>
|
||||
<div class="main-left" id="mainmenu" style="display:none"></div>
|
||||
<div class="main-right">
|
||||
<div class="modemenu-buttons" style="display:none">
|
||||
<ul id="modemenu"></ul>
|
||||
</div>
|
||||
<div class="darkMask"></div>
|
||||
<div id="maincontent">
|
||||
<div class="container">
|
||||
{% if (getuid() == 0 && getspnam('root')?.pwdp === '' && join('-', ctx.request_path) != "admin-system-admin-password"): %}
|
||||
<div class="alert-message warning">
|
||||
<h4>{{ _('No password set!') }}</h4>
|
||||
<p>{{ _('There is no password set on this router. Please configure a root password to protect the web interface.') }}</p>
|
||||
{% if (dispatcher.lookup("admin/system/admin")): %}
|
||||
<div class="right"><a class="btn" href="{{ dispatcher.build_url("admin/system/admin") }}">{{ _('Go to password configuration...') }}</a></div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if (boardinfo.rootfs_type == "initramfs"): %}
|
||||
<div class="alert-message warning">
|
||||
<h4>{{ _('System running in recovery (initramfs) mode.') }}</h4>
|
||||
<p>{{ _('No changes to settings will be stored and are lost after rebooting. This mode should only be used to install a firmware upgrade') }}</p>
|
||||
{% if (dispatcher.lookup("admin/system/flash")): %}
|
||||
<div class="right"><a class="btn" href="{{ dispatcher.build_url("admin/system/flash") }}">{{ _('Go to firmware upgrade...') }}</a></div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<noscript>
|
||||
<div class="alert-message warning">
|
||||
<h4>{{ _('JavaScript required!') }}</h4>
|
||||
<p>{{ _('You must enable JavaScript in your browser or LuCI will not work properly.') }}</p>
|
||||
</div>
|
||||
</noscript>
|
||||
<div id="tabmenu" style="display:none"></div>
|
||||
@@ -0,0 +1,80 @@
|
||||
<!DOCTYPE html>
|
||||
<!-- saved from url=(0014)about:internet -->
|
||||
<html lang="{{ dispatcher.lang }}">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
|
||||
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="mobile-web-app-capable" content="yes">
|
||||
<meta name="theme-color" content="#09c">
|
||||
<meta name="msapplication-tap-highlight" content="no">
|
||||
<meta name="msapplication-TileColor" content="#09c">
|
||||
<meta name="application-name" content="Alpha - LuCI">
|
||||
<meta name="apple-mobile-web-app-title" content="Alpha - LuCI">
|
||||
<link rel="stylesheet" href="/luci-static/alpha/style/style.css">
|
||||
<link rel="shortcut icon" href="/luci-static/alpha/favicon.ico">
|
||||
<script src="{{ dispatcher.build_url('admin/translations', dispatcher.lang) }}"></script>
|
||||
<script src="{{ resource }}/cbi.js"></script>
|
||||
|
||||
<title>Alpha - Login</title>
|
||||
</head>
|
||||
|
||||
<body class="lang_{{ dispatcher.lang }} node-main-login" data-page="" style="background-image:url('/luci-static/alpha/background/login.png')">
|
||||
<header>
|
||||
<div class="fill">
|
||||
<div class="container">
|
||||
<span class="showSide"></span>
|
||||
<img class="tengah" src="/luci-static/alpha/style/brand.png" />
|
||||
<img class="bawah" src="/luci-static/alpha/style/openwrt20thanniversary.png" />
|
||||
<span class="status" id="indicators"></span>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<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({"apply_rollback":90,"resource":"{{ resource }}","media":"{{ media }}","documentroot":"\/www","pollinterval":5,"apply_display":1.5,"requestpath":[],"ubuspath":"\/ubus\/","scriptname":"\/cgi-bin\/luci","dispatchpath":[],"apply_timeout":5,"apply_holdoff":4,"nodespec":{"satisfied":true,"action":{"type":"template","path":"admin_status\/index"},"order":1,"depends":{"acl":["luci-mod-status-index"]},"title":"Overview"}});
|
||||
</script>
|
||||
<div class="cbi-map"></div>
|
||||
<form method="post">
|
||||
<div class='box'>
|
||||
<div class='box-form'>
|
||||
<div class='box-login'>
|
||||
<label class='checkbox'>
|
||||
{% if (fuser): %}
|
||||
<div class="alert-message warning">
|
||||
<p>{{ _('Wrong Password. Try Again.') }}</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
</label>
|
||||
<div class='fieldset-body' id='login_form'>
|
||||
<p class='field'>
|
||||
<label for='user'>
|
||||
<label class="cbi-value-title" for="luci_username">Username</label>
|
||||
<input type="text" name="luci_username" id="luci_username" autocomplete="username" value="{{ entityencode(duser ?? 'root', true) }}" />
|
||||
</label>
|
||||
<span id='valida' class='i i-warning'></span>
|
||||
</p>
|
||||
<p class='field'>
|
||||
<label for='pass'>
|
||||
<label class="cbi-value-title" for="luci_password">Password</label>
|
||||
<div class="cbi-value-field">
|
||||
<input type="password" name="luci_password" id="luci_password" autocomplete="current-password"/>
|
||||
</div></label>
|
||||
<span id='valida' class='i i-close'></span>
|
||||
</p>
|
||||
|
||||
<label class='checkbox'>
|
||||
Please Enter Username & Password.
|
||||
</label>
|
||||
|
||||
<input type='submit' id='do_login' value='LOGIN' title='Login' />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
Reference in new issue
Block a user