summaryrefslogtreecommitdiffhomepage
path: root/themes/luci-theme-bootstrap
diff options
context:
space:
mode:
Diffstat (limited to 'themes/luci-theme-bootstrap')
-rw-r--r--themes/luci-theme-bootstrap/htdocs/luci-static/bootstrap/cascade.css37
-rw-r--r--themes/luci-theme-bootstrap/luasrc/view/themes/bootstrap/header.htm4
-rw-r--r--themes/luci-theme-bootstrap/luasrc/view/themes/bootstrap/json-menu.htm15
-rwxr-xr-xthemes/luci-theme-bootstrap/root/etc/uci-defaults/30_luci-theme-bootstrap1
4 files changed, 51 insertions, 6 deletions
diff --git a/themes/luci-theme-bootstrap/htdocs/luci-static/bootstrap/cascade.css b/themes/luci-theme-bootstrap/htdocs/luci-static/bootstrap/cascade.css
index 5f7dd60508..4387e95889 100644
--- a/themes/luci-theme-bootstrap/htdocs/luci-static/bootstrap/cascade.css
+++ b/themes/luci-theme-bootstrap/htdocs/luci-static/bootstrap/cascade.css
@@ -134,7 +134,8 @@ body {
font-weight: normal;
line-height: 18px;
color: #404040;
- padding: 58px 5px 5px 5px;
+ padding: 18px 5px 5px 5px;
+ margin-top: 40px;
}
.container {
@@ -493,6 +494,8 @@ select,
border-radius: 3px;
position: relative;
pointer-events: none;
+ overflow: hidden;
+ word-break: break-all;
}
.cbi-dynlist > .item::after {
@@ -757,7 +760,6 @@ textarea[readonly] {
* Repeatable UI elements outside the base styles provided from the scaffolding
* ---------------------------------------------------------------------------- */
header {
- height: 40px;
position: fixed;
top: 0;
left: 0;
@@ -1774,7 +1776,8 @@ button.btn::-moz-focus-inner, input[type=submit].btn::-moz-focus-inner {
margin: .25em 0;
}
-.label {
+.label,
+header [data-indicator] {
padding: 1px 3px 2px;
font-size: 9.75px;
font-weight: bold;
@@ -1786,6 +1789,10 @@ button.btn::-moz-focus-inner, input[type=submit].btn::-moz-focus-inner {
text-shadow: none;
}
+header [data-indicator][data-clickable] {
+ cursor: pointer;
+}
+
a.label:link,
a.label:visited {
color: #fff;
@@ -1807,7 +1814,8 @@ a.label:hover {
background-color: #46a546;
}
-.label.notice {
+.label.notice,
+header [data-indicator][data-style="active"] {
background-color: #62cffc;
}
@@ -2401,3 +2409,24 @@ html body.apply-overlay-active {
.fade-out {
animation: fade-out .4s ease;
}
+
+.assoclist .ifacebadge {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ white-space: normal;
+ text-align: center;
+}
+
+.assoclist .ifacebadge > img {
+ margin: .2em;
+}
+
+.assoclist .td:nth-of-type(3),
+.assoclist .td:nth-of-type(5) {
+ width: 25%;
+}
+
+.assoclist .td:nth-of-type(6) button {
+ word-break: normal;
+}
diff --git a/themes/luci-theme-bootstrap/luasrc/view/themes/bootstrap/header.htm b/themes/luci-theme-bootstrap/luasrc/view/themes/bootstrap/header.htm
index 56a1b230e4..39415154aa 100644
--- a/themes/luci-theme-bootstrap/luasrc/view/themes/bootstrap/header.htm
+++ b/themes/luci-theme-bootstrap/luasrc/view/themes/bootstrap/header.htm
@@ -40,13 +40,13 @@
<% include("themes/bootstrap/json-menu") %>
</head>
- <body class="lang_<%=luci.i18n.context.lang%> <% if node then %><%= striptags( node.title ) %><%- end %>" data-page="<%= table.concat(disp.context.requestpath, "-") %>">
+ <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 class="pull-right">
+ <div id="indicators" class="pull-right">
<span id="xhr_poll_status" style="display:none" onclick="XHR.running() ? XHR.halt() : XHR.run()">
<span class="label success" id="xhr_poll_status_on"><%:Auto Refresh%> <%:on%></span>
<span class="label" id="xhr_poll_status_off" style="display:none"><%:Auto Refresh%> <%:off%></span>
diff --git a/themes/luci-theme-bootstrap/luasrc/view/themes/bootstrap/json-menu.htm b/themes/luci-theme-bootstrap/luasrc/view/themes/bootstrap/json-menu.htm
index 9d58ba2dba..ea11cf2263 100644
--- a/themes/luci-theme-bootstrap/luasrc/view/themes/bootstrap/json-menu.htm
+++ b/themes/luci-theme-bootstrap/luasrc/view/themes/bootstrap/json-menu.htm
@@ -98,6 +98,13 @@
ul.style.display = '';
}
+ function adjust_body_margin(ev) {
+ var body = document.querySelector('body'),
+ head = document.querySelector('header');
+
+ body.style.marginTop = head.offsetHeight + 'px';
+ }
+
document.addEventListener('luci-loaded', function(ev) {
var tree = <%= luci.http.write_json(luci.dispatcher.menu_json() or {}) %>,
node = tree,
@@ -114,6 +121,14 @@
if (node)
render_tabmenu(node, url);
}
+
+ document.addEventListener('poll-start', adjust_body_margin);
+ document.addEventListener('poll-stop', adjust_body_margin);
+ document.addEventListener('uci-new-changes', adjust_body_margin);
+ document.addEventListener('uci-clear-changes', adjust_body_margin);
+ window.addEventListener('resize', adjust_body_margin);
+
+ adjust_body_margin(ev);
});
})();
</script>
diff --git a/themes/luci-theme-bootstrap/root/etc/uci-defaults/30_luci-theme-bootstrap b/themes/luci-theme-bootstrap/root/etc/uci-defaults/30_luci-theme-bootstrap
index b5161843fe..4381a15c2e 100755
--- a/themes/luci-theme-bootstrap/root/etc/uci-defaults/30_luci-theme-bootstrap
+++ b/themes/luci-theme-bootstrap/root/etc/uci-defaults/30_luci-theme-bootstrap
@@ -1,6 +1,7 @@
#!/bin/sh
if [ "$PKG_UPGRADE" != 1 ]; then
+ uci get luci.themes.Bootstrap >/dev/null 2>&1 || \
uci batch <<-EOF
set luci.themes.Bootstrap=/luci-static/bootstrap
set luci.main.mediaurlbase=/luci-static/bootstrap