From 26bde30e9539471bb187881ede3d72d1f1759a82 Mon Sep 17 00:00:00 2001 From: billz Date: Fri, 24 Mar 2023 12:01:47 +0100 Subject: [PATCH 01/11] Create getSignalBars(), add max/min RSSI constants --- includes/wifi_functions.php | 39 ++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/includes/wifi_functions.php b/includes/wifi_functions.php index 9b2ebf75..234933c7 100755 --- a/includes/wifi_functions.php +++ b/includes/wifi_functions.php @@ -2,6 +2,9 @@ require_once 'functions.php'; +const MIN_RSSI = -100; +const MAX_RSSI = -55; + function knownWifiStations(&$networks) { // Find currently configured networks @@ -191,7 +194,41 @@ function reinitializeWPA($force) * * @param string $ssid */ -function ssid2utf8($ssid) { +function ssid2utf8($ssid) +{ return evalHexSequence($ssid); } +/* + * Returns a signal strength indicator based on RSSI value + * + * @param string $rssi + */ +function getSignalBars($rssi) +{ + // assign css class based on RSSI value + if ($rssi >= MAX_RSSI) { + $class = 'strong'; + } elseif ($rssi >= -56) { + $class = 'medium'; + } elseif ($rssi >= -67) { + $class = 'weak'; + } elseif ($rssi >= -89) { + $class = ''; + } + + // calculate percent strength + if ($rssi >= -50) { + $pct = 100; + } elseif ($rssi <= MIN_RSSI) { + $pct = 0; + } else { + $pct = 2*($rssi + 100); + } + $elem = '
'.PHP_EOL; + for ($n = 0; $n < 3; $n++ ) { + $elem .= '
'.PHP_EOL; + } + $elem .= '
'.PHP_EOL; + return $elem; +} From 485035463077c4c4d5c7905026cf6d98850b86c1 Mon Sep 17 00:00:00 2001 From: billz Date: Fri, 24 Mar 2023 12:02:19 +0100 Subject: [PATCH 02/11] Add .signal-icon + .signal-bar classes --- app/css/custom.php | 54 ++++++++++++++++++++++++++++++++++++++++++ app/css/hackernews.css | 29 ++++++++++++++++++++++- app/css/lightsout.css | 27 +++++++++++++++++++++ 3 files changed, 109 insertions(+), 1 deletion(-) diff --git a/app/css/custom.php b/app/css/custom.php index cec2f96b..d6f90c4e 100644 --- a/app/css/custom.php +++ b/app/css/custom.php @@ -257,3 +257,57 @@ canvas#divDBChartBandwidthhourly { color: #ff4500; } +.signal-icon { + margin-top: 2px; + height: 16px; + width: 16px; + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: baseline; +} +.signal-icon .signal-bar { + width: 4px; + border-radius: 1px; + opacity: 30%; + background: ; +} + +.signal-icon .signal-bar:nth-child(1) { height: 40%; } +.signal-icon .signal-bar:nth-child(2) { height: 70%; } +.signal-icon .signal-bar:nth-child(3) { height: 100%; } + +.signal-icon.weak .signal-bar:nth-child(1), +.signal-icon.medium .signal-bar:nth-child(1), +.signal-icon.medium .signal-bar:nth-child(2), +.signal-icon.strong .signal-bar:nth-child(1), +.signal-icon.strong .signal-bar:nth-child(2), +.signal-icon.strong .signal-bar:nth-child(3) +{ opacity: 100%; }.signal-icon { + margin-top: 2px; + height: 16px; + width: 16px; + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: baseline; +} +.signal-icon .signal-bar { + width: 4px; + border-radius: 1px; + opacity: 30%; + background: ; +} + +.signal-icon .signal-bar:nth-child(1) { height: 40%; } +.signal-icon .signal-bar:nth-child(2) { height: 70%; } +.signal-icon .signal-bar:nth-child(3) { height: 100%; } + +.signal-icon.weak .signal-bar:nth-child(1), +.signal-icon.medium .signal-bar:nth-child(1), +.signal-icon.medium .signal-bar:nth-child(2), +.signal-icon.strong .signal-bar:nth-child(1), +.signal-icon.strong .signal-bar:nth-child(2), +.signal-icon.strong .signal-bar:nth-child(3) +{ opacity: 100%; } + diff --git a/app/css/hackernews.css b/app/css/hackernews.css index 53ec065f..5f8f7035 100644 --- a/app/css/hackernews.css +++ b/app/css/hackernews.css @@ -39,7 +39,7 @@ h5.card-title { } .card, .modal-dialog { - border-radius: 1px; + border-radius: 3px; border-color: #ff6600; } @@ -302,3 +302,30 @@ canvas#divDBChartBandwidthhourly { color: #ff4500; } +.signal-icon { + margin-top: 2px; + height: 16px; + width: 16px; + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: baseline; +} +.signal-icon .signal-bar { + width: 4px; + border-radius: 1px; + opacity: 30%; + background: #ff6600; +} + +.signal-icon .signal-bar:nth-child(1) { height: 40%; } +.signal-icon .signal-bar:nth-child(2) { height: 70%; } +.signal-icon .signal-bar:nth-child(3) { height: 100%; } + +.signal-icon.weak .signal-bar:nth-child(1), +.signal-icon.medium .signal-bar:nth-child(1), +.signal-icon.medium .signal-bar:nth-child(2), +.signal-icon.strong .signal-bar:nth-child(1), +.signal-icon.strong .signal-bar:nth-child(2), +.signal-icon.strong .signal-bar:nth-child(3) +{ opacity: 100%; } diff --git a/app/css/lightsout.css b/app/css/lightsout.css index aa42b720..af429c78 100644 --- a/app/css/lightsout.css +++ b/app/css/lightsout.css @@ -484,3 +484,30 @@ canvas#divDBChartBandwidthhourly { color: #ff4500; } +.signal-icon { + margin-top: 2px; + height: 16px; + width: 16px; + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: baseline; +} +.signal-icon .signal-bar { + width: 4px; + border-radius: 1px; + opacity: 30%; + background: #2b8080; +} + +.signal-icon .signal-bar:nth-child(1) { height: 40%; } +.signal-icon .signal-bar:nth-child(2) { height: 70%; } +.signal-icon .signal-bar:nth-child(3) { height: 100%; } + +.signal-icon.weak .signal-bar:nth-child(1), +.signal-icon.medium .signal-bar:nth-child(1), +.signal-icon.medium .signal-bar:nth-child(2), +.signal-icon.strong .signal-bar:nth-child(1), +.signal-icon.strong .signal-bar:nth-child(2), +.signal-icon.strong .signal-bar:nth-child(3) +{ opacity: 100%; } From 162dbf74e0dcbd1771510d80316880137bdb4ee9 Mon Sep 17 00:00:00 2001 From: billz Date: Fri, 24 Mar 2023 12:02:50 +0100 Subject: [PATCH 03/11] Update js-toggle-password w/ fontawesome glyphs --- app/js/custom.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/js/custom.js b/app/js/custom.js index 1412b44f..3bae9432 100644 --- a/app/js/custom.js +++ b/app/js/custom.js @@ -480,18 +480,18 @@ Array.range = (start, end) => Array.from({length: (end - start)}, (v, k) => k + $(document).on("click", ".js-toggle-password", function(e) { var button = $(e.target) var field = $(button.data("target")); + if (field.is(":input")) { e.preventDefault(); if (!button.data("__toggle-with-initial")) { - button.data("__toggle-with-initial", button.text()) + $("i", this).removeClass("fas fa-eye").addClass(button.attr("data-toggle-with")); } if (field.attr("type") === "password") { - button.text(button.data("toggle-with")); field.attr("type", "text"); } else { - button.text(button.data("__toggle-with-initial")); + $("i", this).removeClass("fas fa-eye-slash").addClass("fas fa-eye"); field.attr("type", "password"); } } From dbc0d0d65fa461c63db2b091eadf1a9494f60ee7 Mon Sep 17 00:00:00 2001 From: billz Date: Fri, 24 Mar 2023 12:04:34 +0100 Subject: [PATCH 04/11] Update w/ getSignalBars, hide/show passphrase glyphs --- templates/wifi_stations/network.php | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/templates/wifi_stations/network.php b/templates/wifi_stations/network.php index 1199a5e5..43523e47 100644 --- a/templates/wifi_stations/network.php +++ b/templates/wifi_stations/network.php @@ -4,7 +4,7 @@ -
+
@@ -29,21 +29,14 @@
- = -200) { - echo htmlspecialchars($network['RSSI'], ENT_QUOTES); - echo "dB ("; - if ($network['RSSI'] >= -50) { - echo 100; - } elseif ($network['RSSI'] <= -100) { - echo 0; - } else { - echo 2*($network['RSSI'] + 100); - } - echo "%)"; + = -200) { + echo '
'; + echo getSignalBars($network['RSSI']); + echo '
' .htmlspecialchars($network['RSSI'], ENT_QUOTES) . "dB" . "
"; + echo '
'; } else { echo " not found "; - } + } ?>
@@ -52,8 +45,8 @@ -
-
+
+
@@ -63,7 +56,7 @@
- +
From b01c005596cd83c57db6b0999a358f9e28026ff5 Mon Sep 17 00:00:00 2001 From: billz Date: Fri, 24 Mar 2023 15:08:49 +0100 Subject: [PATCH 05/11] Initial commit --- app/css/all.css | 207 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 207 insertions(+) create mode 100644 app/css/all.css diff --git a/app/css/all.css b/app/css/all.css new file mode 100644 index 00000000..781a7a95 --- /dev/null +++ b/app/css/all.css @@ -0,0 +1,207 @@ +/* +Name: all.css +Author: @billz +Author URI: https://github.com/billz +Description: Classes shared by all themes +License: GNU General Public License v3.0 +*/ + +/* Small devices (portrait phones, up to 576px) */ +@media (max-width: 576px) { + .container-fluid, .card-body, .col-md-6 { padding-left: 0.5rem; padding-right: 0.5rem; } + .card .card-header { padding: .75rem .5rem; font-size: 1.0rem; } + .row { margin-left: 0rem; margin-right: 0rem; } + .col-lg-12 { padding-right: 0.25rem; padding-left: 0.25rem; } + .form-group.col-md-6 { margin-left: -0.5rem; } + h4.mt-3 { margin-left: 0.5rem; } +} + +.sidebar-brand-text { + text-transform: none; + color: #212529; + font-size: 2.0rem; + font-weight: 500; + font-family: Helvetica, Arial, sans-serif; +} + +.h-underlined { + border-bottom: 1px solid #e3e6f0; + padding-bottom: 0.3rem; +} + +.navbar-logo { + margin-top: 0.5em; + margin-left: 0.5em; +} + +.page-header { + font-size: 26pt; + margin: 20px 0 20px; +} + +.info-item { + text-transform: uppercase; + font-size: 0.7em; + color: #858796; +} + +.info-value { + font-size: 0.7rem; + margin-left: 0.7rem; +} + +.info-item-xs { + font-size: 0.7rem; + margin-left: 0.3rem; +} + +.info-item-wifi { + width: 6rem; + float: left; +} + +.service-status { + border-width: 0; + align-items: center; +} + +.service-status-up { + color: #a1ec38 !important; +} + +.service-status-warn { + color: #f6f044 !important; +} + +.service-status-down { + color: #f80107 !important; + animation: flash 1s linear infinite; +} +@keyframes flash { + 50% { + opacity: 0; + } +} + +.logoutput { + width:100%; + height: 20rem; + border: 1px solid #d1d3e2; + border-radius: .35rem; +} + +.dhcp-static-leases { + margin-top: 1em; + margin-bottom: 1em; +} + +.dhcp-static-lease-row { + margin-top: 0.5em; + margin-bottom: 0.5em; +} + +.loading-spinner { + background: url("../../app/img/loading-spinner.gif") no-repeat scroll center center transparent; + min-height: 450px; + width: 100%; +} + +@media (min-width: 576px) { + .card-grid { + display: grid; + grid-template-columns: minmax(0, 1fr) 50%; + grid-gap: 1rem; + } +} + +.toggle-off.btn { + padding-left: 1.2rem; + font-size: 0.9rem!important; +} + +.toggle-on.btn { + font-size: 0.9rem!important; +} + +canvas#divDBChartBandwidthhourly { + height: 350px!important; +} + +.chart-container { + height: 150px; + width: 200px; +} + +.table { + margin-bottom: 0rem; +} + +.check-hidden { + visibility: hidden; +} + +.check-progress { + color: #999; +} + +.fa-check { + color: #90ee90; +} + +.fa-times { + color: #ff4500; +} + +.signal-icon { + margin-top: 2px; + height: 16px; + width: 16px; + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: baseline; +} +.signal-icon .signal-bar { + width: 4px; + border-radius: 1px; + opacity: 30%; + background: ; +} + +.signal-icon .signal-bar:nth-child(1) { height: 40%; } +.signal-icon .signal-bar:nth-child(2) { height: 70%; } +.signal-icon .signal-bar:nth-child(3) { height: 100%; } + +.signal-icon.weak .signal-bar:nth-child(1), +.signal-icon.medium .signal-bar:nth-child(1), +.signal-icon.medium .signal-bar:nth-child(2), +.signal-icon.strong .signal-bar:nth-child(1), +.signal-icon.strong .signal-bar:nth-child(2), +.signal-icon.strong .signal-bar:nth-child(3) +{ opacity: 100%; }.signal-icon { + margin-top: 2px; + height: 16px; + width: 16px; + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: baseline; +} +.signal-icon .signal-bar { + width: 4px; + border-radius: 1px; + opacity: 30%; +} + +.signal-icon .signal-bar:nth-child(1) { height: 40%; } +.signal-icon .signal-bar:nth-child(2) { height: 70%; } +.signal-icon .signal-bar:nth-child(3) { height: 100%; } + +.signal-icon.weak .signal-bar:nth-child(1), +.signal-icon.medium .signal-bar:nth-child(1), +.signal-icon.medium .signal-bar:nth-child(2), +.signal-icon.strong .signal-bar:nth-child(1), +.signal-icon.strong .signal-bar:nth-child(2), +.signal-icon.strong .signal-bar:nth-child(3) +{ opacity: 100%; } + From 6df78d125c53a644b42baeefdca6fe157967cb73 Mon Sep 17 00:00:00 2001 From: billz Date: Fri, 24 Mar 2023 15:09:41 +0100 Subject: [PATCH 06/11] Move common declarations to all.css --- app/css/custom.php | 202 +---------------------------------------- app/css/hackernews.css | 179 +----------------------------------- app/css/lightsout.css | 202 +++++------------------------------------ 3 files changed, 28 insertions(+), 555 deletions(-) diff --git a/app/css/custom.php b/app/css/custom.php index d6f90c4e..ff87b3b2 100644 --- a/app/css/custom.php +++ b/app/css/custom.php @@ -12,46 +12,16 @@ Description: Default theme for RaspAP License: GNU General Public License v3.0 */ +@import url('all.css'); + body { color: #212529; } -.h-underlined { - border-bottom: 1px solid #e3e6f0; - padding-bottom: 0.3rem; -} - -.page-header { - margin: 20px 0 20px; -} - -.navbar-logo { - margin-top: 0.5em; - margin-left: 0.5em; -} - -/* Small devices (portrait phones, up to 576px) */ -@media (max-width: 576px) { - .container-fluid, .card-body, .col-md-6 { padding-left: 0.5rem; padding-right: 0.5rem; } - .card .card-header { padding: .75rem .5rem; font-size: 1.0rem; } - .row { margin-left: 0rem; margin-right: 0rem; } - .col-lg-12 { padding-right: 0.25rem; padding-left: 0.25rem; } - .form-group.col-md-6 { margin-left: -0.5rem; } - h4.mt-3 { margin-left: 0.5rem; } -} - .sidebar { background-color: #f8f9fc; } -.sidebar-brand-text { - text-transform: none; - color: #212529; - font-size: 2.0rem; - font-weight: 500; - font-family: Helvetica, Arial, sans-serif; -} - .sidebar .nav-item.active .nav-link { font-weight: 500; } @@ -122,87 +92,12 @@ i.fa.fa-bars:hover{ color: #6e707e; } -.info-item { - text-transform: uppercase; - font-size: 0.7em; - color: #858796; -} - -.info-value { - font-size: 0.7rem; - margin-left: 0.7rem; -} - -.info-item-xs { - font-size: 0.7rem; - margin-left: 0.3rem; -} - -.info-item-wifi { - width: 6rem; - float: left; -} - -.service-status { - border-width: 0; - align-items: center; -} - -.service-status-up { - color: #a1ec38; -} - -.service-status-warn { - color: #f6f044; -} - -.service-status-down { - color: #f80107; - animation: flash 1s linear infinite; -} -@keyframes flash { - 50% { - opacity: 0; - } -} - -.logoutput { - width:100%; - height: 20rem; - border: 1px solid #d1d3e2; - border-radius: .35rem; -} - pre.unstyled { border-width: 0; background-color: transparent; padding: 0; } -.dhcp-static-leases { - margin-top: 1em; - margin-bottom: 1em; -} - -.dhcp-static-lease-row { - margin-top: 0.5em; - margin-bottom: 0.5em; -} - -.loading-spinner { - background: url("../../app/img/loading-spinner.gif") no-repeat scroll center center transparent; - min-height: 150px; - width: 100%; -} - -@media (min-width: 576px) { - .card-grid { - display: grid; - grid-template-columns: minmax(0, 1fr) 50%; - grid-gap: 1rem; - } -} - .sidebar.toggled .nav-item .nav-link span { display: none; } .sidebar .nav-item .nav-link i, @@ -214,100 +109,7 @@ pre.unstyled { color: #000; } -.toggle-off.btn { - padding-left: 1.2rem; - font-size: 0.9rem!important; -} - -.toggle-on.btn { - font-size: 0.9rem!important; -} - -canvas#divDBChartBandwidthhourly { - height: 350px!important; -} - -.chart-container { - height: 150px; - width: 200px; -} - -.table { - margin-bottom: 0rem; -} - -.check-hidden { - visibility: hidden; -} - -.check-updated { - opacity: 0; - color: #90ee90; -} - -.check-progress { - color: #999; -} - -.fa-check { - color: #90ee90; -} - -.fa-times { - color: #ff4500; -} - -.signal-icon { - margin-top: 2px; - height: 16px; - width: 16px; - display: flex; - flex-direction: row; - justify-content: space-between; - align-items: baseline; -} .signal-icon .signal-bar { - width: 4px; - border-radius: 1px; - opacity: 30%; background: ; } -.signal-icon .signal-bar:nth-child(1) { height: 40%; } -.signal-icon .signal-bar:nth-child(2) { height: 70%; } -.signal-icon .signal-bar:nth-child(3) { height: 100%; } - -.signal-icon.weak .signal-bar:nth-child(1), -.signal-icon.medium .signal-bar:nth-child(1), -.signal-icon.medium .signal-bar:nth-child(2), -.signal-icon.strong .signal-bar:nth-child(1), -.signal-icon.strong .signal-bar:nth-child(2), -.signal-icon.strong .signal-bar:nth-child(3) -{ opacity: 100%; }.signal-icon { - margin-top: 2px; - height: 16px; - width: 16px; - display: flex; - flex-direction: row; - justify-content: space-between; - align-items: baseline; -} -.signal-icon .signal-bar { - width: 4px; - border-radius: 1px; - opacity: 30%; - background: ; -} - -.signal-icon .signal-bar:nth-child(1) { height: 40%; } -.signal-icon .signal-bar:nth-child(2) { height: 70%; } -.signal-icon .signal-bar:nth-child(3) { height: 100%; } - -.signal-icon.weak .signal-bar:nth-child(1), -.signal-icon.medium .signal-bar:nth-child(1), -.signal-icon.medium .signal-bar:nth-child(2), -.signal-icon.strong .signal-bar:nth-child(1), -.signal-icon.strong .signal-bar:nth-child(2), -.signal-icon.strong .signal-bar:nth-child(3) -{ opacity: 100%; } - diff --git a/app/css/hackernews.css b/app/css/hackernews.css index 5f8f7035..76a55370 100644 --- a/app/css/hackernews.css +++ b/app/css/hackernews.css @@ -6,6 +6,8 @@ Description: A theme inspired by HackerNews for RaspAP License: GNU General Public License v3.0 */ +@import url('all.css'); + html * { font-family: Verdana, Geneva, sans-serif; color: #828282; @@ -33,11 +35,6 @@ h5.card-title { color: #212529; } -.h-underlined { - border-bottom: 1px solid #e3e6f0; - padding-bottom: 0.3rem; -} - .card, .modal-dialog { border-radius: 3px; border-color: #ff6600; @@ -71,14 +68,6 @@ h5.card-title { border-radius: 0px; } -.sidebar-brand-text { - text-transform: none; - color: #212529; - font-size: 2.0rem; - font-weight: 500; - font-family: Verdana, Geneva, sans-serif; -} - .sidebar-light hr.sidebar-divider { padding-top: 0.5rem; } @@ -90,38 +79,19 @@ ul.nav-tabs, .nav-tabs .nav-link { .sidebar .nav-item .nav-link { padding: 0.6rem; + margin-left: 0.6rem; } .sidebar-light .nav-item.active .nav-link { font-weight: 300; } -.page-header { - font-size: 26pt; - margin: 10px 0 20px; -} - -.navbar-logo { - margin-top: 0.5em; - margin-left: 0.5em; -} - #wrapper,#page-wrapper, #wrapper #content-wrapper, .nav>li>a,.nav { background-color: #fff; } -/* Small devices (portrait phones, up to 576px) */ -@media (max-width: 576px) { - .container-fluid, .card-body, .col-md-6 { padding-left: 0.5rem; padding-right: 0.5rem; } - .card .card-header { padding: .75rem .5rem; font-size: 1.0rem; } - .row { margin-left: 0rem; margin-right: 0rem; } - .col-lg-12 { padding-right: 0.25rem; padding-left: 0.25rem; } - .form-group.col-md-6 { margin-left: -0.5rem; } - h4.mt-3 { margin-left: 0.5rem; } -} - .card-body { background-color: #f6f6ef; } @@ -152,60 +122,8 @@ ul.nav-tabs, .nav-tabs .nav-link { color: #eee; } -.info-item { - text-transform: uppercase; - font-size: 0.7em; - color: #858796; -} - -.info-value { - font-size: 0.7rem; - margin-left: 0.7rem; -} - -.info-item-xs { - font-size: 0.7rem; - margin-left: 0.3rem; - line-height: 1.5em; -} - -.info-item-wifi { - width: 6rem; - float: left; -} - -.logoutput { - width: 100%; - height: 20rem; - border: 1px solid #d1d3e2; - border-radius: .35rem; -} - -.service-status { - border-width: 0; - align-items: center; -} - -.service-status-up { - color: #a1ec38!important; -} - -.service-status-warn { - color: #f6f044!important; -} - -.service-status-down { - color: #f80107!important; - animation: flash 1s linear infinite; -} -@keyframes flash { - 50% { - opacity: 0; - } -} - .fas.fa-circle { - font-size: 0.5rem; + font-size: 0.7rem; } .logoutput { @@ -219,30 +137,6 @@ pre.unstyled { padding: 0; } -.dhcp-static-leases { - margin-top: 1em; - margin-bottom: 1em; -} - -.dhcp-static-lease-row { - margin-top: 0.5em; - margin-bottom: 0.5em; -} - -.loading-spinner { - background: url("../../app/img/loading-spinner.gif") no-repeat scroll center center transparent; - min-height: 150px; - width: 100%; -} - -@media (min-width: 576px) { - .card-grid { - display: grid; - grid-template-columns: minmax(0, 1fr) 50%; - grid-gap: 1rem; - } -} - .sidebar.toggled .nav-item .nav-link { text-align: center; padding: .6rem 1rem; @@ -260,72 +154,7 @@ pre.unstyled { color: #000; } -.toggle-off.btn { - padding-left: 0.9rem; - font-size: 0.9rem!important; -} - -.toggle-on.btn { - font-size: 0.9rem!important; -} - -canvas#divDBChartBandwidthhourly { - height: 350px!important; -} - -.chart-container { - height: 150px; - width: 200px; -} -.table { - margin-bottom: 0rem; -} - -.check-hidden { - visibility: hidden; -} - -.check-updated { - opacity: 0; - color: #1cc88a; -} - -.check-progress { - color: #999; -} - -.fa-check { - color: #90ee90; -} - -.fa-times { - color: #ff4500; -} - -.signal-icon { - margin-top: 2px; - height: 16px; - width: 16px; - display: flex; - flex-direction: row; - justify-content: space-between; - align-items: baseline; -} .signal-icon .signal-bar { - width: 4px; - border-radius: 1px; - opacity: 30%; background: #ff6600; } -.signal-icon .signal-bar:nth-child(1) { height: 40%; } -.signal-icon .signal-bar:nth-child(2) { height: 70%; } -.signal-icon .signal-bar:nth-child(3) { height: 100%; } - -.signal-icon.weak .signal-bar:nth-child(1), -.signal-icon.medium .signal-bar:nth-child(1), -.signal-icon.medium .signal-bar:nth-child(2), -.signal-icon.strong .signal-bar:nth-child(1), -.signal-icon.strong .signal-bar:nth-child(2), -.signal-icon.strong .signal-bar:nth-child(3) -{ opacity: 100%; } diff --git a/app/css/lightsout.css b/app/css/lightsout.css index af429c78..cd54c648 100644 --- a/app/css/lightsout.css +++ b/app/css/lightsout.css @@ -6,6 +6,8 @@ Description: A dark mode theme for RaspAP License: GNU General Public License v3.0 */ +@import url('all.css'); + html * { font-family: Helvetica,Arial,sans-serif; color: #afafaf; @@ -23,20 +25,9 @@ h5.card-title { font-size: 1.2rem; } -.h-underlined { - border-bottom: 1px solid #e3e6f0; - padding-bottom: 0.3rem; -} - .page-header { - padding: 0 20px; border-left: .01rem solid #d2d2d2; -} - -.navbar-logo { - margin-top: 0.5em; - margin-left: 0.5em; - filter: brightness(70%); + border-bottom: .01rem solid #d2d2d2; } .sidebar-light .nav-item.active .nav-link i { @@ -51,16 +42,6 @@ h5.card-title { background-color: #202020; } -/* Small devices (portait phones, up to 576px) */ -@media (max-width: 576px) { - .container-fluid, .card-body, .col-md-6 { padding-left: 0.5rem; padding-right: 0.5rem; } - .card .card-header { padding: .75rem .5rem; font-size: 1.0rem; } - .row { margin-left: 0rem; margin-right: 0rem; } - .col-lg-12 { padding-right: 0.25rem; padding-left: 0.25rem; } - .form-group.col-md-6 { margin-left: -0.5rem; } - h4.mt-3 { margin-left: 0.5rem; } -} - .topbar { background-color: #202020; } @@ -95,7 +76,6 @@ h5.card-title { } #content, .navbar, .sidebar, .footer, .sticky-footer { - background-image: url('/app/img/bg.png'); background-attachment: scroll; background-repeat: repeat; background-size: auto; @@ -159,18 +139,8 @@ hr { border-top: .01rem solid #d2d2d2; } -.page-header { - font-size: 24pt; - margin: 10px 0 20px; - border-bottom: .01rem solid #d2d2d2; -} - .sidebar-brand-text { - text-transform: none; - color: #ac1b3d; - font-size: 2.0rem; - font-weight: 500; - font-family: inherit; + color: #2b8080 !important; } .ra-raspap:before { @@ -252,28 +222,6 @@ hr { border-right: 1px solid #404040; } -.info-item { - text-transform: uppercase; - font-size: 0.7em; - color: #858796; -} - -.info-value { - font-size: 0.7rem; - margin-left: 0.7rem; -} - -.info-item-xs { - font-size: 0.7rem; - line-height: 1.5em; - margin-left: 0.5rem; -} - -.info-item-wifi { - width: 6rem; - float: left; -} - .label-warning { background-color: #d2d2d2; } @@ -367,15 +315,25 @@ color: #d2d2d2 !important background-color: #d2d2d2; } -.logoutput { - width: 100%; - height: 300px; - background-color: #202020; - border-color: #404040; +.figure-img { + filter: opacity(0.7); } -tspan, rect { - fill: #d2d2d2; +.ra-wireguard:before { + color: #404040 !important; +} + +.ra-wireguard:hover:before { + color: #d1d3e2 !important; +} + +.sidebar .nav-item.active .nav-link span.ra-wireguard:before { + color: #d2d2d2 !important; +} + +.logoutput { + background-color: #202020; + border-color: #404040; } .text-muted { @@ -383,29 +341,7 @@ tspan, rect { } .fas.fa-circle { - font-size: 0.5rem; -} - -.service-status { - align-items: center; -} - -.service-status-up { - color: #a1ec38 !important; -} - -.service-status-warn { - color: #f6f044 !important; -} - -.service-status-down { - color: #f80107 !important; - animation: flash 1s linear infinite; -} -@keyframes flash { - 50% { - opacity: 0; - } + font-size: 0.7rem; } pre { @@ -413,101 +349,7 @@ pre { border: #202020; } -.dhcp-static-leases { - margin-top: 1em; - margin-bottom: 1em; -} - -.dhcp-static-lease-row { - margin-top: 0.5em; - margin-bottom: 0.5em; -} - -.loading-spinner { - background: url("../../app/img/loading-spinner.gif") no-repeat scroll center center transparent; - min-height: 150px; - width: 100%; -} - -@media (min-width: 576px) { - .card-grid { - display: grid; - grid-template-columns: minmax(0, 1fr) 50%; - grid-gap: 1rem; - } -} - -.toggle-off.btn { - padding-left: 1.2rem; - font-size: 0.9rem!important; -} - -.toggle-on.btn { - font-size: 0.9rem!important; -} - -canvas#divDBChartBandwidthhourly { - height: 350px!important; -} - -.chart-container { - height: 150px; - width: 200px; -} - -.table { - margin-bottom: 0rem; -} - -.figure, .authors { - filter: brightness(70%) !important; -} - -.check-hidden { - visibility: hidden; -} - -.check-updated { - opacity: 0; - color: #1cc88a; -} - -.check-progress { - color: #999; -} - -.fa-check { - color: #90ee90; -} - -.fa-times { - color: #ff4500; -} - -.signal-icon { - margin-top: 2px; - height: 16px; - width: 16px; - display: flex; - flex-direction: row; - justify-content: space-between; - align-items: baseline; -} .signal-icon .signal-bar { - width: 4px; - border-radius: 1px; - opacity: 30%; background: #2b8080; } -.signal-icon .signal-bar:nth-child(1) { height: 40%; } -.signal-icon .signal-bar:nth-child(2) { height: 70%; } -.signal-icon .signal-bar:nth-child(3) { height: 100%; } - -.signal-icon.weak .signal-bar:nth-child(1), -.signal-icon.medium .signal-bar:nth-child(1), -.signal-icon.medium .signal-bar:nth-child(2), -.signal-icon.strong .signal-bar:nth-child(1), -.signal-icon.strong .signal-bar:nth-child(2), -.signal-icon.strong .signal-bar:nth-child(3) -{ opacity: 100%; } From 8b6e3e5edb47b53c26533caf06b43842891b6ffc Mon Sep 17 00:00:00 2001 From: billz Date: Fri, 24 Mar 2023 15:11:02 +0100 Subject: [PATCH 07/11] Remove obsolete images --- app/img/authors-8bit-200px.png | Bin 3706 -> 0 bytes app/img/bg.png | Bin 1498 -> 0 bytes 2 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 app/img/authors-8bit-200px.png delete mode 100644 app/img/bg.png diff --git a/app/img/authors-8bit-200px.png b/app/img/authors-8bit-200px.png deleted file mode 100644 index 72c6f1b3e8d04259c5b6dc88e5fdfe11b48cfe8e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3706 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 aAp@t<*3Vg$+n&wdoBVx)xhL2$`Tqe*KVKXG diff --git a/app/img/bg.png b/app/img/bg.png deleted file mode 100644 index 0f31eecd5e9ed6179e273cb347a57953c3ebb0e9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1498 zcmV<01tt24P)>wjJp33XR{>a{Jpam%f@Gdl~0tl7HwbwBvnyoDynv(D)jGF)&f%3 zf`xsIz)JWM)kMYCG^!KYpf)xYpxjG*h(ZKXp*c5CH63*-nTnHzwk{el5hD*Mals#5DTr++tk!EeH@-D$l2DesxLQk1^Fu(M`Jea4TY9k@$S) zugErSIi@icwP6Yiq93klt$g|EVVMzCGvgOKRZu$vEU>RfWu{-GPhDTiL=-y{L76w4 zKIiJncVc@I{cIN1MwNy(qOGlh({)Ly0!~aKYZ)GFwr(ca!guqp$&F4yb?X{%3Vcqx z#j&dV+}@bm;!R+-E-~Yms_qu&9Z@vX?Jtb~Obc+7=!fu@i04PGG9Gf%!~@WRqHfcz>xp zRn;~<(NvX4vlr2B-53w}N%0wvDKP@u}AowTT? zX+cfx?=mcQ+qZMRq)AmDesw(ye3oHPEZcdf-y#mG&*`oxor<8Hxc4CUlI~<9`w5$U zOplFItcnd*SSzAeH{Nv0)2ffH+EH7j6P=tVkDzW{+`16JsH_L%*st#C z?$$NaJfAN9=)SWte7iQw+iSYPnKLE6^Gww5KUU9>|Nq7=vlApg&N++pB->Q0yLGp_ z=7{9$TUf2zrB!W{$22;7i=~BSU1Td_0d9*)z@p^L%cGgJqNL~H4fo-Xv!}ag>TY`r z`gp&-f%)qpxQ%sw{%-9)kBY*)sy=9^RmJJm?a{3}adl}L&(lPGu-&>$*1jgf=_!ee zwVhd5oJL8_RD3+UtNl!~)?IGm0u^#~Bbshq8+=+-)1(U)hPvD0{>ts`&F!vfXNUB8 z-R6HU3)Uj@uXE<4Ic2{|=Y6K0WytmOpWXdU>W{9reQX7$dlIRO+uh@J`b@M{$!MFM z9!_@`#1C=V!0!BBhGoQn8nvnk?!EE1yQw?*+t}k=MQu;fk{P)zW}U|Fbexaw0#0}3 zeRFkHeAL$LiyO}hoD`34RY9FbMVsAXoq%jzZ}V(!5|+_4V5@1=j%lNh?QLvWXU)$R zS6GQ>848&%X-75HXRhuhFos)Me(lwsQK6j?)R{iB02cn5{x0y^f2UkiRo_=&Z*kod za&B$?ab_nPMbkUkC(-e_%dl2lr?IEI^z)KV#E!N*C5_UN2NV2+5)6ASET8VOTar}O zYDT2p?R>y^oK0D4M>m!AY~zS(&+OWn0&9OR{%3cce7Y-dRMGkAZcxGZbpa2U#Q)Td zdY>i=X4>4LQjs*W;8_-|$23{HyE%WCy9b@9?REaV7SGvO$+&=eTm0!_syES5{hOE( zm@J;UyPL_bnvs8(4n^CkD*1a4Y4qt=VlrL-vAgSZ7w0dk;`=4^@7?#M^Ze6TZXzbA zIJvqf&79jAA8%t%0?k>5Yuf2`t~zhl)crmlZ1`On*G+0hv-co3Y42wXB0NA+cXb`v zabqOY?K~%SW?Zb>Ii7!Zcdbt?qGGqM&Q0%o_xY9G;^sONVS)85!|cY|rnw1V-D{s; z-AE#9S Date: Fri, 24 Mar 2023 15:27:44 +0100 Subject: [PATCH 08/11] Style + layout tweaks --- app/css/all.css | 4 ++++ app/css/lightsout.css | 5 +++++ templates/wifi_stations/network.php | 4 ++-- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/app/css/all.css b/app/css/all.css index 781a7a95..d868741f 100644 --- a/app/css/all.css +++ b/app/css/all.css @@ -152,6 +152,10 @@ canvas#divDBChartBandwidthhourly { color: #ff4500; } +button.btn.btn-light.js-toggle-password { + border: 1px solid lightgrey; +} + .signal-icon { margin-top: 2px; height: 16px; diff --git a/app/css/lightsout.css b/app/css/lightsout.css index cd54c648..aea5c83d 100644 --- a/app/css/lightsout.css +++ b/app/css/lightsout.css @@ -349,6 +349,11 @@ pre { border: #202020; } +button.btn.btn-light.js-toggle-password { + border: 1px solid #343434; +} + + .signal-icon .signal-bar { background: #2b8080; } diff --git a/templates/wifi_stations/network.php b/templates/wifi_stations/network.php index 43523e47..87db2123 100644 --- a/templates/wifi_stations/network.php +++ b/templates/wifi_stations/network.php @@ -49,14 +49,14 @@
-
+
- +
From 18c062364963226c8b4ab7a53eecef4c7832e6a2 Mon Sep 17 00:00:00 2001 From: billz Date: Fri, 24 Mar 2023 15:42:05 +0100 Subject: [PATCH 09/11] Apply misc styles from insiders --- app/css/all.css | 15 +++++++++++++++ templates/dashboard.php | 4 +++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/app/css/all.css b/app/css/all.css index d868741f..0278d889 100644 --- a/app/css/all.css +++ b/app/css/all.css @@ -132,6 +132,11 @@ canvas#divDBChartBandwidthhourly { width: 200px; } +.dbChart { + display: flex; + height: 80%; +} + .table { margin-bottom: 0rem; } @@ -209,3 +214,13 @@ button.btn.btn-light.js-toggle-password { .signal-icon.strong .signal-bar:nth-child(3) { opacity: 100%; } +.gs-edit { + border: 1px dashed #ccc; + background-color: #f1faee; + border-radius: 4px; +} + +figcaption.figure-caption a { + color: #858796; +} + diff --git a/templates/dashboard.php b/templates/dashboard.php index 597dc6b5..3b727517 100755 --- a/templates/dashboard.php +++ b/templates/dashboard.php @@ -24,7 +24,9 @@

- +
+ +
From fcdd966619c576d1ad070154a51b7f0f2aa5992f Mon Sep 17 00:00:00 2001 From: billz Date: Sat, 25 Mar 2023 08:52:56 +0100 Subject: [PATCH 10/11] Update w/ gettext --- includes/wifi_functions.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/wifi_functions.php b/includes/wifi_functions.php index 234933c7..990ff07c 100755 --- a/includes/wifi_functions.php +++ b/includes/wifi_functions.php @@ -225,10 +225,11 @@ function getSignalBars($rssi) } else { $pct = 2*($rssi + 100); } - $elem = '
'.PHP_EOL; + $elem = '
'.PHP_EOL; for ($n = 0; $n < 3; $n++ ) { $elem .= '
'.PHP_EOL; } $elem .= '
'.PHP_EOL; return $elem; } + From 7a2b3198306121b419c42238a9d2a5721d33f02c Mon Sep 17 00:00:00 2001 From: billz Date: Sat, 25 Mar 2023 11:56:44 +0100 Subject: [PATCH 11/11] Set pointer-events prop for button w/ fas icon --- app/css/all.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/css/all.css b/app/css/all.css index 0278d889..12a47159 100644 --- a/app/css/all.css +++ b/app/css/all.css @@ -224,3 +224,7 @@ figcaption.figure-caption a { color: #858796; } +button > i.fas { + pointer-events: none; +} +