luci-theme-material: Synchronized to the LUCI version f9e590a

Signed-off-by: Lutty Yang <lutty@wcan.in>
This commit is contained in:
Lutty Yang 2015-10-23 12:51:07 +08:00
parent 780778e6f9
commit 9098b20650
4 changed files with 102 additions and 47 deletions

View file

@ -115,11 +115,17 @@ code {
} }
abbr { abbr {
color: #0099CC; color: #005470;
text-decoration: underline; text-decoration: underline;
cursor: help; cursor: help;
} }
hr{
margin: 1rem 0;
border-color: #EEE;
opacity: 0.1;
}
header, .main { header, .main {
width: 100%; width: 100%;
position: absolute; position: absolute;
@ -476,6 +482,8 @@ fieldset > table > tbody > tr:nth-of-type(odd) {
} }
/* fix progress bar */ /* fix progress bar */
#swaptotal > div,
#swapfree > div,
#memfree > div, #memfree > div,
#membuff > div, #membuff > div,
#conns > div, #conns > div,
@ -484,6 +492,8 @@ fieldset > table > tbody > tr:nth-of-type(odd) {
height: 1.4rem !important; height: 1.4rem !important;
} }
#swaptotal > div > div,
#swapfree > div > div,
#memfree > div > div, #memfree > div > div,
#membuff > div > div, #membuff > div > div,
#conns > div > div, #conns > div > div,
@ -562,6 +572,7 @@ td > table > tbody > tr > td {
box-shadow: none; box-shadow: none;
} }
form.inline + form.inline,
.cbi-button + .cbi-button { .cbi-button + .cbi-button {
margin-left: 0.6rem; margin-left: 0.6rem;
} }
@ -715,6 +726,11 @@ td > table > tbody > tr > td {
background-color: #eee; background-color: #eee;
} }
.cbi-rowstyle-2 .cbi-button-up,
.cbi-rowstyle-2 .cbi-button-down{
background-color: #FFF !important;
}
.cbi-section-table .cbi-section-table-titles .cbi-section-table-cell { .cbi-section-table .cbi-section-table-titles .cbi-section-table-cell {
width: auto !important; width: auto !important;
} }
@ -742,7 +758,7 @@ td > table > tbody > tr > td {
} }
.inline { .inline {
display: inline-block; display: inline;
} }
.cbi-page-actions { .cbi-page-actions {
@ -1074,18 +1090,16 @@ header > .container > .pull-right > * {
white-space: normal; white-space: normal;
} }
/* fix status processes */ /* fix status processes */
.node-status-processes > .main table tr td:nth-child(3) { .node-status-processes > .main table tr td:nth-child(3) {
white-space: normal; white-space: normal;
} }
.node-status-firewall > .main fieldset li { .node-status-firewall > .main div > .cbi-map > form {
display: inline-block; margin: 2rem 2rem 0 0;
} }
/* fix system reboot */ /* fix system reboot */
.node-system-reboot > .main > .main-right p, .node-system-reboot > .main > .main-right p,
@ -1149,6 +1163,25 @@ header > .container > .pull-right > * {
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .16), 0 0 2px 0 rgba(0, 0, 0, .12); box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .16), 0 0 2px 0 rgba(0, 0, 0, .12);
} }
#cbi-firewall-redirect table *,
#cbi-network-switch_vlan table *,
#cbi-firewall-zone table *{
font-size: smaller;
}
#cbi-firewall-redirect table input[type="text"],
#cbi-network-switch_vlan table input[type="text"],
#cbi-firewall-zone table input[type="text"]{
width: 5rem;
}
#cbi-firewall-redirect table select,
#cbi-network-switch_vlan table select,
#cbi-firewall-zone table select{
min-width: 3.5rem;
}
/* language fix */ /* language fix */
body.lang_pl.node-main-login .cbi-value-title { body.lang_pl.node-main-login .cbi-value-title {
width: 12rem; width: 12rem;
@ -1179,6 +1212,7 @@ body.lang_pl.node-main-login .cbi-value-title {
.cbi-value-title { .cbi-value-title {
width: 15rem; width: 15rem;
padding-right: 0.6rem;
} }
fieldset { fieldset {
@ -1229,6 +1263,7 @@ body.lang_pl.node-main-login .cbi-value-title {
table { table {
font-size: 0.8rem !important; font-size: 0.8rem !important;
width: 100% !important;
} }
.main > .main-left > .nav > li, .main > .main-left > .nav > li,
@ -1406,6 +1441,33 @@ body.lang_pl.node-main-login .cbi-value-title {
.node-system-software > .main .cbi-value .cbi-value-field input { .node-system-software > .main .cbi-value .cbi-value-field input {
width: 100%; width: 100%;
} }
.node-status-firewall > .main div > .cbi-map > form {
position: static !important;
margin: 0 0 2rem 0;
padding: 2rem;
border: 0;
font-weight: normal;
font-style: normal;
line-height: 1;
font-family: inherit;
min-width: inherit;
overflow-x: auto;
overflow-y: hidden;
border-radius: 0;
background-color: #FFF;
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .16), 0 0 2px 0 rgba(0, 0, 0, .12);
-webkit-overflow-scrolling: touch;
}
.node-status-firewall > .main div > .cbi-map > form input[type="submit"]{
width: 100% !important;
margin: 0;
}
.node-status-firewall > .main div > .cbi-map > form input[type="submit"] + input[type="submit"]{
margin-top: 1rem;
}
} }
@media screen and (min-width: 992px) { @media screen and (min-width: 992px) {

View file

@ -144,15 +144,13 @@
function getCurrentNodeByUrl() { function getCurrentNodeByUrl() {
var ret = false; var ret = false;
var getUrlNode = function (href){ var getUrlNode = function (href){
var linkPos = href.indexOf(";"); if (!$('body').hasClass('logged-in')){
if (linkPos == -1){
return "login"; return "login";
}else{ }else{
linkPos = href.indexOf("/", linkPos); if (href == "/cgi-bin/luci/"){
if (linkPos == -1){
return "overview"; return "overview";
}else{ }else{
var link = href.substr(linkPos); var link = href.substr(href.indexOf("admin/"));
if (link == "/") if (link == "/")
return "overview"; return "overview";
else else
@ -278,12 +276,14 @@
$(".main-left").stop(true).animate({ $(".main-left").stop(true).animate({
width: "0" width: "0"
},"fast"); },"fast");
$(".main-right").css("overflow-y", "auto");
showSide = false; showSide = false;
}else{ }else{
$(".darkMask").stop(true).fadeIn("fast"); $(".darkMask").stop(true).fadeIn("fast");
$(".main-left").stop(true).animate({ $(".main-left").stop(true).animate({
width: "15rem" width: "15rem"
},"fast"); },"fast");
$(".main-right").css("overflow-y", "hidden");
showSide = true; showSide = true;
} }
}); });
@ -296,6 +296,7 @@
$(".main-left").stop(true).animate({ $(".main-left").stop(true).animate({
width: "0" width: "0"
},"fast"); },"fast");
$(".main-right").css("overflow-y", "auto");
} }
}); });
@ -343,12 +344,4 @@
} }
} }
document.addEventListener("touchmove", function(evt){
evt.preventDefault();
}, false);
var container = document.getElementById("maincontent");
container.addEventListener("touchmove", function(evt){
evt.stopPropagation();
}, false);
})(jQuery); })(jQuery);

