]> git.openstreetmap.org Git - rails.git/commitdiff
Make search input a direct child of input group
authorAnton Khorev <tony29@yandex.ru>
Sat, 16 Sep 2023 14:40:07 +0000 (17:40 +0300)
committerAnton Khorev <tony29@yandex.ru>
Sun, 1 Oct 2023 14:49:31 +0000 (17:49 +0300)
app/assets/stylesheets/common.scss
app/views/layouts/_search.html.erb

index b95d1fcd60202c5072d962d0520a45ac2f3e9106..1d40564519e453cbd29af6d00b1384b4b645d478 100644 (file)
@@ -1055,11 +1055,12 @@ tr.turn:hover {
 .search_form {
   background-color: $lightgrey;
 
+  #query {
+    z-index: 0;
+  }
+
   .describe_location {
-    top: 6px;
-    right: 6px;
     font-size: 10px;
-    color: $blue;
   }
 }
 
index 2f785079c8eb21bae3861c3a68d94cc7bac61ace..dc72cea8313b94203c684f328d666b2182b857fa 100644 (file)
@@ -2,12 +2,12 @@
   <form method="GET" action="<%= search_path %>" class="search_form px-1 py-2">
     <div class="row gx-2 mx-0">
       <div class="col">
-        <div class="d-flex">
-          <span class='position-relative flex-grow-1'>
-            <%= link_to t("site.search.where_am_i"), "#", :class => "describe_location position-absolute", :title => t("site.search.where_am_i_title") %>
-            <%= text_field_tag "query", params[:query], :placeholder => t("site.search.search"), :autofocus => autofocus, :autocomplete => "on", :class => "form-control form-control-sm rounded-0 rounded-start border-end-0", :dir => "auto" %>
-          </span>
-          <%= submit_tag t("site.search.submit_text"), :class => "btn btn-sm btn-primary rounded-0 rounded-end", :data => { :disable_with => false } %>
+        <div class="input-group flex-nowrap">
+          <%= text_field_tag "query", params[:query], :placeholder => t("site.search.search"), :autofocus => autofocus, :autocomplete => "on", :class => "form-control form-control-sm", :dir => "auto" %>
+          <div class="input-group-text border-start-0 p-0 position-relative">
+            <%= link_to t("site.search.where_am_i"), "#", :class => "describe_location position-absolute end-0 me-1 btn btn-sm btn-outline-primary border-0 bg-transparent", :title => t("site.search.where_am_i_title") %>
+          </div>
+          <%= submit_tag t("site.search.submit_text"), :class => "btn btn-sm btn-primary", :data => { :disable_with => false } %>
         </div>
       </div>
       <div class="col-auto">