From 357a9b6513c1da25f1d0d344e9167ac0dd110212 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Hru=C5=A1ka?= Date: Sun, 16 Jul 2017 21:07:52 +0200 Subject: [PATCH] css for Box folding, impl network forget --- html_orig/css/app.css | 40 ++++++++++++++++++----------- html_orig/messages/en.php | 4 +-- html_orig/pages/cfg_wifi.php | 29 ++++++++++++++++++--- html_orig/sass/app.scss | 8 +++--- html_orig/sass/layout/_box.scss | 20 ++++++--------- html_orig/sass/layout/_content.scss | 13 +++++++--- html_orig/sass/pages/_wifi.scss | 7 +++++ 7 files changed, 80 insertions(+), 41 deletions(-) diff --git a/html_orig/css/app.css b/html_orig/css/app.css index 9075115..0e2390b 100644 --- a/html_orig/css/app.css +++ b/html_orig/css/app.css @@ -449,13 +449,16 @@ a:hover { font-size: 2.2807em; margin-top: 0; margin-bottom: 1rem; } + #content h2 { + font-size: 1.42383em; + margin-bottom: 0.61805rem; } @media screen and (max-width: 544px) { #content h1 { font-size: 1.80203em; + margin-bottom: 0.61805rem; } + #content h2 { + font-size: 1.26563em; margin-bottom: 0.61805rem; } } - #content h2 { - font-size: 1.42383em; - margin-bottom: 0.61805rem; } #content td, #content th { padding: 0.38198rem; } #content tbody th { @@ -497,20 +500,21 @@ a:hover { max-width: 1200px; } .Box.str { position: relative; } - .Box.str .Row.buttons { + .Box.str .Row.mq-phone { position: absolute; right: 1rem; - top: 2.7em; - margin: 12px auto; } - @media screen and (min-width: 545px) { - .Box.str .Row.buttons { - right: 0; - top: 0; } } + margin: 1rem auto; } + .Box.str .Row.mq-no-phone { + position: absolute; + right: 0; + top: 0; + margin-top: 0.61805rem; } @media screen and (max-width: 544px) { .Box.mobcol h2 { position: relative; cursor: pointer; + padding-right: 1.3rem; margin-bottom: 0 !important; } .Box.mobcol h2::after { position: absolute; @@ -899,6 +903,12 @@ form span.required { white-space: nowrap; word-wrap: normal; } +.AP-preview-nil { + padding: 0.38198rem 0.61805rem; + background: rgba(0, 0, 0, 0.1); + border-radius: 3px; + border: 2px dashed black; } + .AP-preview .wrap { flex-direction: row; background: #eee !important; @@ -1128,15 +1138,15 @@ body.term #botnav { @media screen and (min-width: 545px) { .mq-phone { - display: none; } } + display: none !important; } } @media screen and (max-width: 544px) { - .mq-tablet-min { - display: none; } } + .mq-tablet-min, .mq-no-phone { + display: none !important; } } @media screen and (min-width: 1001px) { .mq-tablet-max { - display: none; } } + display: none !important; } } @media screen and (max-width: 1000px) { .mq-normal-min { - display: none; } } + display: none !important; } } /*# sourceMappingURL=app.css.map */ diff --git a/html_orig/messages/en.php b/html_orig/messages/en.php index 90560f4..1fb7650 100644 --- a/html_orig/messages/en.php +++ b/html_orig/messages/en.php @@ -11,7 +11,7 @@ return [ 'menu.term' => 'Back to Terminal', 'box.ap' => 'Built-in Access Point', - 'box.sta' => 'Client Mode', + 'box.sta' => 'Connect to External Network', 'wifi.enable' => 'Enabled:', 'wifi.tpw' => 'Transmit Power:', @@ -24,7 +24,7 @@ return [ 'wifi.sta_ssid' => 'Network SSID:', 'wifi.sta_password' => 'Password:', 'wifi.not_conn' => 'Not connected.', - 'wifi.forget' => '', + 'wifi.sta_none' => 'None', 'wifi.submit' => 'Apply!', diff --git a/html_orig/pages/cfg_wifi.php b/html_orig/pages/cfg_wifi.php index 151ec2f..5e7f7c9 100644 --- a/html_orig/pages/cfg_wifi.php +++ b/html_orig/pages/cfg_wifi.php @@ -1,6 +1,10 @@

