]> git.openstreetmap.org Git - rails.git/commitdiff
Simplify user_image and user_thumbnail css
authorAndy Allan <git@gravitystorm.co.uk>
Wed, 10 Nov 2021 15:30:42 +0000 (15:30 +0000)
committerAndy Allan <git@gravitystorm.co.uk>
Wed, 10 Nov 2021 15:30:42 +0000 (15:30 +0000)
Now that all uses of the images and thumbnails have been migrated
to flex grids, we can remove the margin and padding from the original
css classes and revert to using them.

app/assets/stylesheets/common.scss
app/views/dashboards/_contact.html.erb
app/views/dashboards/_popup.html.erb
app/views/diary_entries/_diary_comment.html.erb
app/views/diary_entries/_diary_entry.html.erb
app/views/diary_entries/index.html.erb
app/views/diary_entries/show.html.erb
app/views/issues/_comments.html.erb
app/views/issues/_reports.html.erb
app/views/users/show.html.erb

index 782094af9cde834f4ff7e36435351175d20783db..bd6e97691cd03c9f6a89f7c7ec5e8ab91e869619 100644 (file)
@@ -1421,28 +1421,12 @@ img.user_image {
   max-width: 100px;
   max-height: 100px;
   border: 1px solid $grey;
-  margin-bottom: $lineheight;
-  float: left;
-  margin-right: $lineheight;
-}
-
-img.user_image_no_margins {
-  max-width: 100px;
-  max-height: 100px;
-  border: 1px solid $grey;
 }
 
 img.user_thumbnail {
   max-width: 50px;
   max-height: 50px;
   border: 1px solid $grey;
-  margin-right: $lineheight;
-}
-
-img.user_thumbnail_no_margins {
-  max-width: 50px;
-  max-height: 50px;
-  border: 1px solid $grey;
 }
 
 img.user_thumbnail_tiny {
index 7614c0c4d5c66ed41079422b3281d524dd1fd231..dd78b1c86812750861ee9b69ad4f08402382cf7f 100644 (file)
@@ -6,7 +6,7 @@
    } %>
 <%= tag.div :class => "contact-activity clearfix row", :data => { :user => user_data } do %>
   <div class="col-auto">
-    <%= user_thumbnail contact, :class => "user_thumbnail_no_margins" %>
+    <%= user_thumbnail contact %>
   </div>
   <div class="col">
     <p class='text-muted mb-0'>
index 8a8a949595287390c1b39252b44f1331ca8ec132..ef86f042d9fbe0575639fbcd48ac34e8ec2dce0e 100644 (file)
@@ -1,6 +1,6 @@
 <div class="user_popup row no-gutters mx-1">
   <div class="col-auto mx-1">
-    <%= user_thumbnail popup, :class => "user_thumbnail_no_margins" %>
+    <%= user_thumbnail popup %>
   </div>
   <div class="col mx-1">
     <p><%= t(".#{type}") %></p>
index 5423e26865a6f34607c567295d6c7be8f5285f3b..403d30742d982a45d1b08ba237621f2a1fa30581 100644 (file)
@@ -1,6 +1,6 @@
 <div class="row diary-comment<%= " text-muted deleted" unless diary_comment.visible? %>">
   <div class="col-auto">
-    <%= user_thumbnail diary_comment.user, :class => "user_thumbnail_no_margins" %>
+    <%= user_thumbnail diary_comment.user %>
   </div>
   <div class="col">
     <p class="text-muted comment-heading" id="comment<%= diary_comment.id %>"><%= t(".comment_from_html", :link_user => (link_to diary_comment.user.display_name, user_path(diary_comment.user)), :comment_created_at => link_to(l(diary_comment.created_at, :format => :friendly), :anchor => "comment#{diary_comment.id}")) %>
index cd577b1fe979ef96a6669bb81eb6bff154c48a70..2b3dad055e572d6b4648909450cafdcfd3831b52 100644 (file)
@@ -5,7 +5,7 @@
     <% else %>
       <div class="row">
         <div class="col-auto">
-          <%= user_thumbnail diary_entry.user, :class => "user_thumbnail_no_margins" %>
+          <%= user_thumbnail diary_entry.user %>
         </div>
         <div class="col">
           <h2><%= link_to diary_entry.title, diary_entry_path(diary_entry.user, diary_entry) %></h2>
index 0dfe95fa388ca3fa128b873eb70d061161167f9e..15a3b0692e7b846d2df00b3c3ba8a7f09f21f8e8 100644 (file)
@@ -3,7 +3,7 @@
   <div <% if @user %> id="userinformation"<% end %> class="row">
     <% if @user %>
         <div class="col-auto">
-          <%= user_image @user, :class => "user_image_no_margins" %>
+          <%= user_image @user %>
         </div>
     <% end %>
 
index e5dcbbdda3f6cfa31175082182e7b7d507321899..23b2dc783dd6ce31ac5299fd5e0a1f5b775e88ec 100644 (file)
@@ -1,7 +1,7 @@
 <% content_for :heading do %>
   <div id="userinformation" class="row">
     <div class="col-sm-auto">
-      <%= user_image @entry.user, :class => "user_image_no_margins" %>
+      <%= user_image @entry.user %>
     </div>
     <div class="col">
       <h2><%= link_to t(".user_title", :user => @entry.user.display_name), :action => :index %></h2>
index 046e80163c98001c4abe03675399eaf7d5aa73f2..e55bf42578fb5200ccf94040f02113b32fd7599c 100644 (file)
@@ -2,7 +2,7 @@
   <% comments.each do |comment| %>
     <div class="row">
       <div class="col-auto">
-        <%= link_to user_thumbnail(comment.user, :class => "user_image_no_margins"), user_path(comment.user) %>
+        <%= link_to user_thumbnail(comment.user), user_path(comment.user) %>
       </div>
       <div class="col">
         <p class="text-muted mb-0">
index 6a00bfe23b7f99f001e083cf2428601470d25b97..b1b690f8c965ec5d93c5113b03498181e3aba2dc 100644 (file)
@@ -1,7 +1,7 @@
 <% reports.each do |report| %>
   <div class="row">
     <div class="col-auto">
-      <%= link_to user_thumbnail(report.user, :class => "user_thumbnail_no_margins"), user_path(report.user) %>
+      <%= link_to user_thumbnail(report.user), user_path(report.user) %>
     </div>
     <div class="col">
       <p class="text-muted mb-0">
index 5aaeabb23b85f99f572005a8221e03fbba95a628..9e078ce74bda7b8bec69be985b2a1b5795d6ac87 100644 (file)
@@ -1,7 +1,7 @@
 <% content_for :heading do %>
   <div id="userinformation" class="row">
     <div class="col-sm-auto">
-      <%= user_image @user, :class => "user_image_no_margins" %>
+      <%= user_image @user %>
     </div>
     <div class="col">
       <h1><%= @user.display_name %> <%= role_icons(@user) %></h1>