View file

@ -42,6 +42,6 @@
</div> </div>
<script src="<%=media%>/js/jquery.min.js"></script> <script src="<%=media%>/js/jquery.min.js"></script>
<script src="<%=media%>/js/script.js?<%= ver.luciversion %>"></script> <script src="<%=media%>/js/script.js"></script>
</body> </body>
</html> </html>

View file

@ -122,7 +122,7 @@
<meta name="msapplication-tap-highlight" content="no"> <meta name="msapplication-tap-highlight" content="no">
<meta name="msapplication-TileColor" content="#0099CC"> <meta name="msapplication-TileColor" content="#0099CC">
<meta name="msapplication-TileImage" content="<%=media%>/logo.png"/> <meta name="msapplication-TileImage" content="<%=media%>/logo.png"/>
<link rel="stylesheet" href="<%=media%>/css/style.css?<%= ver.luciversion %>"> <link rel="stylesheet" href="<%=media%>/css/style.css">
<link rel="shortcut icon" href="<%=media%>/favicon.ico"> <link rel="shortcut icon" href="<%=media%>/favicon.ico">
<% if node and node.css then %> <% if node and node.css then %>
<link rel="stylesheet" href="<%=resource%>/<%=node.css%>"> <link rel="stylesheet" href="<%=resource%>/<%=node.css%>">
@ -135,7 +135,7 @@
<script src="<%=resource%>/xhr.js"></script> <script src="<%=resource%>/xhr.js"></script>
</head> </head>
<body class="lang_<%=luci.i18n.context.lang%> <%- if node then %><%= striptags( node.title ) %><%- end %>"> <body class="lang_<%=luci.i18n.context.lang%> <%- if node then %><%= striptags( node.title ) %><%- end %> <% if luci.dispatcher.context.authsession then %>logged-in<% end %>">
<header> <header>
<div class="container"> <div class="container">