luci-theme-bootstrap-blue: add new themes from Lienol

This commit is contained in:
Teaffanie 2020-09-14 11:18:38 +08:00 committed by GitHub
parent 6b4b54a9a8
commit 448fa89619
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
18 changed files with 3653 additions and 0 deletions

View File

@ -0,0 +1,15 @@
# Copyright (C) 2020 Lienol <lawlienol@gmail.com>
#
# This is free software, licensed under the GNU General Public License v3.
#
include $(TOPDIR)/rules.mk
LUCI_TITLE:=Bootstrap Blue Theme By Lienol
LUCI_DEPENDS:=
PKG_VERSION:=2
PKG_DATE:=20200912
include $(TOPDIR)/feeds/luci/luci.mk
# call BuildPackage - OpenWrt buildroot signature

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -0,0 +1,3 @@
// HTML5 Shiv v3 | @jon_neal @afarkas @rem | MIT/GPL2 Licensed
// Uncompressed source: https://github.com/aFarkas/html5shiv
(function(a,b){function f(a){var c,d,e,f;b.documentMode>7?(c=b.createElement("font"),c.setAttribute("data-html5shiv",a.nodeName.toLowerCase())):c=b.createElement("shiv:"+a.nodeName);while(a.firstChild)c.appendChild(a.childNodes[0]);for(d=a.attributes,e=d.length,f=0;f<e;++f)d[f].specified&&c.setAttribute(d[f].nodeName,d[f].nodeValue);c.style.cssText=a.style.cssText,a.parentNode.replaceChild(c,a),c.originalElement=a}function g(a){var b=a.originalElement;while(a.childNodes.length)b.appendChild(a.childNodes[0]);a.parentNode.replaceChild(b,a)}function h(a,b){b=b||"all";var c=-1,d=[],e=a.length,f,g;while(++c<e){f=a[c],g=f.media||b;if(f.disabled||!/print|all/.test(g))continue;d.push(h(f.imports,g),f.cssText)}return d.join("")}function i(c){var d=new RegExp("(^|[\\s,{}])("+a.html5.elements.join("|")+")","gi"),e=c.split("{"),f=e.length,g=-1;while(++g<f)e[g]=e[g].split("}"),b.documentMode>7?e[g][e[g].length-1]=e[g][e[g].length-1].replace(d,'$1font[data-html5shiv="$2"]'):e[g][e[g].length-1]=e[g][e[g].length-1].replace(d,"$1shiv\\:$2"),e[g]=e[g].join("}");return e.join("{")}var c=function(a){return a.innerHTML="<x-element></x-element>",a.childNodes.length===1}(b.createElement("a")),d=function(a,b,c){return b.appendChild(a),(c=(c?c(a):a.currentStyle).display)&&b.removeChild(a)&&c==="block"}(b.createElement("nav"),b.documentElement,a.getComputedStyle),e={elements:"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video".split(" "),shivDocument:function(a){a=a||b;if(a.documentShived)return;a.documentShived=!0;var f=a.createElement,g=a.createDocumentFragment,h=a.getElementsByTagName("head")[0],i=function(a){f(a)};c||(e.elements.join(" ").replace(/\w+/g,i),a.createElement=function(a){var b=f(a);return b.canHaveChildren&&e.shivDocument(b.document),b},a.createDocumentFragment=function(){return e.shivDocument(g())});if(!d&&h){var j=f("div");j.innerHTML=["x<style>","article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}","audio{display:none}","canvas,video{display:inline-block;*display:inline;*zoom:1}","[hidden]{display:none}audio[controls]{display:inline-block;*display:inline;*zoom:1}","mark{background:#FF0;color:#000}","</style>"].join(""),h.insertBefore(j.lastChild,h.firstChild)}return a}};e.shivDocument(b),a.html5=e;if(c||!a.attachEvent)return;a.attachEvent("onbeforeprint",function(){if(a.html5.supportsXElement||!b.namespaces)return;b.namespaces.shiv||b.namespaces.add("shiv");var c=-1,d=new RegExp("^("+a.html5.elements.join("|")+")$","i"),e=b.getElementsByTagName("*"),g=e.length,j,k=i(h(function(a,b){var c=[],d=a.length;while(d)c.unshift(a[--d]);d=b.length;while(d)c.unshift(b[--d]);c.sort(function(a,b){return a.sourceIndex-b.sourceIndex}),d=c.length;while(d)c[--d]=c[d].styleSheet;return c}(b.getElementsByTagName("style"),b.getElementsByTagName("link"))));while(++c<g)j=e[c],d.test(j.nodeName)&&f(j);b.appendChild(b._shivedStyleSheet=b.createElement("style")).styleSheet.cssText=k}),a.attachEvent("onafterprint",function(){if(a.html5.supportsXElement||!b.namespaces)return;var c=-1,d=b.getElementsByTagName("*"),e=d.length,f;while(++c<e)f=d[c],f.originalElement&&g(f);b._shivedStyleSheet&&b._shivedStyleSheet.parentNode.removeChild(b._shivedStyleSheet)})})(this,document)

