]> git.openstreetmap.org Git - rails.git/commitdiff
Merge remote-tracking branch 'upstream/pull/4247'
authorTom Hughes <tom@compton.nu>
Thu, 14 Sep 2023 16:09:31 +0000 (17:09 +0100)
committerTom Hughes <tom@compton.nu>
Thu, 14 Sep 2023 16:09:31 +0000 (17:09 +0100)
app/assets/javascripts/index/directions.js
app/assets/stylesheets/common.scss
app/views/browse/changeset.html.erb
app/views/notes/show.html.erb
app/views/sessions/new.html.erb
app/views/site/export.html.erb

index 7bd0891a34e920956f0e80c3ed12a0f59e4bd9f7..c86c8ad02ccde0813d9ae03c6011505bd6933536 100644 (file)
@@ -268,7 +268,8 @@ OSM.Directions = function (map) {
           I18n.t("javascripts.directions.descend") + ": " + formatHeight(route.descend) + ".");
       }
 
-      var turnByTurnTable = $("<table class='mb-3'>");
+      var turnByTurnTable = $("<table class='table table-sm mb-3'>")
+        .append($("<tbody>"));
       var directionsCloseButton = $("<button type='button' class='btn-close'>")
         .attr("aria-label", I18n.t("javascripts.close"));
 
@@ -304,8 +305,8 @@ OSM.Directions = function (map) {
         }
 
         var row = $("<tr class='turn'/>");
-        row.append("<td><div class='direction i" + direction + "'/></td> ");
-        row.append("<td class='instruction'>" + instruction);
+        row.append("<td class='border-0'><div class='direction i" + direction + "'/></td> ");
+        row.append("<td>" + instruction);
         row.append("<td class='distance'>" + dist);
 
         row.on("click", function () {
index 2cd357845929be2bdff8dfe9947ee3ddfb2ad992..b95d1fcd60202c5072d962d0520a45ac2f3e9106 100644 (file)
@@ -23,7 +23,7 @@ small, aside {
 
 .small_icon {
   vertical-align: middle;
-  margin-right: $lineheight/4;
+  margin-right: $lineheight * 0.25;
 }
 
 [dir=rtl] { /* no-r2 */ text-align: right; }
@@ -102,7 +102,7 @@ header {
 
   > * {
     height: 100%;
-    padding: $lineheight/2;
+    padding: $lineheight * 0.5;
   }
 
   h1, nav.primary {
@@ -698,11 +698,6 @@ div.direction {
 div.direction.i#{$i} { background-position: #{($i)*-20}px 0px; }
 }
 
-td.instruction, td.distance {
-    padding-top: $lineheight/5;
-    padding-bottom: $lineheight/5;
-    border-bottom: 1px solid $grey;
-}
 td.distance {
     color: $darkgrey;
     text-align: right;
@@ -809,15 +804,6 @@ tr.turn:hover {
     }
   }
 
-  .note-comments li, .changeset-comments li {
-    margin: $lineheight/2 0;
-
-    p {
-      margin: 10px 6px 0 6px;
-      line-height: 1.5;
-    }
-  }
-
   .subscribe-buttons input {
     font-size: 90%;
     line-height: 15px;
@@ -891,18 +877,6 @@ tr.turn:hover {
     }
     #minlat { margin-bottom: -1px; }
   }
-
-  .export_bound {
-    margin: $lineheight/4;
-  }
-
-  dl {
-    padding-left: $lineheight/2;
-    dd {
-      margin-left: 0;
-      margin-bottom: 10px;
-    }
-  }
 }
 
 /* Rules for edit pages */
@@ -1002,7 +976,7 @@ tr.turn:hover {
 /* Rules for the user map */
 
 .content_map .leaflet-popup-content {
-  margin: $lineheight/2;
+  margin: $spacer;
   min-height: 50px;
 }
 
@@ -1038,20 +1012,6 @@ tr.turn:hover {
     &:first-child {
       border-top: 1px solid $grey;
     }
-    p {
-      margin-bottom: $lineheight/2;
-    }
-  }
-}
-
-/* Rules for the log in page */
-
-#login_auth_buttons {
-  margin-bottom: 0;
-
-  li {
-    float: left;
-    padding: $lineheight/4 $lineheight/2;
   }
 }
 
@@ -1142,9 +1102,9 @@ nav.secondary-actions {
       flex-basis: auto;
       list-style: none;
       border-left: 1px solid $grey;
-      padding-left: $lineheight/2;
-      margin-right: $lineheight/2;
-      margin-bottom: $lineheight/8;
+      padding-left: $lineheight * 0.5;
+      margin-right: $lineheight * 0.5;
+      margin-bottom: $lineheight * 0.125;
     }
   }
 }
index b5c360a03db4c15fa80cc1db03fd176a40d856c7..9acbd05ae03992fc923f82f03420cf8c7b4ce8d1 100644 (file)
@@ -46,7 +46,9 @@
                     — <span class="action-button" data-comment-id="<%= comment.id %>" data-method="POST" data-url="<%= changeset_comment_hide_url(comment.id) %>"><%= t("javascripts.changesets.show.hide_comment") %></span>
                   <% end %>
                 </small>
-                <%= comment.body.to_html %>
+                <div class="mx-2">
+                  <%= comment.body.to_html %>
+                </div>
               </li>
             <% elsif current_user and current_user.moderator? %>
               <li id="c<%= comment.id %>">
@@ -57,7 +59,9 @@
                         :user => link_to(comment.author.display_name, user_path(comment.author))) %>
                   — <span class="action-button text-muted" data-comment-id="<%= comment.id %>" data-method="POST" data-url="<%= changeset_comment_unhide_url(comment.id) %>"><%= t("javascripts.changesets.show.unhide_comment") %></span>
                  </small>