+
+ +
+
@@ -28,7 +32,7 @@ - +
@@ -37,7 +41,7 @@
-
+
@@ -45,6 +49,10 @@

+
+ +
+
@@ -56,7 +64,7 @@
-
+ -
+
@@ -111,7 +122,17 @@ }); }); + $('#forget-sta').on('click', function() { + $('#sta_ssid').val(''); + $('#sta_password').val(''); + + wifiShowSelected('', '', ''); + }); + function wifiShowSelected(name, password, ip) { + $('#sta-nw').toggleClass('hidden', name.length == 0); + $('#sta-nw-nil').toggleClass('hidden', name.length > 0); + $('#sta-nw .essid').html(e(name)); var nopw = undef(password) || password.length == 0; $('#sta-nw .passwd').html(e(password)).toggleClass('hidden', nopw); diff --git a/html_orig/sass/app.scss b/html_orig/sass/app.scss index b36f320..325b25f 100755 --- a/html_orig/sass/app.scss +++ b/html_orig/sass/app.scss @@ -36,17 +36,17 @@ $c-form-highlight-a: #2ea1f9; // media queries @include media($tablet-min) { - .mq-phone { display: none; } + .mq-phone { display: none!important; } } @include media($phone) { - .mq-tablet-min { display: none; } + .mq-tablet-min, .mq-no-phone { display: none !important; } } @include media($normal-min) { - .mq-tablet-max { display: none; } + .mq-tablet-max { display: none !important; } } @include media($tablet-max) { - .mq-normal-min { display: none; } + .mq-normal-min { display: none !important; } } diff --git a/html_orig/sass/layout/_box.scss b/html_orig/sass/layout/_box.scss index 1aa3381..f14448c 100755 --- a/html_orig/sass/layout/_box.scss +++ b/html_orig/sass/layout/_box.scss @@ -36,21 +36,16 @@ &.str { position: relative; - - .Row.buttons { + .Row.mq-phone { position: absolute; right: dist(0); - top: 2.7em; - margin: 12px auto; + margin: 1rem auto; } - - @include media($tablet-min) { - .Row.buttons { - //position: absolute; - right: 0; - top: 0; - //margin: 12px auto; - } + .Row.mq-no-phone { + position: absolute; + right: 0; + top: 0; + margin-top: dist(-1); } } } @@ -60,6 +55,7 @@ h2 { position: relative; cursor: pointer; + padding-right: 1.3rem; &::after { position: absolute; diff --git a/html_orig/sass/layout/_content.scss b/html_orig/sass/layout/_content.scss index f283350..b1d6b96 100755 --- a/html_orig/sass/layout/_content.scss +++ b/html_orig/sass/layout/_content.scss @@ -21,16 +21,21 @@ margin-bottom: dist(0); } + h2 { + font-size: fsize(3); + margin-bottom: dist(-1); + } + @include media($phone) { h1 { font-size: fsize(5); margin-bottom: dist(-1); } - } - h2 { - font-size: fsize(3); - margin-bottom: dist(-1); + h2 { + font-size: fsize(2); + margin-bottom: dist(-1); + } } td, th { diff --git a/html_orig/sass/pages/_wifi.scss b/html_orig/sass/pages/_wifi.scss index 9a392e0..6e46a6a 100755 --- a/html_orig/sass/pages/_wifi.scss +++ b/html_orig/sass/pages/_wifi.scss @@ -110,6 +110,13 @@ } } +.AP-preview-nil { + padding: dist(-2) dist(-1); + background: rgba(black, .1); + border-radius: 3px; + border: 2px dashed black; +} + .AP-preview { .wrap { @extend %ap-inner;