View File

@ -0,0 +1,78 @@
@media screen and (max-width: 1600px) {
header h3 a,
header .brand {
display: none !important;
}
}
@media screen and (max-width: 1600px) {
.container>.pull-right>* {
position: absolute;
right: 0.5rem;
cursor: pointer;
}
}
@media screen and (max-width: 1024px) {
body {
font-size: 12px;
}
header {
font-size: 13px;
}
legend {
font-size: 14px;
}
.dropdown-menu a {
font-size: 13px;
min-width: 130px;
padding: 0 15px;
}
.mobile-hide {
display: none;
}
#maincontent.container {
padding: 0px 10px;
}
div.cbi-section,
fieldset {
min-width: inherit;
overflow-x: auto;
overflow-y: hidden;
}
.cbi-value {}
.cbi-value-title {
width: 30%;
min-width: 0rem !important;
margin-right: 1em;
/* text-align: left;
padding-left: 1em; */
}
.cbi-value-field {
width: 55%;
}
.cbi-value-description {
width: 75%;
display: inline-table;
padding: 1px 1.2rem;
background-position-y: 3px;
}
.cbi-value-field .cbi-input-select,
.cbi-value input[type="password"],
.cbi-value input[type="text"] {
min-width: unset;
/* width: 95%; */
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View File

@ -0,0 +1,54 @@
<%#
Copyright 2008 Steven Barth <steven@midlink.org>
Copyright 2008 Jo-Philipp Wich <jow@openwrt.org>
Copyright 2012 David Menting <david@nut-bolt.nl>
Copyright 2020 Lienol <lawlienol@gmail.com>
Licensed to the public under the Apache License 2.0.
-%>
<%
local ver = require "luci.version"
%>
<footer>
<a href="https://github.com/Lienol/openwrt-luci">Powered by <%= ver.luciname %> (<%= ver.luciversion %>)</a> / <%= ver.distversion %>
<ul class="breadcrumb pull-right" id="modemenu" style="display:none"></ul>
</footer>
</div>
<script type="text/javascript">L.require('menu-bootstrap')</script>
</body>
</html>
<script>
window.onload = function(){
var content = document.getElementsByName("content");
var luci_username = document.getElementsByName("luci_username");
var luci_password = document.getElementsByName("luci_password");
if (content.length == 1 && luci_username.length == 1 && luci_password.length == 1) {
//需要登录
document.body.classList.add('node-main-login');
luci_username[0].parentElement.parentElement.classList.add('luci_username_div');
luci_username[0].parentElement.parentElement.children[0].style.display = "none";
luci_password[0].parentElement.parentElement.classList.add('luci_password_div');
luci_password[0].parentElement.parentElement.children[0].style.display = "none";
var errorbox = document.getElementsByClassName("errorbox");
var alert_message = document.getElementsByClassName("alert-message");
if (errorbox.length == 1) {
var tips = document.getElementsByClassName("cbi-map-descr");
if (tips.length == 1) {
tips[0].innerHTML = errorbox[0].innerHTML;
tips[0].classList.add('errorbox');
errorbox[0].style.display = "none";
}
} else if (alert_message.length == 1) {
var tips = document.getElementsByClassName("cbi-map-descr");
if (tips.length == 1) {
tips[0].innerHTML = alert_message[0].innerHTML;
tips[0].classList.add('errorbox');
alert_message[0].style.display = "none";
}
}
}
}
</script>
</html>

View File

@ -0,0 +1,76 @@
<%#
Copyright 2008 Steven Barth <steven@midlink.org>
Copyright 2008-2016 Jo-Philipp Wich <jow@openwrt.org>
Copyright 2012 David Menting <david@nut-bolt.nl>
Copyright 2020 Lienol <lawlienol@gmail.com>
Licensed to the public under the Apache License 2.0.
-%>
<%
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
-- send as HTML5
http.prepare_content("text/html")
-%>
<!DOCTYPE html>
<html lang="<%=luci.i18n.context.lang%>">
<style>
body {
margin-top: unset !important
}
</style>
<head>
<meta charset="utf-8">
<title><%=striptags( (boardinfo.hostname or "?") .. ( (node and node.title) and ' - ' .. translate(node.title) or '')) %> - LuCI</title>
<meta name="viewport" content="initial-scale=1.0">
<link rel="stylesheet" href="<%=media%>/cascade.css">
<link rel="stylesheet" media="only screen and (max-device-width: 1600px)" href="<%=media%>/mobile.css" type="text/css" />
<link rel="shortcut icon" href="<%=media%>/favicon.ico">
<% if node and node.css then %>
<link rel="stylesheet" href="<%=resource%>/<%=node.css%>">
<% end -%>
<% if css then %>
<style title="text/css"><%= css %></style>
<% end -%>
<script src="<%=url('admin/translations', luci.i18n.context.lang)%>"></script>
<script src="<%=resource%>/cbi.js"></script>
<!-- <script src="<%=resource%>/xhr.js"></script> -->
</head>
<body class="lang_<%=luci.i18n.context.lang%> <% if node then %><%= striptags( node.title ) %><%- end %>" data-page="<%= pcdata(table.concat(disp.context.requestpath, "-")) %>">
<header>
<div class="fill">
<div class="container">
<a class="brand" href="/"><%=boardinfo.hostname or "?"%></a>
<ul class="nav" id="topmenu" style="display:none"></ul>
<div id="indicators" class="pull-right"></div>
</div>
</div>
</header>
<div id="maincontent" class="container">
<%- if luci.sys.process.info("uid") == 0 and luci.sys.user.getuser("root") and not luci.sys.user.getpasswd("root") then -%>
<div class="alert-message warning">
<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 disp.lookup("admin/system/admin") then %>
<div class="right"><a class="btn" href="<%=url("admin/system/admin")%>"><%:Go to password configuration...%></a></div>
<% end %>
</div>
<%- end -%>
<noscript>
<div class="alert-message warning">
<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>

View File

@ -0,0 +1,6 @@
#!/bin/sh
uci batch <<-EOF
set luci.themes.Bootstrap_Blue=/luci-static/bootstrap_blue
commit luci
EOF
exit 0

View File

@ -0,0 +1,15 @@
# Copyright (C) 2020 Lienol <lawlienol@gmail.com>
#
# This is free software, licensed under the GNU General Public License v3.
#
include $(TOPDIR)/rules.mk
LUCI_TITLE:=Bootstrap Mod Theme By Lienol
LUCI_DEPENDS:=
PKG_VERSION:=2
PKG_DATE:=20200912
include $(TOPDIR)/feeds/luci/luci.mk
# call BuildPackage - OpenWrt buildroot signature

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -0,0 +1,3 @@
// HTML5 Shiv v3 | @jon_neal @afarkas @rem | MIT/GPL2 Licensed
// Uncompressed source: https://github.com/aFarkas/html5shiv
(function(a,b){function f(a){var c,d,e,f;b.documentMode>7?(c=b.createElement("font"),c.setAttribute("data-html5shiv",a.nodeName.toLowerCase())):c=b.createElement("shiv:"+a.nodeName);while(a.firstChild)c.appendChild(a.childNodes[0]);for(d=a.attributes,e=d.length,f=0;f<e;++f)d[f].specified&&c.setAttribute(d[f].nodeName,d[f].nodeValue);c.style.cssText=a.style.cssText,a.parentNode.replaceChild(c,a),c.originalElement=a}function g(a){var b=a.originalElement;while(a.childNodes.length)b.appendChild(a.childNodes[0]);a.parentNode.replaceChild(b,a)}function h(a,b){b=b||"all";var c=-1,d=[],e=a.length,f,g;while(++c<e){f=a[c],g=f.media||b;if(f.disabled||!/print|all/.test(g))continue;d.push(h(f.imports,g),f.cssText)}return d.join("")}function i(c){var d=new RegExp("(^|[\\s,{}])("+a.html5.elements.join("|")+")","gi"),e=c.split("{"),f=e.length,g=-1;while(++g<f)e[g]=e[g].split("}"),b.documentMode>7?e[g][e[g].length-1]=e[g][e[g].length-1].replace(d,'$1font[data-html5shiv="$2"]'):e[g][e[g].length-1]=e[g][e[g].length-1].replace(d,"$1shiv\\:$2"),e[g]=e[g].join("}");return e.join("{")}var c=function(a){return a.innerHTML="<x-element></x-element>",a.childNodes.length===1}(b.createElement("a")),d=function(a,b,c){return b.appendChild(a),(c=(c?c(a):a.currentStyle).display)&&b.removeChild(a)&&c==="block"}(b.createElement("nav"),b.documentElement,a.getComputedStyle),e={elements:"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video".split(" "),shivDocument:function(a){a=a||b;if(a.documentShived)return;a.documentShived=!0;var f=a.createElement,g=a.createDocumentFragment,h=a.getElementsByTagName("head")[0],i=function(a){f(a)};c||(e.elements.join(" ").replace(/\w+/g,i),a.createElement=function(a){var b=f(a);return b.canHaveChildren&&e.shivDocument(b.document),b},a.createDocumentFragment=function(){return e.shivDocument(g())});if(!d&&h){var j=f("div");j.innerHTML=["x<style>","article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}","audio{display:none}","canvas,video{display:inline-block;*display:inline;*zoom:1}","[hidden]{display:none}audio[controls]{display:inline-block;*display:inline;*zoom:1}","mark{background:#FF0;color:#000}","</style>"].join(""),h.insertBefore(j.lastChild,h.firstChild)}return a}};e.shivDocument(b),a.html5=e;if(c||!a.attachEvent)return;a.attachEvent("onbeforeprint",function(){if(a.html5.supportsXElement||!b.namespaces)return;b.namespaces.shiv||b.namespaces.add("shiv");var c=-1,d=new RegExp("^("+a.html5.elements.join("|")+")$","i"),e=b.getElementsByTagName("*"),g=e.length,j,k=i(h(function(a,b){var c=[],d=a.length;while(d)c.unshift(a[--d]);d=b.length;while(d)c.unshift(b[--d]);c.sort(function(a,b){return a.sourceIndex-b.sourceIndex}),d=c.length;while(d)c[--d]=c[d].styleSheet;return c}(b.getElementsByTagName("style"),b.getElementsByTagName("link"))));while(++c<g)j=e[c],d.test(j.nodeName)&&f(j);b.appendChild(b._shivedStyleSheet=b.createElement("style")).styleSheet.cssText=k}),a.attachEvent("onafterprint",function(){if(a.html5.supportsXElement||!b.namespaces)return;var c=-1,d=b.getElementsByTagName("*"),e=d.length,f;while(++c<e)f=d[c],f.originalElement&&g(f);b._shivedStyleSheet&&b._shivedStyleSheet.parentNode.removeChild(b._shivedStyleSheet)})})(this,document)

View File

@ -0,0 +1,78 @@
@media screen and (max-width: 1600px) {
header h3 a,
header .brand {
display: none !important;
}
}
@media screen and (max-width: 1600px) {
.container>.pull-right>* {
position: absolute;
right: 0.5rem;
cursor: pointer;
}
}
@media screen and (max-width: 1024px) {
body {
font-size: 12px;
}
header {
font-size: 13px;
}
legend {
font-size: 14px;
}
.dropdown-menu a {
font-size: 13px;
min-width: 130px;
padding: 0 15px;
}
.mobile-hide {
display: none;
}
#maincontent.container {
padding: 0px 10px;
}
div.cbi-section,
fieldset {
min-width: inherit;
overflow-x: auto;
overflow-y: hidden;
}
.cbi-value {}
.cbi-value-title {
width: 30%;
min-width: 0rem !important;
margin-right: 1em;
/* text-align: left;
padding-left: 1em; */
}
.cbi-value-field {
width: 55%;
}
.cbi-value-description {
width: 75%;
display: inline-table;
padding: 1px 1.2rem;
background-position-y: 3px;
}
.cbi-value-field .cbi-input-select,
.cbi-value input[type="password"],
.cbi-value input[type="text"] {
min-width: unset;
/* width: 95%; */
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View File

@ -0,0 +1,54 @@
<%#
Copyright 2008 Steven Barth <steven@midlink.org>
Copyright 2008 Jo-Philipp Wich <jow@openwrt.org>
Copyright 2012 David Menting <david@nut-bolt.nl>
Copyright 2020 Lienol <lawlienol@gmail.com>
Licensed to the public under the Apache License 2.0.
-%>
<%
local ver = require "luci.version"
%>
<footer>
<a href="https://github.com/Lienol/openwrt-luci">Powered by <%= ver.luciname %> (<%= ver.luciversion %>)</a> / <%= ver.distversion %>
<ul class="breadcrumb pull-right" id="modemenu" style="display:none"></ul>
</footer>
</div>
<script type="text/javascript">L.require('menu-bootstrap')</script>
</body>
</html>
<script>
window.onload = function(){
var content = document.getElementsByName("content");
var luci_username = document.getElementsByName("luci_username");
var luci_password = document.getElementsByName("luci_password");
if (content.length == 1 && luci_username.length == 1 && luci_password.length == 1) {
//需要登录
document.body.classList.add('node-main-login');
luci_username[0].parentElement.parentElement.classList.add('luci_username_div');
luci_username[0].parentElement.parentElement.children[0].style.display = "none";
luci_password[0].parentElement.parentElement.classList.add('luci_password_div');
luci_password[0].parentElement.parentElement.children[0].style.display = "none";
var errorbox = document.getElementsByClassName("errorbox");
var alert_message = document.getElementsByClassName("alert-message");
if (errorbox.length == 1) {
var tips = document.getElementsByClassName("cbi-map-descr");
if (tips.length == 1) {
tips[0].innerHTML = errorbox[0].innerHTML;
tips[0].classList.add('errorbox');
errorbox[0].style.display = "none";
}
} else if (alert_message.length == 1) {
var tips = document.getElementsByClassName("cbi-map-descr");
if (tips.length == 1) {
tips[0].innerHTML = alert_message[0].innerHTML;
tips[0].classList.add('errorbox');
alert_message[0].style.display = "none";
}
}
}
}
</script>
</html>

View File

@ -0,0 +1,76 @@
<%#
Copyright 2008 Steven Barth <steven@midlink.org>
Copyright 2008-2016 Jo-Philipp Wich <jow@openwrt.org>
Copyright 2012 David Menting <david@nut-bolt.nl>
Copyright 2020 Lienol <lawlienol@gmail.com>
Licensed to the public under the Apache License 2.0.
-%>
<%
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
-- send as HTML5
http.prepare_content("text/html")
-%>
<!DOCTYPE html>
<html lang="<%=luci.i18n.context.lang%>">
<style>
body {
margin-top: unset !important
}
</style>
<head>
<meta charset="utf-8">
<title><%=striptags( (boardinfo.hostname or "?") .. ( (node and node.title) and ' - ' .. translate(node.title) or '')) %> - LuCI</title>
<meta name="viewport" content="initial-scale=1.0">
<link rel="stylesheet" href="<%=media%>/cascade.css">
<link rel="stylesheet" media="only screen and (max-device-width: 1600px)" href="<%=media%>/mobile.css" type="text/css" />
<link rel="shortcut icon" href="<%=media%>/favicon.ico">
<% if node and node.css then %>
<link rel="stylesheet" href="<%=resource%>/<%=node.css%>">
<% end -%>
<% if css then %>
<style title="text/css"><%= css %></style>
<% end -%>
<script src="<%=url('admin/translations', luci.i18n.context.lang)%>"></script>
<script src="<%=resource%>/cbi.js"></script>
<!-- <script src="<%=resource%>/xhr.js"></script> -->
</head>
<body class="lang_<%=luci.i18n.context.lang%> <% if node then %><%= striptags( node.title ) %><%- end %>" data-page="<%= pcdata(table.concat(disp.context.requestpath, "-")) %>">
<header>
<div class="fill">
<div class="container">
<a class="brand" href="/"><%=boardinfo.hostname or "?"%></a>
<ul class="nav" id="topmenu" style="display:none"></ul>
<div id="indicators" class="pull-right"></div>
</div>
</div>
</header>
<div id="maincontent" class="container">
<%- if luci.sys.process.info("uid") == 0 and luci.sys.user.getuser("root") and not luci.sys.user.getpasswd("root") then -%>
<div class="alert-message warning">
<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 disp.lookup("admin/system/admin") then %>
<div class="right"><a class="btn" href="<%=url("admin/system/admin")%>"><%:Go to password configuration...%></a></div>
<% end %>
</div>
<%- end -%>
<noscript>
<div class="alert-message warning">
<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>

View File

@ -0,0 +1,6 @@
#!/bin/sh
uci batch <<-EOF
set luci.themes.Bootstrap_Mod=/luci-static/bootstrap_mod
commit luci
EOF
exit 0