-                <%= comment.body.to_html %>
+                <div class="mx-2">
+                  <%= comment.body.to_html %>
+                </div>
               </li>
             <% end %>
           <% end %>
index 2378d8c2ec973fcab1bc8ed6ea48c62a56b5e9ea..3bb97b484289396ffeec14167cff936401c52ad0 100644 (file)
@@ -34,7 +34,9 @@
         <% @note_comments.drop(1).each do |comment| %>
           <li id="c<%= comment.id %>">
             <small class='text-muted'><%= note_event(comment.event, comment.created_at, comment.author) %></small>
-            <%= comment.body.to_html %>
+            <div class="mx-2">
+              <%= comment.body.to_html %>
+            </div>
           </li>
         <% end %>
       </ul>
index dea65f768985860104b27651a7ff6bb600702b41..03755730bdd411fd7c3f027041d0855917b46776 100644 (file)
     <div class="mb-3">
       <label class="form-label"><%= t ".with external" %></label>
 
-      <ul class='list-unstyled' id="login_auth_buttons">
-        <li><%= link_to image_tag("openid.png", :alt => t(".auth_providers.openid.title")), "#", :id => "openid_open_url", :title => t(".auth_providers.openid.title") %></li>
-        <% if Settings.key?(:google_auth_id) -%>
-        <li><%= auth_button "google", "google" %></li>
-        <% end -%>
-        <% if Settings.key?(:facebook_auth_id) -%>
-        <li><%= auth_button "facebook", "facebook" %></li>
-        <% end -%>
-        <% if Settings.key?(:microsoft_auth_id) -%>
-        <li><%= auth_button "microsoft", "microsoft" %></li>
-        <% end -%>
-        <% if Settings.key?(:github_auth_id) -%>
-        <li><%= auth_button "github", "github" %></li>
-        <% end -%>
-        <% if Settings.key?(:wikipedia_auth_id) -%>
-        <li><%= auth_button "wikipedia", "wikipedia" %></li>
+      <ul class='list-inline' id="login_auth_buttons">
+        <li class="list-inline-item me-3"><%= link_to image_tag("openid.png", :alt => t(".auth_providers.openid.title")), "#", :id => "openid_open_url", :title => t(".auth_providers.openid.title") %></li>
+        <% %w[google facebook microsoft github wikipedia].each do |provider| %>
+          <% if Settings.key?("#{provider}_auth_id".to_sym) -%>
+            <li class="list-inline-item me-3"><%= auth_button provider, provider %></li>
+          <% end -%>
         <% end -%>
       </ul>
 
index a314cb151416c836a7bfa6e5d79f1c889f6906ce..bb66c665ad147445d2b337c6795997efb3301d40 100644 (file)
@@ -9,8 +9,8 @@
     <div class='export_boxy border border-grey rounded'>
       <%= text_field_tag("maxlat", nil, :size => 10, :autocomplete => "off", :class => "export_bound form-control mx-auto") %>
       <div class="clearfix">
-        <%= text_field_tag("minlon", nil, :size => 10, :autocomplete => "off", :class => "export_bound form-control") %>
-        <%= text_field_tag("maxlon", nil, :size => 10, :autocomplete => "off", :class => "export_bound form-control") %>
+        <%= text_field_tag("minlon", nil, :size => 10, :autocomplete => "off", :class => "export_bound form-control my-2") %>
+        <%= text_field_tag("maxlon", nil, :size => 10, :autocomplete => "off", :class => "export_bound form-control my-2") %>
       </div>
       <%= text_field_tag("minlat", nil, :size => 10, :autocomplete => "off", :class => "export_bound form-control mx-auto") %>
       </div>