]> git.openstreetmap.org Git - rails.git/commitdiff
Merge remote-tracking branch 'upstream/pull/4266'
authorTom Hughes <tom@compton.nu>
Mon, 2 Oct 2023 17:47:21 +0000 (18:47 +0100)
committerTom Hughes <tom@compton.nu>
Mon, 2 Oct 2023 17:47:21 +0000 (18:47 +0100)
app/assets/stylesheets/common.scss
app/views/layouts/_search.html.erb

index fc0a8292fd33920a0661bde8bfa65c3c884516e6..dd07ffd214000278186453a541049ef153e19174 100644 (file)
@@ -143,7 +143,7 @@ header {
 
 
 nav.primary {
-  .btn-outline-primary {
+  & > .btn-group .btn-outline-primary {
     @include button-outline-variant($green, $color-hover: $white, $active-color: $white);
   }
 
@@ -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..dc13414b70e4eea55e73e51c166ad5c909e3af14 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">
+            <%= button_tag t("site.search.where_am_i"), :type => "button", :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">