diff options
Diffstat (limited to 'themes')
7 files changed, 445 insertions, 303 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 b1f1f6b5ed..87e25cf33d 100644 --- a/themes/luci-theme-bootstrap/htdocs/luci-static/bootstrap/cascade.css +++ b/themes/luci-theme-bootstrap/htdocs/luci-static/bootstrap/cascade.css @@ -162,7 +162,7 @@ textarea { * Basic and global styles for generating a grid system, structural layout, and page templates * ------------------------------------------------------------------------------------------- */ body { - background-color: #ffffff; + background-color: #fff; margin: 0; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 13px; @@ -516,7 +516,7 @@ input[type=checkbox], input[type=radio] { } input[type=file] { - background-color: #ffffff; + background-color: #fff; padding: initial; border: initial; line-height: initial; @@ -537,7 +537,7 @@ select, input[type=file] { select[multiple] { height: inherit; - background-color: #ffffff; + background-color: #fff; } textarea { @@ -552,7 +552,7 @@ textarea { } .uneditable-input { - background-color: #ffffff; + background-color: #fff; display: block; border-color: #eee; box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); @@ -572,9 +572,10 @@ input, textarea { box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1); } +.btn:hover, .cbi-button:hover, input:focus, textarea:focus { outline: 0; - border-color: rgba(82, 168, 236, 0.8); + border-color: rgba(82, 168, 236, 0.8) !important; box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6); } @@ -583,66 +584,6 @@ input[type=file]:focus, input[type=checkbox]:focus, select:focus { outline: 1px dotted #666; } -form .clearfix.error > label, form .clearfix.error .help-block, form .clearfix.error .help-inline { - color: #b94a48; -} - -form .clearfix.error input, form .clearfix.error textarea { - color: #b94a48; - border-color: #ee5f5b; -} - -form .clearfix.error input:focus, form .clearfix.error textarea:focus { - border-color: #e9322d; - box-shadow: 0 0 6px #f8b9b7; -} - -form .clearfix.error .input-prepend .add-on, form .clearfix.error .input-append .add-on { - color: #b94a48; - background-color: #fce6e6; - border-color: #b94a48; -} - -form .clearfix.warning > label, form .clearfix.warning .help-block, form .clearfix.warning .help-inline { - color: #c09853; -} - -form .clearfix.warning input, form .clearfix.warning textarea { - color: #c09853; - border-color: #ccae64; -} - -form .clearfix.warning input:focus, form .clearfix.warning textarea:focus { - border-color: #be9a3f; - box-shadow: 0 0 6px #e5d6b1; -} - -form .clearfix.warning .input-prepend .add-on, form .clearfix.warning .input-append .add-on { - color: #c09853; - background-color: #d2b877; - border-color: #c09853; -} - -form .clearfix.success > label, form .clearfix.success .help-block, form .clearfix.success .help-inline { - color: #468847; -} - -form .clearfix.success input, form .clearfix.success textarea { - color: #468847; - border-color: #57a957; -} - -form .clearfix.success input:focus, form .clearfix.success textarea:focus { - border-color: #458845; - box-shadow: 0 0 6px #9acc9a; -} - -form .clearfix.success .input-prepend .add-on, form .clearfix.success .input-append .add-on { - color: #468847; - background-color: #bcddbc; - border-color: #468847; -} - input[disabled], select[disabled], textarea[disabled], @@ -651,6 +592,8 @@ select[readonly], textarea[readonly] { background-color: #f5f5f5; border-color: #ddd; + pointer-events: none; + cursor: default; } .cbi-optionals, @@ -698,6 +641,10 @@ textarea[readonly] { text-decoration: underline; } +.cbi-page-actions > form { + display: inline; +} + .help-inline, .help-block { font-size: 13px; line-height: 18px; @@ -751,16 +698,10 @@ textarea[readonly] { vertical-align: middle; } -.table .td { - vertical-align: top; +.table .td, .table .tbody .th { border-top: 1px solid #ddd; } -.table .tbody .th { - border-top: 1px solid #ddd; - vertical-align: top; -} - .tr.placeholder { height: calc(3em + 20px); } @@ -796,7 +737,7 @@ header a { header h3 a:hover, header .brand:hover, header ul .active > a { background-color: #333; background-color: rgba(255, 255, 255, 0.05); - color: #ffffff; + color: #fff; text-decoration: none; } @@ -809,7 +750,7 @@ header h3 a, header .brand { display: block; padding: 8px 20px 12px; margin-left: -20px; - color: #ffffff; + color: #fff; font-size: 20px; font-weight: 200; line-height: 1; @@ -850,7 +791,7 @@ header div > ul a, .nav a { } header div > ul a:hover, .nav a:hover { - color: #ffffff; + color: #fff; text-decoration: none; } @@ -900,7 +841,7 @@ header div > ul .menu-dropdown .dropdown-toggle, .nav .menu-dropdown .dropdown-toggle, header div > ul .dropdown-menu .dropdown-toggle, .nav .dropdown-menu .dropdown-toggle { - color: #ffffff; + color: #fff; } header div > ul .menu-dropdown a.menu.open, @@ -930,14 +871,14 @@ header div > ul .dropdown-menu li a:hover, background-color: #191919; background-repeat: repeat-x; background-image: linear-gradient(to bottom, #292929, #191919); - color: #ffffff; + color: #fff; } header div > ul .menu-dropdown .active a, .nav .menu-dropdown .active a, header div > ul .dropdown-menu .active a, .nav .dropdown-menu .active a { - color: #ffffff; + color: #fff; } header div > ul .menu-dropdown .divider, @@ -967,12 +908,12 @@ a.menu:after, .dropdown-toggle:after { margin-left: 4px; border-left: 4px solid transparent; border-right: 4px solid transparent; - border-top: 4px solid #ffffff; + border-top: 4px solid #fff; opacity: 0.5; } .menu-dropdown, .dropdown-menu { - background-color: #ffffff; + background-color: #fff; float: left; position: absolute; top: 40px; @@ -1005,7 +946,7 @@ a.menu:after, .dropdown-toggle:after { margin: 5px 0; overflow: hidden; background-color: #eee; - border-bottom: 1px solid #ffffff; + border-bottom: 1px solid #fff; } header .dropdown-menu a, .dropdown-menu a { @@ -1015,16 +956,16 @@ header .dropdown-menu a, .dropdown-menu a { font-weight: normal; line-height: 18px; color: #808080; - text-shadow: 0 1px 0 #ffffff; + text-shadow: 0 1px 0 #fff; } header .dropdown-menu a:hover, .dropdown-menu a:hover, header .dropdown-menu a.hover, .dropdown-menu a.hover { - background-color: #dddddd; + background-color: #ddd; background-repeat: repeat-x; - background-image: linear-gradient(to bottom, #eeeeee, #dddddd); + background-image: linear-gradient(to bottom, #eee, #ddd); color: #404040; text-decoration: none; box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.025), inset 0 -1px rgba(0, 0, 0, 0.025); @@ -1034,7 +975,7 @@ header .dropdown-menu a.hover, .dropdown.open .menu, .open .dropdown-toggle, .dropdown.open .dropdown-toggle { - color: #ffffff; + color: #fff; background: #ccc; background: rgba(0, 0, 0, 0.3); } @@ -1133,7 +1074,7 @@ header .dropdown-menu a.hover, .cbi-tabmenu .active > a, .cbi-tabmenu .active > a:hover, .cbi-tab > a:link, .cbi-tab > a:hover { color: #808080; - background-color: #ffffff; + background-color: #fff; border: 1px solid #ddd; border-bottom-color: transparent; cursor: default; @@ -1177,15 +1118,15 @@ header .dropdown-menu a.hover, margin: 0 0 18px; background-color: #f5f5f5; background-repeat: repeat-x; - background-image: linear-gradient(to bottom, #ffffff, #f5f5f5); + background-image: linear-gradient(to bottom, #fff, #f5f5f5); border: 1px solid #ddd; border-radius: 3px; - box-shadow: inset 0 1px 0 #ffffff; + box-shadow: inset 0 1px 0 #fff; } .breadcrumb li { display: inline; - text-shadow: 0 1px 0 #ffffff; + text-shadow: 0 1px 0 #fff; } .breadcrumb .divider { @@ -1219,7 +1160,7 @@ footer { .alert-message.info, .btn.info:hover, .alert-message.info:hover { - color: #ffffff; + color: #fff; } .btn .close, .alert-message .close { @@ -1231,29 +1172,26 @@ footer { .alert-message.danger, .btn.error, .alert-message.error { - background-color: #c43c35; - background-repeat: repeat-x; - background-image: linear-gradient(to bottom, #ee5f5b, #c43c35); + background: linear-gradient(to bottom, #ee5f5b, #c43c35) repeat-x; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - border-color: #c43c35 #c43c35 #882a25; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); } .btn.success, .alert-message.success { - background-color: #57a957; - background-repeat: repeat-x; - background-image: linear-gradient(to bottom, #62c462, #57a957); + background: linear-gradient(to bottom, #62c462, #57a957) repeat-x; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - border-color: #57a957 #57a957 #3d773d; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); } .btn.info, .alert-message.info { - background-color: #339bb9; - background-repeat: repeat-x; - background-image: linear-gradient(to bottom, #5bc0de, #339bb9); + background: linear-gradient(to bottom, #5bc0de, #339bb9) repeat-x; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - border-color: #339bb9 #339bb9 #22697d; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); +} + +.alert-message.notice { + background: linear-gradient(to bottom, #efefef, #fefefe) repeat-x; + text-shadow: 0 -1px 0 rgba(255, 255, 255, 0.25); border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); } @@ -1261,9 +1199,7 @@ footer { .cbi-button { cursor: pointer; display: inline-block; - background-color: #e6e6e6; - background-repeat: no-repeat; - background-image: linear-gradient(#ffffff, #ffffff 25%, #e6e6e6); + background: linear-gradient(#fff, #fff 25%, #e6e6e6) no-repeat; padding: 5px 14px 6px; text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); color: #333; @@ -1275,12 +1211,6 @@ footer { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); } -.btn:hover, -.cbi-button:hover { - color: #333; - text-decoration: none; -} - .btn:focus, .cbi-button:focus { outline: 1px dotted #666; @@ -1288,8 +1218,8 @@ footer { .cbi-input-invalid, .cbi-value-error input { - color: #FF0000; - border-color: #FF0000; + color: #f00; + border-color: #f00; } .cbi-button-positive, @@ -1306,7 +1236,6 @@ footer { .cbi-button-link, .cbi-button-up, .cbi-button-down { - border-color: #444; color: #444; } @@ -1327,24 +1256,35 @@ footer { color: #c44; } +.cbi-page-actions .cbi-button-link, +.cbi-page-actions form[method="get"]:first-child { + float: left; +} + .btn.primary, .cbi-button-action.important, .cbi-page-actions .cbi-button-apply, .cbi-section-actions .cbi-button-edit { color: #fff; - background: #0069d6; + background: linear-gradient(to bottom, #0069d6, #0049d6) no-repeat; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); } .cbi-button-positive.important, .cbi-page-actions .cbi-button-save { color: #fff; - background: #4a4; + background: linear-gradient(to bottom, #4a4, #484) no-repeat; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); +} + +.cbi-button-negative.important { + color: #fff; + background: linear-gradient(to bottom, #c44, #c00) no-repeat; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); } .cbi-page-actions .cbi-button-apply + .cbi-button-save { - background: linear-gradient(#ffffff, #ffffff 25%, #e6e6e6); + background: linear-gradient(#fff, #fff 25%, #e6e6e6); text-shadow: 0 -1px 0 rgba(255, 255, 255, 0.75); color: #4a4; } @@ -1413,7 +1353,7 @@ footer { min-height: 20px; } -.cbi-dropdown > ul > li .hide-open { display: initial; } +.cbi-dropdown > ul > li .hide-open { display: block; display: initial; } .cbi-dropdown > ul > li .hide-close { display: none; } .cbi-dropdown > ul > li[display]:not([display="0"]) { @@ -1478,7 +1418,7 @@ footer { } .cbi-dropdown[open] > ul.dropdown > li .hide-open { display: none; } -.cbi-dropdown[open] > ul.dropdown > li .hide-close { display: initial; } +.cbi-dropdown[open] > ul.dropdown > li .hide-close { display: block; display: initial; } .cbi-dropdown[open] > ul.dropdown > li { border-bottom: 1px solid #ccc; @@ -1591,16 +1531,16 @@ button.btn::-moz-focus-inner, input[type=submit].btn::-moz-focus-inner { .close { float: right; - color: #000000; + color: #000; font-size: 20px; font-weight: bold; line-height: 13.5px; - text-shadow: 0 1px 0 #ffffff; + text-shadow: 0 1px 0 #fff; opacity: 0.25; } .close:hover { - color: #000000; + color: #000; text-decoration: none; opacity: 0.4; } @@ -1610,11 +1550,8 @@ button.btn::-moz-focus-inner, input[type=submit].btn::-moz-focus-inner { padding: 7px 15px; margin-bottom: 18px; color: #404040; - background-color: #eedc94; - background-repeat: repeat-x; - background-image: linear-gradient(to bottom, #fceec1, #eedc94); + background: linear-gradient(to bottom, #fceec1, #eedc94) repeat-x; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - border-color: #eedc94 #eedc94 #e4c652; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); border-width: 1px; @@ -1637,7 +1574,7 @@ button.btn::-moz-focus-inner, input[type=submit].btn::-moz-focus-inner { .alert-message.error p a, .alert-message.success p a, .alert-message.info p a { - color: #ffffff; + color: #fff; } .alert-message h5 { @@ -1662,7 +1599,7 @@ button.btn::-moz-focus-inner, input[type=submit].btn::-moz-focus-inner { padding: 1px 3px 2px; font-size: 9.75px; font-weight: bold; - color: #ffffff !important; + color: #fff !important; text-transform: uppercase; white-space: nowrap; background-color: #bfbfbf; @@ -1672,7 +1609,7 @@ button.btn::-moz-focus-inner, input[type=submit].btn::-moz-focus-inner { a.label:link, a.label:visited { - color: #ffffff; + color: #fff; } a.label:hover { @@ -1703,7 +1640,7 @@ a.label:hover { #memcache > div, #membuff > div, #conns > div { - border: 1px solid #CCCCCC; + border: 1px solid #ccc; border-radius: 3px 3px 3px 3px; color: #808080; display: inline-block; @@ -1743,6 +1680,7 @@ header .pull-right { padding-top: 8px; } padding: 10px 10px 9px; line-height: 18px; font-weight: bold; + vertical-align: middle; } .cbi-section-table-row[data-title]::before { @@ -1750,10 +1688,11 @@ header .pull-right { padding-top: 8px; } } .left { text-align: left !important; } - .right { text-align: right !important; } - .center { text-align: center !important; } +.top { vertical-align: top !important; } +.middle { vertical-align: middle !important; } +.bottom { vertical-align: bottom !important; } .cbi-value-field { line-height: 1.5em; } @@ -1768,10 +1707,11 @@ table table td, border: none; } -.table.cbi-section-table input, +.table.cbi-section-table input[type="password"], +.table.cbi-section-table input[type="text"], .table.cbi-section-table textarea, .table.cbi-section-table select { - width: auto; + width: 100%; } .table.cbi-section-table .td.cbi-section-table-cell { @@ -1783,10 +1723,34 @@ table table td, width: inherit; } +.td.cbi-section-actions { + text-align: right; + vertical-align: middle; +} + +.td.cbi-section-actions > * { + display: flex; +} + +.td.cbi-section-actions > * > *, +.td.cbi-section-actions > * > form > * { + flex: 1 1 4em; + margin: 0 1px; +} + +.td.cbi-section-actions > * > form { + display: inline-flex; + margin: 0; +} + .table.valign-middle .td { vertical-align: middle; } +.cbi-rowstyle-2 { + background: #f9f9f9; +} + .cbi-value-description { background-image: url(/luci-static/resources/cbi/help.gif); background-position: .25em .2em; @@ -1796,26 +1760,27 @@ table table td, } .cbi-section-error { - border: 1px solid #FF0000; + border: 1px solid #f00; border-radius: 3px; - background-color: #FCE6E6; + background-color: #fce6e6; padding: 5px; + margin-bottom: 18px; } .cbi-section-error ul { margin: 0 0 0 20px; } .cbi-section-error ul li { - color: #FF0000; + color: #f00; font-weight: bold; } .ifacebox { - background-color: #FFFFFF; - border: 1px solid #CCCCCC; + background-color: #fff; + border: 1px solid #ccc; margin: 0 10px; text-align: center; white-space: nowrap; - background-image: linear-gradient(#ffffff, #ffffff 25%, #e6e6e6); + background-image: linear-gradient(#fff, #fff 25%, #f9f9f9); text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); border-radius: 4px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); @@ -1826,7 +1791,7 @@ table table td, } .ifacebox .ifacebox-head { - border-bottom: 1px solid #CCCCCC; + border-bottom: 1px solid #ccc; padding: 2px; background: #eee; } @@ -1836,17 +1801,17 @@ table table td, } .ifacebox .ifacebox-body { - padding: 6px; + padding: .25em; } .ifacebadge { - display: inline-flex; + display: inline-block; flex-direction: row; white-space: nowrap; - background-color: #FFFFFF; - border: 1px solid #CCCCCC; + background-color: #fff; + border: 1px solid #ccc; padding: 2px; - background-image: linear-gradient(#ffffff, #ffffff 25%, #e6e6e6); + background-image: linear-gradient(#fff, #fff 25%, #f9f9f9); text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); border-radius: 4px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); @@ -1858,11 +1823,10 @@ table table td, width: 16px; height: 16px; vertical-align: middle; - margin-right: .25em; } .ifacebadge-active { - border-color: #000000; + border-color: #000; font-weight: bold; } @@ -1883,8 +1847,12 @@ table table td, text-align: left; } +.network-status-table .ifacebox-body > * { + margin: .25em; +} + .network-status-table .ifacebox-body > span { - flex: 10; + flex: 10 10 auto; } .network-status-table .ifacebox-body > div { @@ -1894,18 +1862,23 @@ table table td, .ifacebadge.large, .network-status-table .ifacebox-body .ifacebadge { + display: inline-flex; flex: 1; - margin: .5em .25em 0 .25em; - padding: .5em; + padding: .25em; min-width: 220px; } +.ifacebadge > *, +.ifacebadge.large > * { + margin: 0 .125em; +} + .zonebadge { padding: 2px; border-radius: 4px; display: inline-block; white-space: nowrap; - color: #666666; + color: #666; text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); } @@ -1924,8 +1897,8 @@ table table td, } .zonebadge-empty { - border: 1px dashed #AAAAAA; - color: #AAAAAA; + border: 1px dashed #aaa; + color: #aaa; font-style: italic; font-size: smaller; } @@ -1933,7 +1906,7 @@ table table td, div.cbi-value var, .td.cbi-value-field var { font-style: italic; - color: #0069D6; + color: #0069d6; } .uci-change-list { @@ -1943,8 +1916,8 @@ div.cbi-value var, .uci-change-list ins, .uci-change-legend-label ins { text-decoration: none; - border: 1px solid #00FF00; - background-color: #CCFFCC; + border: 1px solid #0f0; + background-color: #cfc; display: block; padding: 2px; } @@ -1952,8 +1925,8 @@ div.cbi-value var, .uci-change-list del, .uci-change-legend-label del { text-decoration: none; - border: 1px solid #FF0000; - background-color: #FFCCCC; + border: 1px solid #f00; + background-color: #fcc; display: block; font-style: normal; padding: 2px; @@ -1962,8 +1935,8 @@ div.cbi-value var, .uci-change-list var, .uci-change-legend-label var { text-decoration: none; - border: 1px solid #CCCCCC; - background-color: #EEEEEE; + border: 1px solid #ccc; + background-color: #eee; display: block; font-style: normal; padding: 2px; 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 aaacf56b84..6ad32efb47 100644 --- a/themes/luci-theme-bootstrap/luasrc/view/themes/bootstrap/header.htm +++ b/themes/luci-theme-bootstrap/luasrc/view/themes/bootstrap/header.htm @@ -170,6 +170,7 @@ <% if css then %> <style title="text/css"><%= css %></style> <% end -%> + <script src="<%=resource%>/cbi.js"></script> <script src="<%=resource%>/xhr.js"></script> </head> diff --git a/themes/luci-theme-freifunk-generic/luasrc/view/themes/freifunk-generic/header.htm b/themes/luci-theme-freifunk-generic/luasrc/view/themes/freifunk-generic/header.htm index b6ed1f7134..4a1c7b6440 100644 --- a/themes/luci-theme-freifunk-generic/luasrc/view/themes/freifunk-generic/header.htm +++ b/themes/luci-theme-freifunk-generic/luasrc/view/themes/freifunk-generic/header.htm @@ -81,6 +81,7 @@ </style> <% end -%> <meta name="viewport" content="initial-scale=1.0" /> +<script type="text/javascript" src="<%=resource%>/cbi.js"></script> <script type="text/javascript" src="<%=resource%>/xhr.js"></script> <title><%=striptags( (boardinfo.hostname or "?") .. ( (node and node.title) and ' - ' .. translate(tostring(node.title)) or '')) %> - LuCI</title> diff --git a/themes/luci-theme-material/htdocs/luci-static/material/css/style.css b/themes/luci-theme-material/htdocs/luci-static/material/css/style.css index 17db81edb3..01fef2110a 100755 --- a/themes/luci-theme-material/htdocs/luci-static/material/css/style.css +++ b/themes/luci-theme-material/htdocs/luci-static/material/css/style.css @@ -59,11 +59,23 @@ bottom: 0; text-align: center; line-height: 3em; + background: inherit; } .table[width="33%"], .th[width="33%"], .td[width="33%"] { width: 33%; } .table[width="100%"], .th[width="100%"], .td[width="100%"] { width: 100%; } +.col-1 { flex: 1 1 30px !important; -webkit-flex: 1 1 30px !important; } +.col-2 { flex: 2 2 60px !important; -webkit-flex: 2 2 60px !important; } +.col-3 { flex: 3 3 90px !important; -webkit-flex: 3 3 90px !important; } +.col-4 { flex: 4 4 120px !important; -webkit-flex: 4 4 120px !important; } +.col-5 { flex: 5 5 150px !important; -webkit-flex: 5 5 150px !important; } +.col-6 { flex: 6 6 180px !important; -webkit-flex: 6 6 180px !important; } +.col-7 { flex: 7 7 210px !important; -webkit-flex: 7 7 210px !important; } +.col-8 { flex: 8 8 240px !important; -webkit-flex: 8 8 240px !important; } +.col-9 { flex: 9 9 270px !important; -webkit-flex: 9 9 270px !important; } +.col-10 { flex: 10 10 300px !important; -webkit-flex: 10 10 300px !important; } + .cbi-button-up, .cbi-button-down, .cbi-value-helpicon, @@ -461,7 +473,7 @@ h4 { } .cbi-section { - margin: 2rem 0 0 0; + margin: 1rem 0 0 0; padding: 2rem; border: 0; font-weight: normal; @@ -491,6 +503,7 @@ fieldset > fieldset { box-shadow: none; } +.cbi-section > h3:first-child, .panel-title { width: 100%; display: block; @@ -499,6 +512,7 @@ fieldset > fieldset { font-size: 1.4rem; padding-bottom: 1rem; border-bottom: 1px solid #eee; + margin: 0; } table { @@ -518,41 +532,18 @@ table > tbody > tr > td, table > tbody > tr > th, table > tfoot > tr > td, table white-space: nowrap; } -.td.cbi-value-field, -.cbi-section-table-cell { - text-align: center; - display: inline-block; - flex: 10; -} - .cbi-section-table-cell { white-space: nowrap; align-self: flex-end; - flex: 1; -} - -.td.cbi-value-field[data-title]::before { - content: attr(data-title); - padding: .5rem; - display: block; - white-space: nowrap; + flex: 1 1 auto; } .cbi-section-table { border: none; } -.tr.cbi-section-table-titles, -.tr.cbi-section-table-descr { - display: none; -} - .cbi-section-table-row { text-align: center; - display: flex; - flex-wrap: wrap; - flex-direction: row; - justify-content: space-between; margin-bottom: 1rem; background: #f4f4f4; box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .16), 0 0 2px 0 rgba(0, 0, 0, .12); @@ -562,17 +553,6 @@ table > tbody > tr > td, table > tbody > tr > th, table > tfoot > tr > td, table margin-bottom: 0; } -.cbi-section-table-row[data-title]::before { - content: attr(data-title); - display: block; - width: 100%; - margin: .25rem; - padding: .25rem .25rem .5rem .25rem; - border-bottom: 1px solid rgba(0, 0, 0, .26); - text-align: center; - font-size: 1rem; -} - .cbi-section-table-row > .cbi-value-field .cbi-input-select, .cbi-section-table-row > .cbi-value-field .cbi-input-text, .cbi-section-table-row > .cbi-value-field .cbi-input-password, @@ -580,6 +560,11 @@ table > tbody > tr > td, table > tbody > tr > th, table > tfoot > tr > td, table width: 100%; } +.cbi-section-table-row > .cbi-value-field [data-dynlist] > input, +.cbi-section-table-row > .cbi-value-field input.cbi-input-password { + width: calc(100% - 1.5rem); +} + div > table > tbody > tr:nth-of-type(2n), div > .table > .tbody > .tr:nth-of-type(2n) { background-color: #f9f9f9; @@ -667,11 +652,13 @@ td > table > tbody > tr > td, .btn:active, .cbi-button:hover, .cbi-button:focus, -.cbi-button:active { - color: rgba(0, 0, 0, 0.87); +.cbi-button:active, +.cbi-page-actions .cbi-button-apply + .cbi-button-save:hover, +.cbi-page-actions .cbi-button-apply + .cbi-button-save:focus, +.cbi-page-actions .cbi-button-apply + .cbi-button-save:active { outline: 0; text-decoration: none; - color: rgba(0, 0, 0, 0.87); + background-color: rgba(250, 250, 250, 0.7); } .btn:hover, @@ -694,45 +681,69 @@ td > table > tbody > tr > td, box-shadow: none; } -.btn + .btn, -form.inline + form.inline, -.cbi-button + .cbi-button { - margin-left: 0.6rem; +.cbi-page-actions .cbi-button-apply, +.cbi-section-actions .cbi-button-edit, +.cbi-button-edit.important, +.cbi-button-apply.important, +.cbi-button-reload.important, +.cbi-button-action.important { + color: #fff; + background-color: #337ab7; } -.cbi-button-reset, -.cbi-input-remove { - color: #fff !important; - background-color: #f0ad4e !important; - border-color: #eea236 !important; +.cbi-page-actions .cbi-button-save, +.cbi-button-add.important, +.cbi-button-save.important, +.cbi-button-positive.important { + color: #fff; + background-color: #5bc0de; +} + +.cbi-button-remove.important, +.cbi-button-reset.important, +.cbi-button-negative.important { + color: #fff; + background-color: #d9534f; } -.cbi-input-find, -.cbi-input-save, -.cbi-button-add, -.cbi-button-save, .cbi-button-find, -.cbi-input-reload, -.cbi-button-reload { - color: #fff !important; - background-color: #337ab7 !important; - border-color: #2e6da4 !important; +.cbi-button-link, +.cbi-button-up, +.cbi-button-down, +.cbi-button-neutral { + border: 1px solid #bfbfbf; + background-color: transparent; } -.cbi-input-apply, +.cbi-button-edit, .cbi-button-apply, -.cbi-button-edit { - color: #fff !important; - background-color: #5bc0de !important; - border-color: #46b8da !important; +.cbi-button-reload, +.cbi-button-action { + color: #2e6da4; + border: 1px solid #2e6da4; + background-color: transparent; +} + +.cbi-page-actions .cbi-button-apply + .cbi-button-save, +.cbi-button-add, +.cbi-button-save, +.cbi-button-positive { + color: #46b8da; + border: 1px solid #46b8da; + background-color: transparent; } -.cbi-input-reset, .cbi-section-remove > .cbi-button, -.cbi-button-remove { - color: #fff !important; - background-color: #d9534f !important; - border-color: #d43f3a !important; +.cbi-button-remove, +.cbi-button-reset, +.cbi-button-negative { + color: #d43f3a; + border: 1px solid #d43f3a; + background-color: transparent; +} + +.cbi-page-actions .cbi-button-link:first-child { + float: left; } .a-to-btn { @@ -852,6 +863,37 @@ form.inline + form.inline, border: none; } +.td[data-title]::before { + content: attr(data-title) ":\20"; + font-weight: bold; + text-align: left; + display: none; + padding: .25rem 0; + white-space: nowrap; +} + +.tr.placeholder .td[data-title]::before { + display: none; +} + +.tr[data-title]::before, +.tr.cbi-section-table-titles.named::before { + content: attr(data-title) "\20"; + font-weight: bold; + text-align: center; + display: table-cell; + align-self: center; + flex: 1 1 5%; + padding: .25rem; + white-space: normal; + word-wrap: break-word; + vertical-align: middle; +} + +.cbi-rowstyle-1 { + background-color: #f9f9f9; +} + .cbi-rowstyle-2 { background-color: #eee; } @@ -865,6 +907,26 @@ form.inline + form.inline, width: auto !important; } +.td.cbi-section-actions { + text-align: right; + vertical-align: middle; +} + +.td.cbi-section-actions > * { + display: flex; +} + +.td.cbi-section-actions > * > *, +.td.cbi-section-actions > * > form > * { + flex: 1 1 4em; + margin: 0 1px; +} + +.td.cbi-section-actions > * > form { + display: inline-flex; + margin: 0; +} + /* desc */ .cbi-section-descr, .cbi-map-descr { @@ -1045,18 +1107,28 @@ form.inline + form.inline, display: none } -.left { +.left, .left::before { text-align: left !important; } -.right { +.right, .right::before { text-align: right !important; } -.center { +.center, .center::before { text-align: center !important; } +.top { + align-self: flex-start !important; + vertical-align: top !important; +} + +.bottom { + align-self: flex-end !important; + vertical-align: bottom !important; +} + .inline { display: inline; } @@ -1082,6 +1154,12 @@ form.inline + form.inline, width: 15rem; } +.th[data-type="button"], .td[data-type="button"], +.th[data-type="fvalue"], .td[data-type="fvalue"] { + flex: 1 1 2em; + text-align: center; +} + .ifacebadge { display: inline-flex; border-bottom: 1px solid #CCCCCC; @@ -1124,7 +1202,7 @@ td > .ifacebadge, } .network-status-table .ifacebox-body > span { - flex: 10; + flex: 10 10 auto; } .network-status-table .ifacebox-body > div { @@ -1133,7 +1211,7 @@ td > .ifacebadge, } .network-status-table .ifacebox-body .ifacebadge { - flex: 1; + flex: 1 1 auto; margin: .5em .25em 0 .25em; padding: .5em; min-width: 220px; @@ -1249,7 +1327,8 @@ td > .ifacebadge, } .ifacebox { - border: 1px solid #999; + box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 1px 2px rgba(0, 0, 0, 0.2); + border-bottom: 1px solid #ccc; background-color: #f9f9f9; display: inline-flex; flex-direction: column; @@ -1303,6 +1382,11 @@ td > .ifacebadge, height: 1rem; } +.td .cbi-input-checkbox, +.td .cbi-input-radio { + margin-top: 0; +} + .cbi-value-field > input + .cbi-value-description { padding: 0; } @@ -1805,10 +1889,29 @@ body.lang_pl.node-main-login .cbi-value-title { } .th, .td { - flex: 1; - flex-basis: 33%; + flex: 2 2 25%; + align-self: flex-start; overflow: hidden; text-overflow: ellipsis; + word-wrap: break-word; + display: inline-block; + } + + .td select, + .td input[type="text"] { + word-wrap: normal; + width: 100%; + } + + .td [data-dynlist] > input, + .td input.cbi-input-password { + width: calc(100% - 1.5rem); + } + + .td[data-type="button"], + .td[data-type="fvalue"] { + flex: 1 1 12.5%; + text-align: left; } .th.cbi-value-field, @@ -1817,6 +1920,54 @@ body.lang_pl.node-main-login .cbi-value-title { .td.cbi-section-table-cell { flex-basis: auto; } + + .cbi-section-table-row { + display: flex; + flex-wrap: wrap; + flex-direction: row; + justify-content: space-between; + } + + .td.cbi-value-field, + .cbi-section-table-cell { + text-align: center; + display: inline-block; + flex: 10 10 auto; + } + + .td.cbi-section-actions { + text-align: right; + align-self: flex-end; + vertical-align: bottom; + } + + .tr.table-titles, + .tr.cbi-section-table-titles, + .tr.cbi-section-table-descr { + display: none; + } + + .tr[data-title]::before, + .tr.cbi-section-table-titles.named::before { + display: block; + flex: 1 1 100%; + background: #eef; + font-size: .9rem; + border-bottom: 1px solid rgba(0, 0, 0, .26); + } + + .td[data-title] { + text-align: left; + } + + .td[data-title]::before { + display: block; + } + + .hide-sm, + .hide-xs { + display: none; + } } @media screen and (max-width: 480px) { @@ -1959,6 +2110,25 @@ body.lang_pl.node-main-login .cbi-value-title { .td.cbi-value-field { flex-basis: 100%; } + + .td.cbi-value-field[data-type="dvalue"] { + flex-basis: 50%; + } + + .td.cbi-value-field[data-type="button"], + .td.cbi-value-field[data-type="fvalue"] { + flex-basis: 25%; + text-align: left; + } + + .tr[data-title]::before, + .tr.cbi-section-table-titles.named::before { + font-size: 1rem; + } + + .hide-xs { + display: none; + } } @media screen and (min-width: 992px) { diff --git a/themes/luci-theme-material/luasrc/view/themes/material/header.htm b/themes/luci-theme-material/luasrc/view/themes/material/header.htm index b6341a2c35..f97db25751 100644 --- a/themes/luci-theme-material/luasrc/view/themes/material/header.htm +++ b/themes/luci-theme-material/luasrc/view/themes/material/header.htm @@ -211,6 +211,7 @@ <% if css then %> <style title="text/css"><%= css %></style> <% end -%> + <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 %> <% if luci.dispatcher.context.authsession then %>logged-in<% end %>"> diff --git a/themes/luci-theme-openwrt/htdocs/luci-static/openwrt.org/cascade.css b/themes/luci-theme-openwrt/htdocs/luci-static/openwrt.org/cascade.css index 4bde3eaea2..29e7827aa4 100644 --- a/themes/luci-theme-openwrt/htdocs/luci-static/openwrt.org/cascade.css +++ b/themes/luci-theme-openwrt/htdocs/luci-static/openwrt.org/cascade.css @@ -19,8 +19,7 @@ body { background-position: bottom center; background-repeat: repeat-x; font-family: Arial, Verdana, sans-serif; - font-size: 16px; - line-height: 100%; + font-size: 10pt; padding-bottom: 1.5em; } @@ -87,7 +86,7 @@ a img { background: #f5f5f5; border: 1px solid #444; border-width: 0 0 1px 1px; - font-size: 85%; + font-size: 11pt; padding-bottom: 1em; } @@ -249,18 +248,11 @@ hr { color: #650; } -.alert-message .btn, -.alert-message .cbi-button { - background: inherit; - border-color: inherit; -} - div.hostinfo { float: left; margin: 0; padding: 0; width: auto; - font-size: 80%; padding: 0.5em; } @@ -302,8 +294,6 @@ html #menubar a:visited { background: #000000; color: #ffffff; text-decoration: none; - font-size: 80%; - font-weight: normal; } @@ -384,7 +374,6 @@ textarea#syslog { padding: 0.5em; background: #f5f5f5; color: #000000; - font-size: 80%; border-width: 0 1px 1px 1px; border-style: solid; border-color: #444444; @@ -417,8 +406,8 @@ fieldset { border: none; } fieldset > legend { float: left; } fieldset > legend + * { clear: both; } -#maincontent p { - margin-bottom: 1em; +p { + margin-bottom: .5em; } .cbi-section { @@ -484,7 +473,7 @@ input[type=image] { } input:focus, -input:not(.cbi-button):hover, +input:not(.btn):not(.cbi-button):hover, select:focus, select:hover { background-color: #ffffff; @@ -609,6 +598,11 @@ img.cbi-image-button { background: #595; } +.cbi-button-negative.important { + color: #fff; + background: #a22; +} + .cbi-page-actions .cbi-button-apply + .cbi-button-save { background: #fff; color: #595; @@ -698,6 +692,7 @@ table td, table th { width: auto; margin-left: 0; align-self: center; + vertical-align: middle; } .cbi-value-description { @@ -797,6 +792,13 @@ div.cbi-optionals { .th.cbi-section-actions, .td.cbi-section-actions { + overflow: visible; + align-self: center; + vertical-align: middle; +} + +.th.cbi-section-actions > *, +.td.cbi-section-actions > * { display: flex; justify-content: flex-end; flex-direction: row; @@ -804,14 +806,15 @@ div.cbi-optionals { margin: auto -1px auto auto; } -.td.cbi-section-actions > form { - display: flex; +.td.cbi-section-actions > * > *, +.td.cbi-section-actions > * > form > * { + flex: 1 1 4em; + margin: 0 1px; } -.td.cbi-section-actions > *, -.td.cbi-section-actions > form > * { - flex: 1 1 4em; - margin: 1px; +.td.cbi-section-actions > * > form { + display: flex; + margin: 0; } .cbi-page-actions { @@ -839,6 +842,11 @@ div.cbi-optionals { margin-right: auto; } +*::-ms-backdrop, +.cbi-page-actions > .cbi-button-link, +.cbi-page-actions > form[method="get"]:first-child { + margin-right: 50%; +} .th[data-type="button"], .td[data-type="button"], .th[data-type="fvalue"], .td[data-type="fvalue"] { @@ -851,10 +859,6 @@ div.cbi-optionals { flex-basis: 12%; } -#cbi-wireless-overview .td:first-child { - align-self: center; -} - .td[data-title]::before { content: attr(data-title) ":\20"; font-weight: bold; @@ -873,12 +877,13 @@ div.cbi-optionals { content: attr(data-title) "\20"; font-weight: bold; text-align: left; - display: inline-block; + display: table-cell; align-self: center; flex: 1 1 5%; padding: .25em; white-space: normal; word-wrap: break-word; + vertical-align: middle; } .cbi-value-helpicon img { @@ -935,7 +940,7 @@ ul.cbi-tabmenu li a:hover { text-decoration: none; color: inherit; padding: 5px; - flex: 1; + flex: 1 1 auto; width: 100%; height: 100%; } @@ -1172,29 +1177,17 @@ ul.cbi-tabmenu li.cbi-tab { } -.left, .left::before { - text-align: left !important; -} - -.right, .right::before { - text-align: right !important; -} - -.center, .center::before { - text-align: center !important; -} - -.td.bottom { - align-self: flex-end; -} +.left, .left::before { text-align: left !important; } +.right, .right::before { text-align: right !important; } +.center, .center::before { text-align: center !important; } -.td.top { - align-self: flex-start; -} +.top, .top::before { vertical-align: top !important; } +.middle, .middle::before { vertical-align: middle !important; } +.bottom, .bottom::before { vertical-align: bottom !important; } -.td.middle { - align-self: center; -} +.td.top { align-self: flex-start; vertical-align: top; } +.td.middle { align-self: center; vertical-align: middle; } +.td.bottom { align-self: flex-end; vertical-align: bottom; } .luci { position: absolute; @@ -1202,6 +1195,7 @@ ul.cbi-tabmenu li.cbi-tab { left: 1em; height: 1.5em; font-size: 80%; + margin-bottom: 0; } .luci a:link, @@ -1232,7 +1226,6 @@ ul.cbi-tabmenu li.cbi-tab { border-radius: 3px; padding: 2px; background: #fff; - margin: .25em .5em; } .ifacebox-head { @@ -1284,7 +1277,7 @@ ul.cbi-tabmenu li.cbi-tab { .network-status-table { display: flex; flex-wrap: wrap; - margin: -.25em; + margin: -.25em -.25em .25em -.25em; } .network-status-table .ifacebox { @@ -1296,11 +1289,12 @@ ul.cbi-tabmenu li.cbi-tab { .network-status-table .ifacebox-body { display: flex; flex-direction: column; - flex: 1 0; + flex: 1 0 auto; + padding: .5em; } .network-status-table .ifacebox-body > span { - flex: 10; + flex: 10 10 auto; } .network-status-table .ifacebox-body > div { @@ -1312,12 +1306,15 @@ ul.cbi-tabmenu li.cbi-tab { .network-status-table .ifacebox-body .ifacebadge { flex: 1; -webkit-flex: 1 1 auto; - margin: .5em .25em .25em .25em; padding: .5em; min-width: 220px; white-space: nowrap; } +.network-status-table .ifacebox-body .ifacebadge { + margin: .5em 0 0 0; +} + .zonebadge { padding: 2px; @@ -1440,6 +1437,7 @@ ul.cbi-tabmenu li.cbi-tab { #maincontent { width: 96%; margin: auto; + flex-basis: auto; } #mainmenu { @@ -1465,7 +1463,7 @@ ul.cbi-tabmenu li.cbi-tab { } #mainmenu ul > li > a { - flex: 1; + flex: 1 1 auto; color: #fff; border: 1px solid #444; border-width: 0 0 1px 1px; @@ -1602,15 +1600,8 @@ ul.cbi-tabmenu li.cbi-tab { display: block; } - .td.cbi-section-actions { - flex-basis: 100%; - margin: auto -1px 0 auto; - } - - .td.cbi-section-actions > *, - .td.cbi-section-actions > form > * { - flex: 0 1 100%; - max-width: 150px; + .td[data-title] ~ .td.cbi-section-actions { + align-self: flex-end; } .hide-sm, diff --git a/themes/luci-theme-openwrt/luasrc/view/themes/openwrt.org/header.htm b/themes/luci-theme-openwrt/luasrc/view/themes/openwrt.org/header.htm index 773cf1f82e..e77f9a4bfe 100644 --- a/themes/luci-theme-openwrt/luasrc/view/themes/openwrt.org/header.htm +++ b/themes/luci-theme-openwrt/luasrc/view/themes/openwrt.org/header.htm @@ -87,6 +87,9 @@ local childs = disp.node_childs(node) if #childs > 0 then if level > 2 then + if level == 3 then + write('<div id="tabmenu">') + end write('<ul class="cbi-tabmenu">') end @@ -112,6 +115,9 @@ if level > 2 then write('</ul>') + if level == 3 then + write('</div>') + end end if selected_node then @@ -157,6 +163,7 @@ <%= css %> </style> <% end -%> +<script type="text/javascript" src="<%=resource%>/cbi.js"></script> <script type="text/javascript" src="<%=resource%>/xhr.js"></script> <script type="text/javascript">//<![CDATA[ document.addEventListener('DOMContentLoaded', function() { @@ -240,9 +247,7 @@ </div> <div id="maincontent"> - <div id="tabmenu"> - <% if category then render_tabmenu(category, cattree) end %> - </div> + <% if category then render_tabmenu(category, cattree) end %> <noscript> <div class="alert-message warning"> |