diff options
Diffstat (limited to 'themes')
8 files changed, 2157 insertions, 797 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 4a40f6d680..72f087580d 100644 --- a/themes/luci-theme-bootstrap/htdocs/luci-static/bootstrap/cascade.css +++ b/themes/luci-theme-bootstrap/htdocs/luci-static/bootstrap/cascade.css @@ -215,7 +215,8 @@ a:hover { * ---------------------------------------------------------------------------------------- */ p, .cbi-map-descr, -.cbi-section-descr { +.cbi-section-descr, +.table .tr.cbi-section-table-descr .th { font-size: 13px; font-weight: normal; line-height: 18px; @@ -229,7 +230,7 @@ p small { h1, h2, -h3, +h3, legend, h4, h5, h6 { @@ -265,14 +266,14 @@ h2 small { font-size: 14px; } -h3, +h3, legend, h4, h5, h6 { line-height: 36px; } -h3 { +h3, legend { font-size: 18px; } @@ -543,6 +544,13 @@ textarea { height: auto; } +.td > input[type=text], +.td > input[type=password], +.td > select, +.td > .cbi-dropdown { + width: 100%; +} + .uneditable-input { background-color: #ffffff; display: block; @@ -645,6 +653,26 @@ textarea[readonly] { border-color: #ddd; } +.cbi-optionals, +.cbi-section-create { + padding: 0 0 10px 10px; +} + +.cbi-section-create { + margin: -3px; + display: inline-flex; + align-items: center; +} + +.cbi-section-create > * { + margin: 3px; + flex: 1 1 auto; +} + +.cbi-section-create > * > input { + width: 100%; +} + .actions, .cbi-page-actions { background: #f5f5f5; @@ -670,6 +698,10 @@ textarea[readonly] { text-decoration: underline; } +.cbi-page-actions > form { + display: inline; +} + .help-inline, .help-block { font-size: 13px; line-height: 18px; @@ -706,6 +738,7 @@ textarea[readonly] { padding: 0; font-size: 13px; border-collapse: collapse; + position: relative; } .table .th, .table .td { @@ -732,6 +765,19 @@ textarea[readonly] { vertical-align: top; } +.tr.placeholder { + height: calc(3em + 20px); +} + +.tr.placeholder > .td { + position: absolute; + left: 0; + right: 0; + bottom: 0; + text-align: center; + line-height: 3em; +} + /* Patterns.less * Repeatable UI elements outside the base styles provided from the scaffolding * ---------------------------------------------------------------------------- */ @@ -1244,99 +1290,67 @@ footer { outline: 1px dotted #666; } -.btn.primary, -.cbi-page-actions .cbi-button-apply, -.cbi-page-actions .cbi-button-save, -.cbi-page-actions .cbi-button-reset { - color: #ffffff; - padding: 5px 14px 6px; - background-color: #0064cd; - background-repeat: repeat-x; - background-image: linear-gradient(to bottom, #049cdb, #0064cd); - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - border-color: #0064cd #0064cd #003f81; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); -} - .cbi-input-invalid, .cbi-value-error input { color: #FF0000; border-color: #FF0000; } -.cbi-button-up, -.cbi-input-up { - background-position: center center; - background-image: url('../resources/cbi/up.gif'), linear-gradient(#ffffff, #ffffff 25%, #e6e6e6); -} - -.cbi-button-down, -.cbi-input-down { - background-position: center center; - background-image: url('../resources/cbi/down.gif'), linear-gradient(#ffffff, #ffffff 25%, #e6e6e6); +.cbi-button-positive, +.cbi-button-fieldadd, +.cbi-button-add, +.cbi-button-save { + border-color: #4a4; + color: #4a4; } +.cbi-button-neutral, +.cbi-button-download, .cbi-button-find, -.cbi-input-find { - background-position: 6px center, left top; - padding-left: 28px; - background-image: url('../resources/cbi/find.gif'), linear-gradient(#ffffff, #ffffff 25%, #e6e6e6); -} - -.cbi-button-add, -.cbi-input-add { - background-position: 6px center, left top; - padding-left: 28px; - background-image: url('../resources/cbi/add.gif'), linear-gradient(#ffffff, #ffffff 25%, #e6e6e6); +.cbi-button-link, +.cbi-button-up, +.cbi-button-down { + border-color: #444; + color: #444; } +.btn.primary, +.cbi-button-action, .cbi-button-apply, -.cbi-input-apply { - background-position: 6px center, left top; - padding-left: 28px; - background-image: url('../resources/cbi/apply.gif'), linear-gradient(#ffffff, #ffffff 25%, #e6e6e6); +.cbi-button-reload, +.cbi-button-edit { + border-color: #0069d6; + color: #0069d6; } +.cbi-button-negative, +.cbi-section-remove .cbi-button, .cbi-button-reset, -.cbi-input-reset { - background-position: 6px center, left top; - padding-left: 28px; - background-image: url('../resources/cbi/reset.gif'), linear-gradient(#ffffff, #ffffff 25%, #e6e6e6); +.cbi-button-remove { + border-color: #c44; + color: #c44; } -.cbi-button-edit, -.cbi-input-edit { - background-position: 6px center, left top; - padding-left: 28px; - background-image: url('../resources/cbi/edit.gif'), linear-gradient(#ffffff, #ffffff 25%, #e6e6e6); -} - -.cbi-button-remove, -.cbi-input-remove { - background-position: 6px center, left top; - padding-left: 28px; - background-image: url('../resources/cbi/remove.gif'), linear-gradient(#ffffff, #ffffff 25%, #e6e6e6); -} - -.cbi-button-reload, -.cbi-input-reload { - background-position: 6px center, left top; - padding-left: 28px; - background-image: url('../resources/cbi/reload.gif'), linear-gradient(#ffffff, #ffffff 25%, #e6e6e6); +.btn.primary, +.cbi-button-action.important, +.cbi-page-actions .cbi-button-apply, +.cbi-section-actions .cbi-button-edit { + color: #fff; + background: #0069d6; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); } -.cbi-button-link, -.cbi-input-link { - background-position: 6px center, left top; - padding-left: 28px; - background-image: url('../resources/cbi/link.gif'), linear-gradient(#ffffff, #ffffff 25%, #e6e6e6); +.cbi-button-positive.important, +.cbi-page-actions .cbi-button-save { + color: #fff; + background: #4a4; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); } -.cbi-button-download, -.cbi-input-download { - background-position: 6px center, left top; - padding-left: 28px; - background-image: url('../resources/cbi/download.gif'), linear-gradient(#ffffff, #ffffff 25%, #e6e6e6); +.cbi-page-actions .cbi-button-apply + .cbi-button-save { + background: linear-gradient(#ffffff, #ffffff 25%, #e6e6e6); + text-shadow: 0 -1px 0 rgba(255, 255, 255, 0.75); + color: #4a4; } .cbi-dropdown { @@ -1492,6 +1506,58 @@ footer { opacity: .6; } +.cbi-tooltip-container { + cursor: help; +} + +.cbi-tooltip { + position: absolute; + z-index: 1000; + left: -1000px; + opacity: 0; + transition: opacity .25s ease-out; +} + +.cbi-tooltip-container:hover .cbi-tooltip:not(:empty) { + left: auto; + opacity: 1; + transition: opacity .25s ease-in; +} + +.zonebadge .cbi-tooltip { + padding: 1px; + background: inherit; + margin: -1.6em 0 0 -5px; + border-radius: 3px; + pointer-events: none; + box-shadow: 0 0 3px #444; +} + +.zonebadge .cbi-tooltip > * { + margin: 1px; +} + +.zone-forwards { + display: flex; + flex-wrap: wrap; +} + +.zone-forwards > * { + flex: 1 1 40%; + padding: 1px; +} + +.zone-forwards > span { + flex-basis: 10%; + text-align: center; +} + +.zone-forwards .zone-src, +.zone-forwards .zone-dest { + display: flex; + flex-direction: column; +} + .btn.active, .btn:active { box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05); } @@ -1522,46 +1588,6 @@ footer { font-size: 11px; } -/* Button icons for specific pages */ -.Startup .cbi-section-table input.cbi-input-apply, -.Startup .cbi-section-table input.cbi-button-apply { - background-image: url("../resources/cbi/apply.gif"); - background-position: 7px 4px; - padding: 3px 9px 3px 27px; -} - -.Processes .cbi-section-table input.cbi-input-reload, -.Startup .cbi-section-table input.cbi-input-reload { - background-image: url("../resources/cbi/reload.gif"); - background-position: 7px 4px; - padding: 3px 9px 3px 27px; -} - -.Processes .cbi-section-table input.cbi-input-remove, -.Processes .cbi-section-table div.cbi-section-remove input, -.Startup .cbi-section-table input.cbi-input-remove, -.Startup .cbi-section-table div.cbi-section-remove input { - background-image: url("../resources/cbi/remove.gif"); - background-position: 7px 4px; - padding: 3px 9px 3px 27px; -} - -.Processes .cbi-section-table input.cbi-input-reset, -.Processes .cbi-section-table input.cbi-button-reset, -.Startup .cbi-section-table input.cbi-input-reset, -.Startup .cbi-section-table input.cbi-button-reset { - background-image: url("../resources/cbi/reset.gif"); - background-position: 7px 4px; - padding: 3px 9px 3px 27px; -} - -.Startup .cbi-section-table input.cbi-input-save, -.Startup .cbi-section-table input.cbi-button-save { - background-image: url("../resources/cbi/save.gif"); - background-position: 7px 4px; - padding: 3px 9px 3px 27px; -} - button.btn::-moz-focus-inner, input[type=submit].btn::-moz-focus-inner { padding: 0; border: 0; @@ -1713,6 +1739,20 @@ header .pull-right { padding-top: 8px; } font-weight: normal; } +.cbi-section-table-titles.named::before, +.cbi-section-table-descr.named::before, +.cbi-section-table-row[data-title]::before { + content: attr(data-title) " "; + display: table-cell; + padding: 10px 10px 9px; + line-height: 18px; + font-weight: bold; +} + +.cbi-section-table-row[data-title]::before { + border-top: 1px solid #ddd; +} + .left { text-align: left !important; } .right { text-align: right !important; } @@ -1751,15 +1791,20 @@ table table td, vertical-align: middle; } -.cbi-value-description { display: inline; } - -.cbi-value-description img { vertical-align: middle; } +.cbi-value-description { + background-image: url(/luci-static/resources/cbi/help.gif); + background-position: .25em .2em; + background-repeat: no-repeat; + margin: .25em 0 0 0; + padding: 0 0 0 1.7em; +} .cbi-section-error { border: 1px solid #FF0000; border-radius: 3px; background-color: #FCE6E6; padding: 5px; + margin-bottom: 18px; } .cbi-section-error ul { margin: 0 0 0 20px; } @@ -1852,6 +1897,7 @@ table table td, flex-wrap: wrap; } +.ifacebadge.large, .network-status-table .ifacebox-body .ifacebadge { flex: 1; margin: .5em .25em 0 .25em; @@ -1866,7 +1912,6 @@ table table td, white-space: nowrap; color: #666666; text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); - cursor: pointer; } .zonebadge > em, diff --git a/themes/luci-theme-freifunk-generic/htdocs/luci-static/freifunk-generic/bg.jpg b/themes/luci-theme-freifunk-generic/htdocs/luci-static/freifunk-generic/bg.jpg Binary files differdeleted file mode 100644 index 822527ead8..0000000000 --- a/themes/luci-theme-freifunk-generic/htdocs/luci-static/freifunk-generic/bg.jpg +++ /dev/null diff --git a/themes/luci-theme-freifunk-generic/htdocs/luci-static/freifunk-generic/cascade.css b/themes/luci-theme-freifunk-generic/htdocs/luci-static/freifunk-generic/cascade.css index ed97427c91..d5e87ebef0 100644 --- a/themes/luci-theme-freifunk-generic/htdocs/luci-static/freifunk-generic/cascade.css +++ b/themes/luci-theme-freifunk-generic/htdocs/luci-static/freifunk-generic/cascade.css @@ -9,7 +9,7 @@ html { body { color: #ccc; - background:#e5eef5 url(bg.jpg) repeat-x top left; + background: #e5eef5 linear-gradient(#fff 0%, #e5eef5 100%) no-repeat; font-family: Verdana, Arial, sans-serif; font-size: 100%; line-height: 100%; @@ -23,6 +23,42 @@ html, body { * { margin: 0; padding: 0; + box-sizing: border-box; +} + +.table { display: table; width: 100%; position: relative; } +.tr { display: table-row; } +.thead { display: table-header-group; } +.tbody { display: table-row-group; } +.tfoot { display: table-footer-group; } +.td, .th { display: table-cell; } +.th { font-weight: bold; } + +.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; } + +.tr.placeholder { + height: 3.5em; +} + +.tr.placeholder > .td { + position: absolute; + left: 1px; + right: 1px; + bottom: 1px; + text-align: center; + line-height: 3em; } abbr, @@ -49,6 +85,34 @@ code { white-space: pre; } +h2, h3, h4, legend { + font-size: 150%; + font-family: Trebuchet MS, Verdana, sans-serif; + font-weight: bold; + margin: .25em 0 .5em 0; + border-bottom: 1px solid; + padding-bottom: 4px; + display: block; + width: 100%; +} + +h3, legend { + font-size: 125%; +} + +h4 { + font-size: 112%; +} + +.cbi-section-node + h4 { + margin-top: 1em; +} + +fieldset { border: none; } + +fieldset > legend { float: left; } +fieldset > legend + * { clear: both; } + #maincontent ul { margin-left: 2em; } @@ -85,37 +149,63 @@ a img { background-color: white; } -.errorbox { - border: 1px solid #F00; - background-color: #FCC; - padding: 5px; +.alert-message { + font-weight: normal; + padding: .5em; + border-radius: 3px; + color: #000; } +.alert-message.notice { + background: linear-gradient(#ccc 0%, #eee 100%); + color: #4a6b7c; +} -.ifacebox { - background-color: #FFFFFF; - border: 1px solid #CCCCCC; - margin: 0 10px; - text-align: center; - white-space: nowrap; +.alert-message.warning { + background: linear-gradient(#dda 0%, #dd8 100%); + color: #c00; } -.ifacebox .ifacebox-head { - border-bottom: 1px solid #CCCCCC; - padding: 2px; +.alert-message > * { + margin: .5em; } -.ifacebox .ifacebox-body { - padding: 2px; +.alert-message > h4 { + font-weight: bold; } -.ifacebadge { - background-color: #FFFFFF; - border: 1px solid #CCCCCC; +.ifacebadge, .ifacebox { + display: inline-flex; + align-content: center; + border: 1px solid #ccc; + border-radius: 3px; padding: 2px; - margin-left: 2px; + background: #fff; + margin: .25em .5em; +} + +.ifacebox-head { + background: #eee; +} + +.ifacebox-head.active { + background: #90c0e0; +} + +.ifacebadge, .zonebadge { + align-items: center; +} + +.ifacebadge > * { + align-self: flex-start; +} + +.ifacebadge > img, +.ifacebadge > em { + margin-right: 5px; display: inline-block; + height: 16px; } .ifacebadge-active { @@ -123,18 +213,70 @@ a img { font-weight: bold; } +.ifacebox { + flex-direction: column; + margin: 0; + padding: 0; + min-width: 100px; + text-align: center; +} + +.ifacebox > * { + padding: 2px; +} + +.td > .ifacebadge, +.td > .zonebadge { + margin: 0; + vertical-align: top; +} + +.network-status-table { + display: flex; + flex-wrap: wrap; +} + +.network-status-table .ifacebox { + margin: .5em; + font-size: 90%; + flex-grow: 1; +} + +.network-status-table .ifacebox-body { + display: flex; + flex-direction: column; + flex: 1 0; +} + +.network-status-table .ifacebox-body > span { + flex: 10; +} + +.network-status-table .ifacebox-body > div { + display: flex; + flex-wrap: wrap; +} + +.ifacebadge.large, +.network-status-table .ifacebox-body .ifacebadge { + flex: 1; + margin: .5em .25em .25em .25em; + padding: .5em; + min-width: 220px; + white-space: nowrap; +} + .zonebadge { padding: 2px; display: inline-block; white-space: nowrap; - cursor: pointer; + border-radius: 3px; } -.zonebadge em, -.zonebadge strong { +.zonebadge > em, +.zonebadge > strong { margin: 3px; - display: inline-block; } .zonebadge input { @@ -142,6 +284,18 @@ a img { height: 1.5em; } +.zonebadge .ifacebadge, +.cbi-dropdown .ifacebadge { + margin: 1px; +} + +.zonebadge .ifacebadge img, +.zonebadge .ifacebadge em, +.cbi-dropdown .ifacebadge img, +.cbi-dropdown .ifacebadge em { + margin: 0 1px; +} + .zonebadge-empty { border: 1px dashed #AAAAAA; color: #AAAAAA; @@ -150,6 +304,7 @@ a img { } + #header { height: auto; background: #FFF url(header.jpg) repeat-x left bottom; @@ -158,9 +313,12 @@ a img { text-align:right; } +.header_left { + padding-bottom: 10px; +} + .header_left img { padding: 10px 10px 0px 10px; - margin-bottom: 10px; } .header_banner { @@ -173,15 +331,15 @@ a img { padding: 0px; } -.header_left{ +.header_left { text-align:left; max-width: 50%; float:left; } -.header_left a{ +.header_left a { color: #dc0067; - font: bold 36px Helvetica; + font: bold 36px Helvetica, Verdana, Arial, sans-serif; text-decoration: none; } @@ -454,53 +612,15 @@ textarea#syslog { font-size: 80%; } -#maincontent h2 { - font:normal bold 150% "Trebuchet MS", Verdana, sans-serif; - margin: 0.25em 0 0.7em 0; - border-bottom: 1px solid; - padding: 10px 0 4px 0; - color: #404040; -} - -#maincontent h3 { - margin: 0.5em 0 1.1em 0; - font:italic bold 125% "Trebuchet MS", Verdana, sans-serif; - color: #404040; -} - #maincontent p { margin-bottom: 1em; } .cbi-section { - margin-bottom: 0.5em; - padding: 0.5em 1em; - border: 1px dotted #555; - background-color: #fff; + margin-bottom: 1.5em; color: #000; } -.cbi-section legend { - font-size: 110%; - font-weight: bold; - height: 1em; - padding: 0.5em 0.25em; - background-color: transparent; - color: #404040 ; -} - -.cbi-section h2 { - margin: 0em 0 0.5em -0.5em !important; -} - -.cbi-section h3 { - text-decoration: none !important; - font-weight: bold !important; - color: #555 !important; - margin: 0.25em !important; - font-size: 100% !important; -} - .cbi-section-descr { margin-bottom: 0.5em; font-size: 95%; @@ -519,46 +639,52 @@ ul.cbi-apply { } ul.cbi-tabmenu { - padding: 3px 0; - margin-left: 0 !important; - margin-bottom: -1px; list-style-type: none; + display: flex; + margin: 0 0 .5em 0 !important; + padding: 0 0 0 5px; + border-bottom: 1px solid #bbb; } -ul.cbi-tabmenu li.cbi-tab, -ul.cbi-tabmenu li.cbi-tab-disabled { - display: inline; - margin: 0; +ul.cbi-tabmenu li { + display: inline-flex; + margin: 0 5px -1px 0; + flex: 0 1 auto; + border: 1px solid #bbb; + border-bottom: none; + border-radius: 3px 3px 0 0; + background: linear-gradient(#ddd 90%, #aaa 100%); + color: #888; + overflow: hidden; + text-overflow: ellipsis; + word-wrap: break-word; } -ul.cbi-tabmenu li.cbi-tab a, -ul.cbi-tabmenu li.cbi-tab-disabled a { +ul.cbi-tabmenu li a, +ul.cbi-tabmenu li a:hover { text-decoration: none; - padding: 3px 7px; - margin-right: 3px; - border: 1px dotted #bbb; - border-bottom: none; - background-color: #eee; - color: #bbb; + color: inherit; + padding: 5px; + flex: 1; + width: 100%; + height: 100%; } -ul.cbi-tabmenu li.cbi-tab-highlighted a { +ul.cbi-tabmenu li.cbi-tab-highlighted { color: #000; - background-color: #FFEEAA; + background: #fea; } -ul.cbi-tabmenu li a:hover { +ul.cbi-tabmenu li.cbi-tab { color: #000; + background: #fff; } -ul.cbi-tabmenu li.cbi-tab a { - position: relative; - top: 1px; - padding-top: 4px; - color: #000; - background-color: #fff; +ul.cbi-tabmenu + .cbi-section-node { + margin-top: -.5em; } + div.cbi-tab-descr { background-image: url(/luci-static/resources/cbi/help.gif); background-position: 0.25em 50%; @@ -601,151 +727,126 @@ select, input[type=text], input[type=password] { width: 20em; + font-size: inherit; + line-height: 13pt; + height: 14pt; } -td select, -td input[type=text], -td input[type=password] { - width: 99%; +select[multiple] { + height: auto; } -img.cbi-image-button { - cursor: pointer; - margin: 0 2px; +input[type=radio], +input[type=checkbox], +[data-dynlist] > input + img, +input.cbi-input-password + img { vertical-align: middle; } -input.cbi-input-user { - background: url('../resources/cbi/user.gif') no-repeat scroll 1px center; - background-color: inherit; - color: #000; - text-indent: 17px; -} - -input.cbi-input-password { - background: url('../resources/cbi/key.gif') no-repeat scroll 1px center; - background-color: inherit; - color: #000; - text-indent: 17px; -} - -input.cbi-input-find, -input.cbi-button-find { - background: url('../resources/cbi/find.gif') no-repeat scroll 1px center; - background-color: inherit; - color: #000; - padding-left: 17px; - border: none; -} - -input.cbi-input-reload { - background: url('../resources/cbi/reload.gif') no-repeat scroll 1px center; - background-color: inherit; - color: #000; - padding-left: 17px; -} - -input.cbi-button{ - margin-top: 1.3em; +.td select, +.td .cbi-dropdown, +.td input[type=text] { + width: 100%; } -input.cbi-input-add, -input.cbi-button-add { - background: url('../resources/cbi/add.gif') no-repeat scroll 1px center; - background-color: inherit; - color: #000; - padding: 0 1px 0 17px; - border: 1px solid #FFF; +.td [data-dynlist] > input, +.td input.cbi-input-password { + width: calc(100% - 20px); } -input.cbi-input-fieldadd, -input.cbi-button-fieldadd { - background: url(../resources/cbi/fieldadd.gif) no-repeat scroll 1px center; - background-color: inherit; - color: #000; - padding: 0 1px 0 17px; +img.cbi-image-button { + cursor: pointer; + margin: 0 2px; + vertical-align: middle; } -input.cbi-input-reset, -input.cbi-button-reset { - background: url('../resources/cbi/reset.gif') no-repeat scroll 1px center; - background-color: inherit; +.btn, .cbi-button { + padding: 0 .5em; + border-radius: 3px; + border: 1px solid #aaa; + text-decoration: none; color: #000; - padding: 0 1px 0 17px; -} - - + display: inline-block; + font-size: inherit; + -webkit-appearance: none; + background: #fff; + text-align: center; + font-weight: bold; + line-height: 13pt; + height: 14pt; } -input.cbi-input-save, -input.cbi-button-save { - background: url('../resources/cbi/save.gif') no-repeat scroll 1px center; - background-color: inherit; - color: #000; - padding: 0 1px 0 17px; +.btn:hover, .cbi-button:hover { + box-shadow: 0 0 3px #59d; } -input.cbi-input-apply, -input.cbi-button-apply { - background: url('../resources/cbi/apply.gif') no-repeat scroll 1px center; - background-color: inherit; - color: #000; - padding: 0 1px 0 17px; +.btn[disabled], +.btn[disabled]:hover, +.cbi-button[disabled], +.cbi-button[disabled]:hover { + opacity: .6; + cursor: default; + pointer-events: none; } -input.cbi-input-link, -input.cbi-button-link { - background: url('../resources/cbi/link.gif') no-repeat scroll 1px center; - background-color: inherit; - color: #000; - padding: 0 1px 0 17px; - border: none; +.cbi-button-positive, +.cbi-button-fieldadd, +.cbi-button-add, +.cbi-button-save { + border-color: #7b7; + color: #7b7; } -input.cbi-input-download, -input.cbi-button-download { - background: url('../resources/cbi/download.gif') no-repeat scroll 1px center; - background-color: inherit; - color: #000; - padding: 0 1px 0 17px; - border: none; +.cbi-button-neutral, +.cbi-button-reset, +.cbi-button-download, +.cbi-button-find, +.cbi-button-link, +.cbi-button-up, +.cbi-button-down { + border-color: #444; + color: #444; } -input.cbi-input-remove, -div.cbi-section-remove input { - background: url('../resources/cbi/remove.gif') no-repeat scroll 1px center; - background-color: inherit; - color: #000; - padding: 0 1px 0 17px; - border: 1px solid #fff; +.cbi-button-action, +.cbi-button-apply, +.cbi-button-reload, +.cbi-button-edit { + border-color: #59d; + color: #59d; } -input.cbi-button-up { - background-image: url('../resources/cbi/up.gif'); - padding: 0 1px 0 11px; +.cbi-button-negative, +.cbi-section-remove .cbi-button, +.cbi-button-remove { + border-color: #b77; + color: #b77; } -input.cbi-button-down { - background-image: url('../resources/cbi/down.gif'); - padding: 0 1px 0 11px; +.cbi-button-action.important, +.cbi-page-actions .cbi-button-apply, +.cbi-section-actions .cbi-button-edit { + color: #fff; + background: #59d; } -input.cbi-button-edit { - background: url('../resources/cbi/edit.gif') no-repeat scroll 1px center; - color: #000000; - padding: 0 1px 0 17px; +.cbi-button-positive.important, +.cbi-page-actions .cbi-button-save { + color: #fff; + background: #7b7; } -input.cbi-button-reload { - background: url('../resources/cbi/reload.gif') no-repeat scroll 1px center; - color: #000000; - padding: 0 1px 0 17px; +.cbi-page-actions .cbi-button-apply + .cbi-button-save { + background: #fff; + color: #7b7; } -input.cbi-button-remove { - background: url('../resources/cbi/remove.gif') no-repeat scroll 1px center; - color: #000000; - padding: 0 1px 0 17px; +.cbi-input-invalid { + background-image: url('../resources/cbi/reset.gif'); + background-repeat: no-repeat; + background-position: right; + color: #FF0000 !important; + border-color: #FF0000; } .cbi-input-invalid { @@ -765,18 +866,12 @@ textarea { margin-bottom: 0.5em; } -form > div > input[type=submit], -form > div > input[type=reset] { - float: right; - margin-left: 0.5em; -} - -table td, -table th { - color: #000; +.table .td, .table .th { + color: #000000; + padding: .25em; } -table.smalltext { +.table.smalltext { background: #f5f5f5; color: #000; border: 1px solid #666; @@ -787,48 +882,62 @@ table.smalltext { border-collapse: collapse; } -table.smalltext tr:hover td { +.table.smalltext .tr:hover .td { background-color: #bbddee; color: #000; } -table.smalltext tr th { +.table.smalltext .tr .th { padding: 0 0.25em; border-left: 1px dotted #666; text-align: left; } -table.smalltext tr td { +.table.smalltext .tr .td { padding: 0.2em; border-top: 1px dotted #666; border-left: 1px dotted #666; } -table.cbi-section-table .cbi-rowstyle-1 { - background-color: #f1f6fa; - color: #000; +.cbi-section-node .tr:not(.placeholder):nth-child(even) { + background: #e5eef5; } -table.cbi-section-table .cbi-rowstyle-1:hover, -table.cbi-section-table .cbi-rowstyle-2:hover { - background-color: #b2c8d4; - color: #000000; -} - -table.cbi-section-table .cbi-section-table-cell { +.table.cbi-section-table .cbi-section-table-cell { padding: 3px; white-space: nowrap; } -.cbi-section .cbi-rowstyle-1 h3 { - background-color: #f1f6fa; - color: #555; +.table .tr > .th:empty { + display: none; } -.cbi-rowstyle-2 { - color: #000; +.table.cbi-section-table .tr > *, +.table.cbi-section-table .tr[data-title]::before { + border-top: 1px dotted #bbb; + display: table-cell; +} + +.table.cbi-section-table .tr.table-titles > *, +.table.cbi-section-table .tr.cbi-section-table-titles > *, +.table.cbi-section-table .tr.cbi-section-table-desc > *, +.table.cbi-section-table .tr.table-titles::before, +.table.cbi-section-table .tr.cbi-section-table-titles::before, +.table.cbi-section-table .tr.cbi-section-table-desc::before { + border-top: none; } +.table.cbi-section-table .tr:hover::before, +.table.cbi-section-table .tr:hover > * { + background: #eee; +} + +.table.cbi-section-table .tr:nth-child(even):hover::before, +.table.cbi-section-table .tr:nth-child(even):hover > * { + background: #bde; +} + + div.cbi-value { clear: left; vertical-align: middle; @@ -847,34 +956,49 @@ div.cbi-value:hover { line-height: 1.8em; } -div.cbi-value-field { +.cbi-value-field { width: 58%; margin-left: 40%; padding: 0.25em 0; } -div.cbi-value-description { - font-size: 90%; - display: inline; +.td.cbi-value-field { + width: auto; + margin-left: 0; + align-self: center; } -div.cbi-section-create { - clear: left; - white-space: nowrap; - vertical-align: top; +.cbi-value-description { + background-image: url(/luci-static/resources/cbi/help.gif); + background-position: .25em .25em; + background-repeat: no-repeat; + margin: .25em 0 0 0; + padding: .25em .25em .25em 1.75em; } -div.cbi-tblsection-create { - border-bottom: 1px dotted #bbb; +.cbi-section-create { + padding: 0 0 .25em 0; + margin: -3px; + display: inline-flex; + align-items: center; +} + +.cbi-section-create > * { + margin: 3px; + flex: 1 1 auto; +} + +.cbi-section-create > * > input { + width: 100%; } -div.cbi-section-create .cbi-button { - margin: 0.25em; +.cbi-section-remove > .cbi-button { + margin-bottom: -1px; + border-radius: 3px 3px 0 0; } -input.cbi-section-create-name { - margin-right: -0.25em; - border: 1px solid #999; +.cbi-section-node + .cbi-section-create { + padding-top: 0; } div.cbi-map-descr { @@ -886,46 +1010,147 @@ div.cbi-optionals { border-bottom: 1px dotted #bbb; } -div.cbi-section-remove { - float: right; -} + .cbi-section-node { clear: both; - border: 1px dotted #bbb; - border-bottom: none; padding-bottom: 0; + position: relative; + border: 1px dotted #555; + background: #fff; + margin-bottom: 5px; } -.cbi-section-node table div { - padding-bottom: 0; - border-bottom: none; +.cbi-section-node-tabbed { + border-top: none; } -.cbi-section-node div.cbi-section-table-row { - margin: 0.25em; +.cbi-section-node .cbi-optionals:last-child, +.cbi-section-node .cbi-value:last-child { + border-bottom: none; } -table.cbi-section-table { +.table.cbi-section-table { width: 100%; font-size: 95%; + border: 1px dotted #444; + background: #fff; + margin: 0 0 .5em 0; } -table.cbi-section-table th, -table.cbi-section-table td { - text-align: center; +.cbi-section-node > .table.cbi-section-table { + border: none; + margin: 0; } -tr.cbi-section-table-descr th { - font-weight: bold; +@keyframes flash { + 0% { opacity: 1; } + 50% { opacity: .5; } + 100% { opacity: 1; } +} + +.tr.cbi-section-table-row.flash { + animation: flash .35s; +} + +.tr.cbi-section-table-descr .th { + font-weight: normal; font-size: 90%; + vertical-align: top; } -td.cbi-section-table-optionals { +.td.cbi-section-table-optionals { text-align: left !important; padding-top: 1em; } +.th.cbi-section-actions, +.td.cbi-section-actions { + display: flex; + justify-content: flex-end; + flex-direction: row; + flex: 1 1 150px; + margin: auto 0 auto auto; +} + +.td.cbi-section-actions > form { + display: flex; +} + +.td.cbi-section-actions > *, +.td.cbi-section-actions > form > * { + flex: 1 1 4em; + margin: 1px; +} + +.cbi-page-actions { + display: flex; + justify-content: flex-end; + margin: -3px; + padding: 0 .25em .25em .25em; +} + +.cbi-page-actions > form { + display: flex; +} + +.cbi-page-actions > * { + flex: 0 1 auto; + margin: 3px; +} + +.cbi-page-actions > form > * { + flex: 1; + margin: 0 3px 0 0; +} + +.cbi-page-actions > .cbi-button-link, +.cbi-page-actions > form[method="get"]:first-child { + margin-right: auto; +} + + +.th[data-type="button"], .td[data-type="button"], +.th[data-type="fvalue"], .td[data-type="fvalue"] { + flex: 1 1 2em; + text-align: center; +} + +#cbi-network-switch_vlan .th, +#cbi-network-switch_vlan .td { + flex-basis: 12%; +} + +#cbi-wireless-overview .td:first-child { + align-self: center; +} + +.td[data-title]::before { + content: attr(data-title) ":\20"; + font-weight: bold; + text-align: left; + display: none; + padding: 1px; + 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: left; + display: inline-block; + align-self: center; + flex: 1 1 5%; + padding: .25em; + white-space: normal; + word-wrap: break-word; +} + .cbi-value-helpicon img { vertical-align: bottom; } @@ -956,14 +1181,241 @@ td.cbi-value-error { padding: 3px; } -.left { + +.cbi-dropdown { + border: 1px solid #ccc; + display: inline-flex; + cursor: pointer; + background: #fff; + position: relative; + padding: 0; + color: #000; + min-width: 20em; + max-width: 100%; +} + +.cbi-dropdown:focus { + outline: 2px solid #4b6e9b; +} + +.cbi-dropdown > ul { + margin: 0 !important; + padding: 0; + list-style: none; + overflow-x: hidden; + overflow-y: auto; + display: flex; + width: 100%; +} + +.cbi-dropdown > ul.preview { + display: none; +} + +.cbi-dropdown > .open { + background: #eee; + border: 2px outset #eee; + flex-basis: 15px; +} + +.cbi-dropdown > .open, +.cbi-dropdown > .more { + flex-grow: 0; + flex-shrink: 0; + display: flex; + flex-direction: column; + justify-content: center; + text-align: center; + line-height: 2em; + padding: 0 .25em; +} + +.cbi-dropdown > .more, +.cbi-dropdown > ul > li[placeholder] { + color: #777; + font-weight: bold; + text-shadow: 1px 1px 0px #fff; + display: none; +} + +.cbi-dropdown > ul > li { + display: none; + padding: .25em; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + flex-shrink: 1; + flex-grow: 1; + align-items: center; + align-self: center; + min-height: 20px; +} + +.cbi-dropdown > ul > li .hide-open { display: initial; } +.cbi-dropdown > ul > li .hide-close { display: none; } + +.cbi-dropdown > ul > li[display]:not([display="0"]) { + border-left: 1px solid #ccc; +} + +.cbi-dropdown[empty] > ul { + max-width: 1px; +} + +.cbi-dropdown > ul > li > form { + display: none; + margin: 0; + padding: 0; + pointer-events: none; +} + +.cbi-dropdown > ul > li img { + vertical-align: middle; + margin-right: .25em; +} + +.cbi-dropdown > ul > li > form > input[type="checkbox"] { + margin: 0; +} + +.cbi-dropdown > ul > li input[type="text"] { + height: 20px; +} + +.cbi-dropdown[open] { + position: relative; +} + +.cbi-dropdown[open] > ul.dropdown { + display: block; + background: #f6f6f5; + border: 1px solid #918e8c; + box-shadow: 0 0 4px #918e8c; + position: absolute; + z-index: 1000; + max-width: none; + min-width: 100%; + width: auto; +} + +.cbi-dropdown > ul > li[display], +.cbi-dropdown[open] > ul.preview, +.cbi-dropdown[open] > ul.dropdown > li, +.cbi-dropdown[multiple] > ul > li > label, +.cbi-dropdown[multiple][open] > ul.dropdown > li, +.cbi-dropdown[multiple][more] > .more, +.cbi-dropdown[multiple][empty] > .more { + flex-grow: 1; + display: flex; + align-items: center; +} + +.cbi-dropdown[empty] > ul > li, +.cbi-dropdown[optional][open] > ul.dropdown > li[placeholder], +.cbi-dropdown[multiple][open] > ul.dropdown > li > form { + display: block; +} + +.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 { + border-bottom: 1px solid #ccc; +} + +.cbi-dropdown[open] > ul.dropdown > li[selected] { + background: #b0d0f0; +} + +.cbi-dropdown[open] > ul.dropdown > li.focus { + background: linear-gradient(90deg, #a3c2e8 0%, #84aad9 100%); +} + +.cbi-dropdown[open] > ul.dropdown > li:last-child { + margin-bottom: 0; + border-bottom: none; +} + +.cbi-dropdown[disabled] { + pointer-events: none; + opacity: .6; +} + + +.cbi-tooltip-container { + cursor: help; +} + +.cbi-tooltip { + position: absolute; + z-index: 1000; + left: -1000px; + opacity: 0; + transition: opacity .25s ease-out; + pointer-events: none; + box-shadow: 0 0 2px #444; +} + +.cbi-tooltip-container:hover .cbi-tooltip { + left: auto; + opacity: 1; + transition: opacity .25s ease-in; +} + +.zonebadge .cbi-tooltip { + padding: 1px; + background: inherit; + margin: -1.6em 0 0 -5px; +} + + +.zone-forwards { + display: flex; + flex-wrap: wrap; +} + +.zone-forwards > * { + flex: 1 1 45%; + padding: 1px; +} + +.zone-forwards > span { + flex-basis: 10%; + text-align: center; +} + +.zone-forwards .zone-src, +.zone-forwards .zone-dest { + display: flex; + flex-direction: column; +} + + +.left, .left::before { text-align: left !important; } -.right { +.right, .right::before { text-align: right !important; } +.center, .center::before { + text-align: center !important; +} + +.td.bottom { + align-self: flex-end; +} + +.td.top { + align-self: flex-start; +} + +.td.middle { + align-self: center; +} + + .footer, .push { height: 2em; } @@ -1070,3 +1522,246 @@ td.cbi-value-error { } } + +@media screen and (max-width: 992px) { + body { + -webkit-text-size-adjust: 100%; + } + + #maincontent { + width: 100%; + } + + .table { + display: flex; + flex-direction: column; + width: 100%; + } + + .tr { + display: flex; + flex-direction: row; + flex-wrap: wrap; + align-items: flex-end; + } + + .th, .td { + flex: 2 2 25%; + align-self: flex-start; + overflow: hidden; + text-overflow: ellipsis; + word-wrap: break-word; + display: inline-block; + } + + .td select { + word-wrap: normal; + } + + .td[data-type="button"], + .td[data-type="fvalue"] { + flex: 1 1 12.5%; + text-align: left; + } + + .td.cbi-value-field { + align-self: flex-start; + } + + .td.cbi-value-field .cbi-button { + width: 100%; + } + + .table.cbi-section-table { + border: none; + background: none; + margin: 0; + } + + .tr.table-titles, + .cbi-section-table-titles, + .cbi-section-table-descr { + display: none; + } + + .table.cbi-section-table .tr > *, + .table.cbi-section-table .tr[data-title]::before { + border-top: none; + } + + .cbi-section-table-row { + display: flex; + flex-direction: row; + flex-wrap: wrap; + border: 1px dotted #444; + margin: 0 0 .5em 0; + background: #fff; + } + + .cbi-section-table-row:hover { + border: 1px solid #4a6b7c; + } + + .table.cbi-section-table .tr:hover > *, + .table.cbi-section-table .tr:nth-child(2n):hover > * { + background: none; + } + + .cbi-section-table + .cbi-section-create { + padding-top: 0; + } + + .tr[data-title]::before { + display: block; + flex: 1 1 100%; + background: #eef; + } + + .td[data-title]::before { + display: block; + } + + .td.cbi-section-actions { + flex-basis: 100%; + margin: auto 0 0 auto; + } + + .td.cbi-section-actions > *, + .td.cbi-section-actions > form > * { + flex: 0 1 100%; + max-width: 150px; + } + + .hide-sm, + .hide-xs { + display: none; + } +} + +@media screen and (max-width: 480px) { + body { + font-size: 12pt; + } + + input, textarea, select { + font-size: 12pt !important; + line-height: 1.4em; + } + + select, input[type="text"], input[type="password"] { + width: 100%; + height: 1.4em; + } + + [data-dynlist] > input, + input.cbi-input-password { + width: calc(100% - 20px); + } + + .cbi-dropdown { + min-width: 100%; + } + + .btn, .cbi-button { + font-size: 9pt !important; + line-height: 11pt; + } + + #maincontent { + padding: .25em; + } + + #tabmenu { + margin: -.25em -.25em 1em -.25em; + } + + .th, .td { + flex: 2 2 50%; + } + + .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; + } + + .cbi-section { + padding: .25em; + } + + .cbi-value { + padding: 0 .25em; + } + + .cbi-value-title { + float: none; + font-weight: bold; + } + + .cbi-value-field { + width: 100%; + margin: 0; + } + + .cbi-value-description { + margin-top: 5px; + display: block; + } + + .cbi-section-create { + margin-bottom: 1em; + } + + .cbi-optionals { + display: flex; + } + + .cbi-page-actions { + flex-wrap: wrap; + } + + .cbi-page-actions > .cbi-button-link { + flex-basis: 100%; + margin-right: 2px; + } + + .cbi-optionals > *, + .cbi-page-actions > * { + flex: 1 1 auto; + margin: 2px; + height: auto; + } + + ul.cbi-tabmenu { + padding: 0 3px; + } + + ul.cbi-tabmenu li { + font-size: 90%; + margin: 0 1px -1px 0; + } + + .hide-xs { + display: none; + } + + #cbi-network .td[id] > strong { + display: block; + } + + #cbi-network-switch_vlan .td.cbi-section-actions { + flex-basis: 100%; + } + + .network-status-table .ifacebox { + margin: 0 0 .5em 0; + } +} diff --git a/themes/luci-theme-freifunk-generic/htdocs/luci-static/freifunk-generic/ie7.css b/themes/luci-theme-freifunk-generic/htdocs/luci-static/freifunk-generic/ie7.css deleted file mode 100644 index 67ed9fb816..0000000000 --- a/themes/luci-theme-freifunk-generic/htdocs/luci-static/freifunk-generic/ie7.css +++ /dev/null @@ -1,20 +0,0 @@ -div.cbi-value-field { - margin-left: 0 !important; -} - -.cbi-section legend { - background-color: #ffffff; - color: #555555; -} - -table.cbi-section-table td .cbi-input-text, -table.cbi-section-table td .cbi-input-select { - width: 95% !important; -} - -.cbi-input-user, -.cbi-input-password { - text-indent: 0 !important; - padding-left: 1.5em !important; - width: 18.5em !important; -} 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 16ffc992ac..b6ed1f7134 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 @@ -74,7 +74,6 @@ <link rel="stylesheet" media="only screen and (max-device-width: 854px)" href="<%=media%>/mobile.css" type="text/css" /> <link rel="stylesheet" media="only screen and (max-width: 854px)" href="<%=media%>/smallscreen.css" type="text/css" /> <link rel="stylesheet" media="handheld" href="<%=media%>/mobile.css" type="text/css" /> -<!--[if IE 7]><link rel="stylesheet" type="text/css" media="screen" href="<%=media%>/ie7.css" /><![endif]--> <% if node and node.css then %><link rel="stylesheet" type="text/css" media="screen" href="<%=resource%>/<%=node.css%>" /> <% end -%> <% if css then %><style title="text/css"> 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 a9585cf40e..17db81edb3 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 @@ -32,8 +32,8 @@ font-style: normal; } -.table { display: table; } -.tr { display: table-row; } +.table { display: table; position: relative; } +.tr { display: table-row; } .thead { display: table-header-group; } .tbody { display: table-row-group; } .tfoot { display: table-footer-group; } @@ -48,6 +48,19 @@ font-weight: bold; } +.tr.placeholder { + height: 4em; +} + +.tr.placeholder > .td { + position: absolute; + left: 0; + right: 0; + bottom: 0; + text-align: center; + line-height: 3em; +} + .table[width="33%"], .th[width="33%"], .td[width="33%"] { width: 33%; } .table[width="100%"], .th[width="100%"], .td[width="100%"] { width: 100%; } @@ -442,10 +455,12 @@ h3 { } h4 { - + margin: 2rem 0 0 0; + font-size: 1.2rem; + padding-bottom: 10px; } -fieldset { +.cbi-section { margin: 2rem 0 0 0; padding: 2rem; border: 0; @@ -465,7 +480,7 @@ fieldset { margin-top: 1rem; } -fieldset > legend { +.cbi-section > legend { display: none !important; } @@ -486,10 +501,12 @@ fieldset > fieldset { border-bottom: 1px solid #eee; } -table, -.table { +table { border-spacing: 0; border-collapse: collapse; +} + +table, .table { width: 100%; border: 1px solid #eee; } @@ -501,21 +518,75 @@ 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; +} + +.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); +} + +.cbi-section-table-row:last-child { + 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, +.cbi-section-table-row > .cbi-value-field .cbi-dropdown { + width: 100%; } -fieldset > table > tbody > tr:nth-of-type(2n), -fieldset > .table > .tbody > .tr:nth-of-type(2n) { +div > table > tbody > tr:nth-of-type(2n), +div > .table > .tbody > .tr:nth-of-type(2n) { background-color: #f9f9f9; } -fieldset > table > tbody > tr:nth-of-type(2n), -fieldset > .table > .tbody > .tr:nth-of-type(2n) { +div > table > tbody > tr:nth-of-type(2n), +div > .table > .tbody > .tr:nth-of-type(2n) { background-color: #f9f9f9; } @@ -1029,7 +1100,7 @@ td > .ifacebadge, .ifacebadge > img { display: inline-block; margin: 0 .2rem; - align-self: start; + align-self: flex-start; } .ifacebadge > img + img { @@ -1206,10 +1277,9 @@ td > .ifacebadge, .zonebadge { padding: 0.2rem 0.5rem; display: inline-block; - cursor: pointer; } -.zonebadge > .ifacebadge { +.zonebadge .ifacebadge { padding: .2rem .3rem; margin: 0.1rem 0.2rem; border: 1px solid #6C6C6C; @@ -1255,11 +1325,13 @@ td > .ifacebadge, min-width: 7rem; } -.cbi-section-table-row > .cbi-value-field .cbi-input-select { - width: 7rem; +.cbi-section-create { + margin: .5rem -3px; + display: inline-flex; + align-items: center; } -.cbi-section-create > .cbi-button-add { +.cbi-section-create > * { margin: 0.5rem; } @@ -1291,6 +1363,62 @@ small { border-top: 1px solid #CCC; } +.cbi-dropdown-container { + position: relative; +} + +.cbi-tooltip-container { + cursor: help; +} + +.cbi-tooltip { + position: absolute; + z-index: 1000; + left: -1000px; + opacity: 0; + transition: opacity .25s ease-out; + pointer-events: none; + box-shadow: 0 0 2px #444; +} + +.cbi-tooltip-container:hover .cbi-tooltip { + left: auto; + opacity: 1; + transition: opacity .25s ease-in; +} + +.zonebadge .cbi-tooltip { + padding: .25rem; + background: inherit; + margin: -1.5rem 0 0 -.5rem; +} + +.zonebadge-empty { + background: repeating-linear-gradient(45deg,rgba(204,204,204,0.5),rgba(204,204,204,0.5) 5px,rgba(255,255,255,0.5) 5px,rgba(255,255,255,0.5) 10px); + color: #404040; +} + +.zone-forwards { + display: flex; + min-width: 10rem; +} + +.zone-forwards > * { + flex: 1 1 45%; +} + +.zone-forwards > span { + flex-basis: 10%; + text-align: center; + padding: 0 .25rem; +} + +.zone-forwards .zone-src, +.zone-forwards .zone-dest { + display: flex; + flex-direction: column; +} + #diag-rc-output > pre { background-color: #f5f5f5; display: block; @@ -1475,11 +1603,6 @@ header > .container > .pull-right > * { margin-top: 0; } -/* fix network firewall*/ -.node-network-firewall > .main .cbi-section-table-row > .cbi-value-field .cbi-input-select { - min-width: 4rem; -} - .node-status-iptables fieldset, .node-system-packages fieldset, .node-system-flashops fieldset { @@ -1515,6 +1638,11 @@ header > .container > .pull-right > * { min-width: 3.5rem; } +#cbi-network-switch_vlan .th, +#cbi-network-switch_vlan .td { + flex-basis: 12%; +} + /* language fix */ body.lang_pl.node-main-login .cbi-value-title { width: 12rem; @@ -1669,6 +1797,26 @@ body.lang_pl.node-main-login .cbi-value-title { .node-main-login > .main .cbi-value-title { text-align: left; } + + .tr { + display: flex; + flex-direction: row; + flex-wrap: wrap; + } + + .th, .td { + flex: 1; + flex-basis: 33%; + overflow: hidden; + text-overflow: ellipsis; + } + + .th.cbi-value-field, + .td.cbi-value-field, + .th.cbi-section-table-cell, + .td.cbi-section-table-cell { + flex-basis: auto; + } } @media screen and (max-width: 480px) { @@ -1803,6 +1951,14 @@ body.lang_pl.node-main-login .cbi-value-title { .node-status-iptables > .main div > .cbi-map > form input[type="submit"] + input[type="submit"] { margin-top: 1rem; } + + .th, .td { + flex-basis: 50%; + } + + .td.cbi-value-field { + flex-basis: 100%; + } } @media screen and (min-width: 992px) { 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 1d5ac8ab24..4bde3eaea2 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 @@ -18,8 +18,8 @@ body { background-color: #4a6b7c; background-position: bottom center; background-repeat: repeat-x; - font-family: Verdana, Arial, sans-serif; - font-size: 11pt; + font-family: Arial, Verdana, sans-serif; + font-size: 16px; line-height: 100%; padding-bottom: 1.5em; } @@ -30,7 +30,7 @@ body { box-sizing: border-box; } -.table { display: table; } +.table { display: table; width: 100%; position: relative; } .tr { display: table-row; } .thead { display: table-header-group; } .tbody { display: table-row-group; } @@ -41,6 +41,30 @@ body { .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; } + +.tr.placeholder { + height: 3.5em; +} + +.tr.placeholder > .td { + position: absolute; + left: 0; + right: 0; + bottom: 0; + text-align: center; + line-height: 3em; +} + .nowrap { white-space: nowrap; } @@ -50,81 +74,95 @@ a img { text-decoration: none; } -ul.tabmenu { - margin: 0; - clear: both; - display: block; - vertical-align: bottom; - font-size: 10pt; - padding: 5px 0 0 5px; +#maincontainer { + display: flex; } -div.tabmenu2 { - background-color: #AAAAAA; - background-image: url(tabbg.png); - background-repeat: repeat-x; - margin-top: -1px; - border: 1px solid #444444; - border-bottom: none; +#maincontent { + flex-basis: 100%; } -div.tabmenu3, -div.tabmenu4, -div.tabmenu5 { - background-color: #AAAAAA; - background-image: url(tabbg.png); - background-repeat: repeat-x; - border: none; +#mainmenu { + max-width: 200px; + background: #f5f5f5; + border: 1px solid #444; + border-width: 0 0 1px 1px; + font-size: 85%; + padding-bottom: 1em; } -ul.tabmenu li { - float: left; +#mainmenu ul { display: block; - overflow: hidden; + margin: 0; + padding: 0; } -.lang_he ul.tabmenu li { - float: right; +#mainmenu ul li { + display: block; + white-space: nowrap; } -ul.tabmenu li a { - text-decoration: none; - color: #444444; +#mainmenu ul li > a { display: block; - padding: 3px 8px; - margin: 0 2px; - line-height: 1.3em; - border: 1px solid transparent; - border-bottom: none; + color: #444; + padding: .4em .5em; + text-decoration: none; +} + +#mainmenu ul li.selected > a { + background: #fff; + color: #37c; + border: 1px dotted #444; + border-width: 1px 0; +} + +#mainmenu ul li.selected:first-child > a { + border-top: none; +} + +#mainmenu ul li li > a { font-size: 85%; + padding-left: 1.5em; } -ul.tabmenu li.active a { - font-weight: bold; - color: #000000; - background: #f5f5f5; - border: 1px solid #AAAAAA; - border-bottom: none; +#mainmenu ul li > ul { + flex-basis: 100%; + max-height: 0; + visibility: hidden; + transition: max-height .15s; } -ul.tabmenu li a:hover { - color: #444444; - border-color: #444444; +#mainmenu ul:not(.active) li.selected > ul, +#mainmenu ul li.active > ul { + max-height: 1000px; + visibility: visible; + transition: max-height .25s; } -ul.l1 li a { - background-color: #AAAAAA; - background-image: url(tabbg.png); - background-repeat: repeat-x; - border-color: #444444; +#mainmenu ul li.mainmenu-item-logout { + margin-top: 15%; +} + +#tabmenu { + padding: 0; + margin: -.5em -.5em .5em -.5em; + background: #bbb; +} + +#tabmenu ul { + border-color: #444; + padding-top: .5em; + flex-wrap: wrap; + background: repeating-linear-gradient(#f5f5f5, #bbb 2.4em, #f5f5f5 2.4em, #bbb); + line-height: 1em; } -ul.l1 li.tabmenu-item-logout a { - margin-left: 30px; +#tabmenu ul li { + border-color: #444; } -.lang_he ul.l1 li.tabmenu-item-logout a { - margin-right: 30px; +#tabmenu ul li.cbi-tab { + background: #f5f5f5; } abbr, @@ -151,6 +189,13 @@ code { white-space: pre; } +hr { + margin: .5em 0; + padding: 0; + border: 1px solid #444; + border-width: 0 0 1px 0; +} + #maincontent ul { margin-left: 2em; } @@ -183,30 +228,31 @@ code { } .alert-message { - font-size: 9pt; font-weight: normal; padding: .5em; border-radius: 3px; - color: #000; + border: 1px solid #a22; + color: #a22; + background: #fee; + margin: 0 0 .5em 0; } .alert-message.notice { - background: linear-gradient(#ccc 0%, #eee 100%); - color: #4a6b7c; + border-color: #15a; + background: #e6f6ff; + color: #15a; } .alert-message.warning { - background: linear-gradient(#dda 0%, #dd8 100%); - color: #c00; -} - -.alert-message > * { - margin: .5em; + border-color: #ed5; + background: #fe9; + color: #650; } -.alert-message > h4 { - font-weight: bold; - font-size: 10pt; +.alert-message .btn, +.alert-message .cbi-button { + background: inherit; + border-color: inherit; } div.hostinfo { @@ -348,56 +394,40 @@ textarea#syslog { direction: rtl; } -#maincontent h2 { +h2, h3, h4, legend { font-size: 150%; font-family: Trebuchet MS, Verdana, sans-serif; font-weight: bold; - margin: 0.25em 0 0.7em 0; + margin: .25em 0 .5em 0; border-bottom: 1px solid; - padding-top: 10px; padding-bottom: 4px; + display: block; + width: 100%; } -#maincontent h3 { - margin: 0.5em 0 1.1em 0; +h3, legend { font-size: 125%; - font-weight: bold; - font-style: italic; - font-family: Trebuchet MS, Verdana, sans-serif; - color: #27408B; } -#maincontent p { - margin-bottom: 1em; +h4 { + font-size: 112%; } -.cbi-section { - margin-bottom: 0.5em; - padding: 0.5em 1em; - border: 1px dotted #555555; - background-color: #ffffff; - color: #000000; -} +fieldset { border: none; } +fieldset > legend { float: left; } +fieldset > legend + * { clear: both; } -.cbi-section legend { - font-size: 110%; - font-weight: bold; - height: 1em; - padding: 0 0.25em; - background-color: transparent; - color: #555555; +#maincontent p { + margin-bottom: 1em; } -.cbi-section h2 { - margin: 0em 0 0.5em -0.5em !important; +.cbi-section { + margin: 0 0 .5em 0; } -.cbi-section h3 { - text-decoration: none !important; - font-weight: bold !important; - color: #555555 !important; - margin: 0.25em !important; - font-size: 100% !important; +.cbi-section > h3, +.cbi-section > legend { + margin-top: .5em; } .cbi-section-descr { @@ -405,6 +435,10 @@ textarea#syslog { font-size: 95%; } +.cbi-section-descr:empty { + display: none; +} + .cbi-title-ref { color: inherit; text-decoration: none; @@ -450,7 +484,7 @@ input[type=image] { } input:focus, -input:hover, +input:not(.cbi-button):hover, select:focus, select:hover { background-color: #ffffff; @@ -459,21 +493,38 @@ select:hover { input[type=text], input[type=password] { - padding: 1px 3px; + padding: 0 3px; } select, input[type=text], input[type=password] { - font-size: inherit; width: 20em; + font-size: inherit; + line-height: 13pt; + height: 14pt; +} + +select[multiple] { + height: auto; +} + +input[type=radio], +input[type=checkbox], +[data-dynlist] > input + img, +input.cbi-input-password + img { + vertical-align: middle; } .td select, .td .cbi-dropdown, -.td input[type=text], -.td input[type=password] { - width: 99%; +.td input[type=text] { + width: 100%; +} + +.td [data-dynlist] > input, +.td input.cbi-input-password { + width: calc(100% - 20px); } img.cbi-image-button { @@ -483,18 +534,23 @@ img.cbi-image-button { } .btn, .cbi-button { - padding: 2px; + padding: 0 .5em; border-radius: 3px; border: 1px solid #aaa; - background: #eee 1px center no-repeat; text-decoration: none; color: #000; display: inline-block; + font-size: inherit; + -webkit-appearance: none; + background: #fff; + text-align: center; + font-weight: bold; + line-height: 13pt; + height: 16pt; } .btn:hover, .cbi-button:hover { - border-color: #4a6b7c; - background-color: #fff; + box-shadow: 0 0 3px #37c; } .btn[disabled], @@ -503,153 +559,59 @@ img.cbi-image-button { .cbi-button[disabled]:hover { opacity: .6; cursor: default; - border-color: inherit; - background-color: inherit; -} - -input.cbi-input-user { - background-image: url('../resources/cbi/user.gif'); - background-repeat: no-repeat; - background-position: 1px center; - color: #000000; - text-indent: 17px; -} - -input.cbi-input-password { - background-image: url('../resources/cbi/key.gif'); - background-repeat: no-repeat; - background-position: 1px center; - color: #000000; - text-indent: 17px; -} - -input.cbi-input-find, -input.cbi-button-find { - background-image: url('../resources/cbi/find.gif'); - color: #000000; - padding-left: 17px; -} - -input.cbi-input-reload { - background-image: url('../resources/cbi/reload.gif'); - color: #000000; - padding-left: 17px; -} - -input.cbi-input-add, -input.cbi-button-add { - background-image: url('../resources/cbi/add.gif'); - color: #000000; - padding-left: 17px; - padding-right: 1px; -} - -input.cbi-input-fieldadd, -input.cbi-button-fieldadd { - background-image: url(../resources/cbi/fieldadd.gif); - color: #000000; - padding-left: 17px; -} - -input.cbi-input-reset, -input.cbi-button-reset { - background-image: url('../resources/cbi/reset.gif'); - color: #000000; - padding-left: 17px; - padding-right: 1px; -} - -input.cbi-input-save, -input.cbi-button-save { - background-image: url('../resources/cbi/save.gif'); - color: #000000; - padding-left: 17px; - padding-right: 1px; -} - -/* -input.cbi-input-apply, -input.cbi-button-apply { - background-image: url('../resources/cbi/apply.gif'); - color: #000000; - padding-left: 17px; - padding-right: 1px; -} -*/ - -input.cbi-input-apply:before, -input.cbi-button-apply:before { - background-image: url('../resources/cbi/apply.gif'); - border: 2px solid red; - width: 100px; - height: 100px; - content: "."; - display: block; - position: absolute; -} - -input.cbi-input-link, -input.cbi-button-link { - background-image: url('../resources/cbi/link.gif'); - color: #000000; - padding-left: 17px; - padding-right: 1px; -} - -input.cbi-input-download, -input.cbi-button-download { - background-image: url('../resources/cbi/download.gif'); - color: #000000; - padding-left: 17px; - padding-right: 1px; + pointer-events: none; } -input.cbi-input-remove, -div.cbi-section-remove input { - background-image: url('../resources/cbi/remove.gif'); - color: #000000; - padding-left: 17px; - padding-right: 1px; +.cbi-button-positive, +.cbi-button-fieldadd, +.cbi-button-add, +.cbi-button-save { + border-color: #595; + color: #595; } -input.cbi-button-up { - background-image: url('../resources/cbi/up.gif'); - padding-left: 11px; - padding-right: 1px; +.cbi-button-neutral, +.cbi-button-reset, +.cbi-button-download, +.cbi-button-find, +.cbi-button-link, +.cbi-button-up, +.cbi-button-down { + border-color: #444; + color: #444; } -input.cbi-button-down { - background-image: url('../resources/cbi/down.gif'); - padding-left: 11px; - padding-right: 1px; +.cbi-button-action, +.cbi-button-apply, +.cbi-button-reload, +.cbi-button-edit { + border-color: #37c; + color: #37c; } -input.cbi-button-edit { - background-image: url('../resources/cbi/edit.gif'); - color: #000000; - padding-left: 17px; - padding-right: 1px; +.cbi-button-negative, +.cbi-section-remove .cbi-button, +.cbi-button-remove { + border-color: #a22; + color: #a22; } -input.cbi-button-reload { - background-image: url('../resources/cbi/reload.gif'); - color: #000000; - padding-left: 17px; - padding-right: 1px; +.cbi-button-action.important, +.cbi-page-actions .cbi-button-apply, +.cbi-section-actions .cbi-button-edit { + color: #fff; + background: #37c; } -input.cbi-button-reset { - background-image: url('../resources/cbi/reset.gif'); - color: #000000; - padding-left: 17px; - padding-right: 1px; +.cbi-button-positive.important, +.cbi-page-actions .cbi-button-save { + color: #fff; + background: #595; } -input.cbi-button-remove { - background-image: url('../resources/cbi/remove.gif'); - color: #000000; - padding-left: 17px; - padding-right: 1px; +.cbi-page-actions .cbi-button-apply + .cbi-button-save { + background: #fff; + color: #595; } .cbi-input-invalid { @@ -660,30 +622,13 @@ input.cbi-button-remove { border-color: #FF0000; } -div.cbi-section-remove input { - border-bottom: none; -} - -textarea { - margin-left: -1px; - margin-bottom: 0.5em; -} - -form > div > input[type=submit], -form > div > input[type=reset] { - float: right; - margin-left: 0.5em; -} - table td, table th { color: #000000; } .table .td, .table .th { color: #000000; - padding: .25em 0; - text-align: center; - vertical-align: middle; + padding: .25em; } .table.smalltext { @@ -716,39 +661,23 @@ table td, table th { border-left: 1px solid #666666; } -.table.cbi-section-table .cbi-rowstyle-1 { +.cbi-rowstyle-1 { background-color: #eeeeff; color: #000000; } -.table.cbi-section-table .cbi-rowstyle-1:hover, -.table.cbi-section-table .cbi-rowstyle-2:hover { - background-color: #b2c8d4; - color: #000000; -} - -.table.cbi-section-table .cbi-section-table-cell { - padding: 3px; - white-space: nowrap; -} - -.cbi-section .cbi-rowstyle-1 h3 { - background-color: #eeeeff; - color: #555555; -} - .cbi-rowstyle-2 { color: #000000; } -div.cbi-value { +.cbi-value { clear: left; vertical-align: middle; padding: 0.25em 0.6em; border-bottom: 1px dotted #bbbbbb; } -div.cbi-value:hover { +.cbi-value:hover { background: #f8f8f8; color: #000000; } @@ -759,35 +688,49 @@ div.cbi-value:hover { line-height: 1.8em; } -div.cbi-value-field { +.cbi-value-field { width: 58%; margin-left: 40%; padding: 0.25em 0; } -div.td.cbi-value-field { +.td.cbi-value-field { width: auto; - vertical-align: middle; + margin-left: 0; + align-self: center; } -div.cbi-value-description { - font-size: 90%; - display: inline; +.cbi-value-description { + background-image: url(/luci-static/resources/cbi/help.gif); + background-position: .25em .25em; + background-repeat: no-repeat; + margin: .25em 0 0 0; + padding: .25em .25em .25em 1.75em; } -div.cbi-section-create { - clear: left; - white-space: nowrap; - vertical-align: top; +.cbi-section-create { + padding: 0 0 .25em 0; + margin: -3px; + display: inline-flex; + align-items: center; } -div.cbi-section-create .btn, -div.cbi-section-create .cbi-button { - margin: 0.25em; +.cbi-section-create > * { + margin: 3px; + flex: 1 1 auto; } -input.cbi-section-create-name { - margin-right: -0.25em; +.cbi-section-create > * > input { + width: 100%; +} + +.cbi-section-remove > .cbi-button { + margin-bottom: -1px; + border-radius: 3px 3px 0 0; +} + +.cbi-section-node + .cbi-section-create { + padding-top: 0; } div.cbi-map-descr { @@ -799,43 +742,46 @@ div.cbi-optionals { border-bottom: 1px dotted #bbbbbb; } -div.cbi-section-remove { - float: right; -} - .cbi-section-node { clear: both; - border: 1px solid #BBBBBB; - border-radius: 3px; padding-bottom: 0; position: relative; + border: 1px dotted #555; + background: #fff; + margin-bottom: .5em; } .cbi-section-node-tabbed { - border-top-left-radius: 0; + border-top: none; + margin-top: -.5em; } -.cbi-section-node .cbi-value-last { +.cbi-section-node .cbi-value:last-child, +.cbi-section-node .cbi-optionals:last-child { border-bottom: none; } -.cbi-section-node .table div { - padding-bottom: 0; - border-bottom: none; +.table.cbi-section-table { + width: 100%; + font-size: 95%; + border: 1px dotted #444; + background: #fff; + margin: 0 0 .5em 0; } -.cbi-section-node div.cbi-section-table-row { - margin: 0.25em; +.cbi-section-node > .table.cbi-section-table { + border: none; + margin: 0; } -.table.cbi-section-table { - width: 100%; - font-size: 95%; +@keyframes flash { + 0% { opacity: 1; } + 50% { opacity: .5; } + 100% { opacity: 1; } } -.table.cbi-section-table .th, -.table.cbi-section-table .td { - text-align: center; +.tr.cbi-section-table-row.flash { + animation: flash .35s; } .tr.cbi-section-table-descr .th { @@ -849,6 +795,92 @@ div.cbi-section-remove { padding-top: 1em; } +.th.cbi-section-actions, +.td.cbi-section-actions { + display: flex; + justify-content: flex-end; + flex-direction: row; + flex: 1 1 150px; + 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: 1px; +} + +.cbi-page-actions { + display: flex; + justify-content: flex-end; + margin: -3px; +} + +.cbi-page-actions > form { + display: flex; +} + +.cbi-page-actions > * { + flex: 0 1 auto; + margin: 3px; +} + +.cbi-page-actions > form > * { + flex: 1; + margin: 0 3px 0 0; +} + +.cbi-page-actions > .cbi-button-link, +.cbi-page-actions > form[method="get"]:first-child { + margin-right: auto; +} + + +.th[data-type="button"], .td[data-type="button"], +.th[data-type="fvalue"], .td[data-type="fvalue"] { + flex: 1 1 2em; + text-align: center; +} + +#cbi-network-switch_vlan .th, +#cbi-network-switch_vlan .td { + flex-basis: 12%; +} + +#cbi-wireless-overview .td:first-child { + align-self: center; +} + +.td[data-title]::before { + content: attr(data-title) ":\20"; + font-weight: bold; + text-align: left; + display: none; + padding: 1px; + 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: left; + display: inline-block; + align-self: center; + flex: 1 1 5%; + padding: .25em; + white-space: normal; + word-wrap: break-word; +} + .cbi-value-helpicon img { vertical-align: bottom; } @@ -877,55 +909,54 @@ div.cbi-section-remove { } ul.cbi-tabmenu { - padding: 3px 0; - margin-left: 0 !important; list-style-type: none; - position: relative; - z-index: 10; - top: 4px; - line-height: 20px; -} - -ul.cbi-tabmenu li.cbi-tab, -ul.cbi-tabmenu li.cbi-tab-disabled { - display: inline; - margin: 0; + display: flex; + margin: 0 0 .5em 0 !important; + padding: 0 0 0 5px; + border-bottom: 1px solid #bbb; } -ul.cbi-tabmenu li.cbi-tab a, -ul.cbi-tabmenu li.cbi-tab-disabled a { - text-decoration: none; - padding: 3px 7px; - margin-right: 3px; - border: 1px solid #BBBBBB; +ul.cbi-tabmenu li { + display: inline-flex; + margin: 0 5px -1px 0; + flex: 0 1 auto; + border: 1px solid #bbb; border-bottom: none; border-radius: 3px 3px 0 0; - background-color: #EEEEEE; - color: #BBBBBB; + background: linear-gradient(#ddd 90%, #aaa 100%); + color: #888; + overflow: hidden; + text-overflow: ellipsis; + word-wrap: break-word; } -ul.cbi-tabmenu li.cbi-tab-highlighted a { - color: #000000; - background-color: #FFEEAA; +ul.cbi-tabmenu li a, +ul.cbi-tabmenu li a:hover { + text-decoration: none; + color: inherit; + padding: 5px; + flex: 1; + width: 100%; + height: 100%; } -ul.cbi-tabmenu li a:hover { - color: #000000; +ul.cbi-tabmenu li.cbi-tab-highlighted { + color: #000; + background: #fea; } -ul.cbi-tabmenu li.cbi-tab a { - padding-top: 4px; - color: #000000; - background-color: #FFFFFF; +ul.cbi-tabmenu li.cbi-tab { + color: #000; + background: #fff; } -div.cbi-tab-descr { +.cbi-tab-descr { background-image: url(/luci-static/resources/cbi/help.gif); - background-position: 0.25em 50%; + background-position: .25em 50%; background-repeat: no-repeat; - border-bottom: 1px solid #CCCCCC; - margin: 0.25em 0.25em 2em; - padding: 0.5em 0.5em 0.5em 2em; + border-bottom: 1px solid #ccc; + margin: 0 .25em .25em .25em; + padding: .5em .5em .5em 2em; } @@ -938,6 +969,7 @@ div.cbi-tab-descr { padding: 0; color: #000; min-width: 20em; + max-width: 100%; } .cbi-dropdown:hover { @@ -1091,18 +1123,79 @@ div.cbi-tab-descr { } -.left { +.cbi-tooltip-container { + cursor: help; +} + +.cbi-tooltip { + position: absolute; + z-index: 1000; + left: -1000px; + opacity: 0; + transition: opacity .25s ease-out; + pointer-events: none; + box-shadow: 0 0 2px #444; +} + +.cbi-tooltip-container:hover .cbi-tooltip { + left: auto; + opacity: 1; + transition: opacity .25s ease-in; +} + +.zonebadge .cbi-tooltip { + padding: 1px; + background: inherit; + margin: -1.6em 0 0 -5px; +} + + +.zone-forwards { + display: flex; + flex-wrap: wrap; +} + +.zone-forwards > * { + flex: 1 1 45%; + padding: 1px; +} + +.zone-forwards > span { + flex-basis: 10%; + text-align: center; +} + +.zone-forwards .zone-src, +.zone-forwards .zone-dest { + display: flex; + flex-direction: column; +} + + +.left, .left::before { text-align: left !important; } -.right { +.right, .right::before { text-align: right !important; } -.center { +.center, .center::before { text-align: center !important; } +.td.bottom { + align-self: flex-end; +} + +.td.top { + align-self: flex-start; +} + +.td.middle { + align-self: center; +} + .luci { position: absolute; bottom: 0; @@ -1154,10 +1247,13 @@ div.cbi-tab-descr { align-items: center; } +.ifacebadge > * { + align-self: flex-start; +} + .ifacebadge > img, .ifacebadge > em { margin-right: 5px; - align-self: start; display: inline-block; height: 16px; } @@ -1169,23 +1265,30 @@ div.cbi-tab-descr { .ifacebox { flex-direction: column; - margin: 0 10px; + margin: 0; padding: 0; min-width: 100px; + text-align: center; } .ifacebox > * { padding: 2px; } +.td > .ifacebadge, +.td > .zonebadge { + margin: 0; + vertical-align: top; +} .network-status-table { display: flex; flex-wrap: wrap; + margin: -.25em; } .network-status-table .ifacebox { - margin: .5em; + margin: .25em; font-size: 90%; flex-grow: 1; } @@ -1205,8 +1308,10 @@ div.cbi-tab-descr { flex-wrap: wrap; } +.ifacebadge.large, .network-status-table .ifacebox-body .ifacebadge { flex: 1; + -webkit-flex: 1 1 auto; margin: .5em .25em .25em .25em; padding: .5em; min-width: 220px; @@ -1218,7 +1323,6 @@ div.cbi-tab-descr { padding: 2px; display: inline-block; white-space: nowrap; - cursor: pointer; border-radius: 3px; } @@ -1234,7 +1338,7 @@ div.cbi-tab-descr { .zonebadge .ifacebadge, .cbi-dropdown .ifacebadge { - margin: 0 .125em; + margin: 1px; } .zonebadge .ifacebadge img, @@ -1322,3 +1426,306 @@ div.cbi-tab-descr { } + +@media screen and (max-width: 992px) { + body { + -webkit-text-size-adjust: 100%; + } + + #maincontainer { + flex-direction: column; + width: 100%; + } + + #maincontent { + width: 96%; + margin: auto; + } + + #mainmenu { + border: none; + border-radius: 0; + max-width: none; + background: #000; + box-shadow: 0 0 2px #444; + padding: 0; + border-top: 1px solid #444; + position: relative; + } + + #mainmenu ul > li.selected > a { + background: #444; + color: #fff; + border-top: none; + } + + #mainmenu ul > li.selected:not(.active) > ul { + max-height: 0; + visibility: hidden; + } + + #mainmenu ul > li > a { + flex: 1; + color: #fff; + border: 1px solid #444; + border-width: 0 0 1px 1px; + } + + #mainmenu ul.l1 { + display: flex; + flex-direction: row; + flex-wrap: wrap; + position: relative; + margin-left: -1px; + width: 100%; + } + + #mainmenu ul.l1 > li { + display: inline-flex; + flex: 1 1 auto; + position: relative; + height: 2em; + } + + #mainmenu ul.l1 ul.l2 { + position: absolute; + top: 2em; + right: 0; + z-index: 1000; + background: #000; + box-shadow: 0 0 2px #444; + min-width: 120px; + display: block; + } + + #mainmenu ul.l1 ul.l2.align-left { + right: auto; + left: 0; + } + + #mainmenu ul.l2 > li { + display: block; + } + + #mainmenu ul.l2 > li > a { + padding: .5em; + } + + #mainmenu ul li.mainmenu-item-logout { + margin-top: 0; + margin-left: auto; + } + + #mainmenu ul li.mainmenu-item-logout::before { + content: "\0a"; + flex: 10; + border: 1px solid #444; + border-width: 0 0 1px 1px; + } + + .table { + display: flex; + flex-direction: column; + width: 100%; + } + + .tr { + display: flex; + flex-direction: row; + flex-wrap: wrap; + align-items: flex-end; + } + + .th, .td { + flex: 2 2 25%; + align-self: flex-start; + overflow: hidden; + text-overflow: ellipsis; + word-wrap: break-word; + display: inline-block; + } + + .td select { + word-wrap: normal; + } + + .td[data-type="button"], + .td[data-type="fvalue"] { + flex: 1 1 12.5%; + text-align: left; + } + + .td.cbi-value-field { + align-self: flex-start; + } + + .td.cbi-value-field .cbi-button { + width: 100%; + } + + .table.cbi-section-table { + border: none; + background: none; + margin: 0; + } + + .tr.table-titles, + .cbi-section-table-titles, + .cbi-section-table-descr { + display: none; + } + + .cbi-section-table-row { + display: flex; + flex-direction: row; + flex-wrap: wrap; + border: 1px dotted #444; + margin: 0 0 .5em 0; + background: #fff; + } + + .cbi-section-table-row:hover { + border: 1px solid #4a6b7c; + } + + .cbi-section-table + .cbi-section-create { + padding-top: 0; + } + + .tr[data-title]::before { + display: block; + flex: 1 1 100%; + background: #eef; + } + + .td[data-title]::before { + 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; + } + + .hide-sm, + .hide-xs { + display: none; + } +} + +@media screen and (max-width: 480px) { + body { + font-size: 12pt; + } + + input, textarea, select { + font-size: 12pt !important; + line-height: 1.4em; + } + + select, input[type="text"], input[type="password"] { + width: 100%; + height: 1.4em; + } + + [data-dynlist] > input, + input.cbi-input-password { + width: calc(100% - 20px); + } + + .cbi-dropdown { + min-width: 100%; + } + + .btn, .cbi-button { + font-size: 9pt !important; + line-height: 13pt; + } + + #maincontent { + padding: .25em; + } + + #tabmenu { + margin: -.25em -.25em 1em -.25em; + } + + .th, .td { + flex: 2 2 50%; + } + + .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; + } + + .cbi-value-title { + float: none; + font-weight: bold; + } + + .cbi-value-field { + width: 100%; + margin: 0; + } + + .cbi-value-description { + margin-top: 5px; + display: block; + } + + .cbi-section-create { + margin-bottom: 1em; + } + + .cbi-page-actions { + flex-wrap: wrap; + margin: -2px; + } + + .cbi-page-actions > .cbi-button-link { + flex-basis: 100%; + margin-right: 2px; + } + + .cbi-page-actions > * { + flex: 1 1 auto; + margin: 2px; + } + + ul.cbi-tabmenu { + padding: 0 3px; + } + + ul.cbi-tabmenu li { + font-size: 90%; + margin: 0 1px -1px 0; + } + + .hide-xs { + display: none; + } + + #cbi-network .td[id] > strong { + display: block; + } + + #cbi-network-switch_vlan .td.cbi-section-actions { + flex-basis: 100%; + } +} 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 cbf02a76cd..773cf1f82e 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 @@ -56,9 +56,39 @@ local childs = disp.node_childs(node) if #childs > 0 then - write('<div class="tabmenu%d"><ul class="tabmenu l%d">' %{ - level, level - }) + write('<ul class="mainmenu l%d">' % level) + + local i, v + for i, v in ipairs(childs) do + local nnode = node.nodes[v] + + write('<li class="mainmenu-item-%s %s"><a href="%s">%s</a>' %{ + v, (nnode._menu_selected or (node.leaf and v == leaf)) and 'selected' or '', + nodeurl(prefix, v, nnode.query), + striptags(translate(nnode.title)) + }) + + if level < 2 then + render_menu(prefix .. "/" .. v, nnode, level + 1) + end + + write('</li>') + end + + write('</ul>') + end + end + + local function render_tabmenu(prefix, node, level) + if not level then + level = 1 + end + + local childs = disp.node_childs(node) + if #childs > 0 then + if level > 2 then + write('<ul class="cbi-tabmenu">') + end local selected_node local selected_name @@ -71,20 +101,22 @@ selected_name = v end - write('<li class="tabmenu-item-%s %s"><a href="%s">%s</a></li>' %{ - v, (nnode._menu_selected or (node.leaf and v == leaf)) and 'active' or '', - nodeurl(prefix, v, nnode.query), - striptags(translate(nnode.title)) - }) + if level > 2 then + write('<li class="tabmenu-item-%s %s"><a href="%s">%s</a></li>' %{ + v, (nnode._menu_selected or (node.leaf and v == leaf)) and 'cbi-tab' or '', + nodeurl(prefix, v, nnode.query), + striptags(translate(nnode.title)) + }) + end end - write('</ul><br style="clear:both" />') + if level > 2 then + write('</ul>') + end if selected_node then - render_menu(prefix .. "/" .. selected_name, selected_node, level + 1) + render_tabmenu(prefix .. "/" .. selected_name, selected_node, level + 1) end - - write('</div>') end end @@ -116,6 +148,7 @@ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<%=luci.i18n.context.lang%>" lang="<%=luci.i18n.context.lang%>"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> +<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta http-equiv="Content-Script-Type" content="text/javascript" /> <link rel="stylesheet" type="text/css" media="screen" href="<%=media%>/cascade.css" /> <% if node and node.css then %><link rel="stylesheet" type="text/css" media="screen" href="<%=resource%>/<%=node.css%>" /> @@ -125,6 +158,47 @@ </style> <% end -%> <script type="text/javascript" src="<%=resource%>/xhr.js"></script> +<script type="text/javascript">//<![CDATA[ + document.addEventListener('DOMContentLoaded', function() { + var event = ('ontouchstart' in window) ? 'touchstart' : 'click'; + + document.querySelectorAll('ul.mainmenu.l1 > li > a').forEach(function(a) { + a.addEventListener(event, function(ev) { + var a = ev.target, ul1 = a.parentNode.parentNode, ul2 = a.nextElementSibling; + + document.querySelectorAll('ul.mainmenu.l1 > li.active').forEach(function(li) { + if (li !== a.parentNode) + li.classList.remove('active'); + }); + + if (!ul2) + return; + + if (ul2.parentNode.offsetLeft + ul2.offsetWidth <= ul1.offsetLeft + ul1.offsetWidth) + ul2.classList.add('align-left'); + + ul1.classList.add('active'); + a.parentNode.classList.add('active'); + a.blur(); + + ev.preventDefault(); + ev.stopPropagation(); + }); + }); + + document.addEventListener(event, function(ev) { + var t = ev.target; + + while (t && t.id != 'mainmenu') + t = t.parentNode; + + if (!t) + document.querySelectorAll('ul.mainmenu > li.active').forEach(function(li) { + li.classList.remove('active'); + }); + }); + }); +//]]></script> <title><%=striptags( (boardinfo.hostname or "?") .. ( (node and node.title) and ' - ' .. translate(node.title) or '')) %> - LuCI</title> </head> <body class="lang_<%=luci.i18n.context.lang%>"> @@ -161,11 +235,15 @@ </div> <div id="maincontainer"> - <div id="tabmenu"> + <div id="mainmenu"> <% if category then render_menu(category, cattree) end %> </div> <div id="maincontent"> + <div id="tabmenu"> + <% if category then render_tabmenu(category, cattree) end %> + </div> + <noscript> <div class="alert-message warning"> <h4><%:JavaScript required!%></h4> |