From 4385ff6fabafc3d95260690ef8b015d13b2359a9 Mon Sep 17 00:00:00 2001 From: katibest Date: Mon, 10 Sep 2018 10:52:20 -0400 Subject: [PATCH 1/3] Moved search button to the right side --- apps/block_scout_web/assets/css/components/_navbar.scss | 7 ++++--- .../lib/block_scout_web/templates/layout/_topnav.html.eex | 6 +++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/apps/block_scout_web/assets/css/components/_navbar.scss b/apps/block_scout_web/assets/css/components/_navbar.scss index 422c095154..10730ae3d2 100644 --- a/apps/block_scout_web/assets/css/components/_navbar.scss +++ b/apps/block_scout_web/assets/css/components/_navbar.scss @@ -34,9 +34,10 @@ background: transparent; width: auto; font-size: 12px; - border-left: none; + border-right: none; color: $white; border-color: transparentize($white, 0.30); + padding-right: 0px; &::-webkit-input-placeholder { /* Chrome/Opera/Safari */ @@ -57,13 +58,13 @@ } @include media-breakpoint-up(xl) { - width: calc(43ch + #{$input-padding-x * 2}); + width: calc(41ch + #{$input-padding-x}); } } .navbar .input-group-text { background: none; - border-right: none; + border-left: none; border-color: transparentize($white, 0.30); } diff --git a/apps/block_scout_web/lib/block_scout_web/templates/layout/_topnav.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/layout/_topnav.html.eex index 4ca09fec1c..638bc3fc89 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/layout/_topnav.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/layout/_topnav.html.eex @@ -26,10 +26,10 @@ <%= form_for @conn, chain_path(@conn, :search), [class: "form-inline my-2 my-lg-0", method: :get, enforce_utf8: false], fn f -> %>
-
- + <%= search_input f, :q, class: 'form-control mr-auto', placeholder: gettext("Search by address, transaction hash, or block number"), "aria-describedby": "search-icon", "aria-label": "Search", "data-test": "search_input" %> +
+
- <%= search_input f, :q, class: 'form-control mr-sm-2 ml-auto', placeholder: gettext("Search by address, transaction hash, or block number"), "aria-describedby": "search-icon", "aria-label": "Search", "data-test": "search_input" %>
<% end %> From 62c7d4cd9f0e4ab5011e447aed2dc46cab03b263 Mon Sep 17 00:00:00 2001 From: katibest Date: Mon, 10 Sep 2018 11:32:50 -0400 Subject: [PATCH 2/3] Fixed weird margin on input --- apps/block_scout_web/assets/css/components/_navbar.scss | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/block_scout_web/assets/css/components/_navbar.scss b/apps/block_scout_web/assets/css/components/_navbar.scss index 10730ae3d2..56493397ba 100644 --- a/apps/block_scout_web/assets/css/components/_navbar.scss +++ b/apps/block_scout_web/assets/css/components/_navbar.scss @@ -68,6 +68,10 @@ border-color: transparentize($white, 0.30); } +.input-group-append { + margin-left: 0px; +} + .fa-search { color: $white; } From 5f7595eda9c70c06beeafdda7a72be6fc79c1129 Mon Sep 17 00:00:00 2001 From: jimmay5469 Date: Tue, 11 Sep 2018 08:47:29 -0400 Subject: [PATCH 3/3] i18n --- apps/block_scout_web/priv/gettext/default.pot | 2 +- apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/block_scout_web/priv/gettext/default.pot b/apps/block_scout_web/priv/gettext/default.pot index 4cfdc6966c..a63ecb4899 100644 --- a/apps/block_scout_web/priv/gettext/default.pot +++ b/apps/block_scout_web/priv/gettext/default.pot @@ -320,7 +320,7 @@ msgstr "" msgid "Internal Transactions" msgstr "" -#: lib/block_scout_web/templates/layout/_topnav.html.eex:32 +#: lib/block_scout_web/templates/layout/_topnav.html.eex:29 msgid "Search by address, transaction hash, or block number" msgstr "" diff --git a/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po b/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po index bb9c90c23f..81a6923e93 100644 --- a/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po +++ b/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po @@ -332,7 +332,7 @@ msgstr "" msgid "Internal Transactions" msgstr "" -#: lib/block_scout_web/templates/layout/_topnav.html.eex:32 +#: lib/block_scout_web/templates/layout/_topnav.html.eex:29 msgid "Search by address, transaction hash, or block number" msgstr ""