Merge remote-tracking branch 'upstream/pull/3363'

This commit is contained in:
Tom Hughes 2021-11-10 18:26:34 +00:00
commit 425818913b
11 changed files with 91 additions and 90 deletions

View file

@ -1108,10 +1108,6 @@ tr.turn:hover {
margin-top: 0 0 0 60px;
font-size: 12px;
}
img.user_thumbnail {
float: left;
margin: 0 $lineheight/2 0 0;
}
}
/* Rules for the user list */
@ -1402,28 +1398,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 {
@ -1589,10 +1569,6 @@ dl.dl-inline {
}
}
.comments .richtext {
margin-left: 70px;
}
/* Rules for the user notes list */
.note_list {

View file

@ -15,9 +15,6 @@ div.leaflet-marker-icon.location-filter.move-marker {
/* Override some conflicting styles.
https://github.com/openstreetmap/openstreetmap-website/pull/121#issuecomment-10206946 */
.leaflet-popup-content img.user_thumbnail {
max-width: 50px !important;
}
.user_popup p {
margin: 0 !important;

View file

@ -6,7 +6,7 @@
} %>
<%= tag.div :class => "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'>

View file

@ -1,5 +1,9 @@
<div class="user_popup">
<%= user_thumbnail popup %>
<p><%= t(".#{type}") %></p>
<p><%= link_to popup.display_name, user_path(popup) %></p>
<div class="user_popup row no-gutters mx-1">
<div class="col-auto mx-1">
<%= user_thumbnail popup %>
</div>
<div class="col mx-1">
<p><%= t(".#{type}") %></p>
<p><%= link_to popup.display_name, user_path(popup) %></p>
</div>
</div>

View file

@ -1,19 +1,23 @@
<div class="clearfix diary-comment<%= " text-muted deleted" unless diary_comment.visible? %>">
<%= user_thumbnail diary_comment.user %>
<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}")) %>
<% if current_user and diary_comment.user.id != current_user.id %>
| <%= report_link(t(".report"), diary_comment) %>
<% end %>
</p>
<div class="richtext text-break"><%= diary_comment.body.to_html %></div>
<% if can? :hidecomment, DiaryEntry %>
<span>
<% if diary_comment.visible? %>
<%= link_to t(".hide_link"), hide_diary_comment_path(:display_name => diary_comment.diary_entry.user.display_name, :id => diary_comment.diary_entry.id, :comment => diary_comment.id), :method => :post, :data => { :confirm => t(".confirm") } %>
<% else %>
<%= link_to t(".unhide_link"), unhide_diary_comment_path(:display_name => diary_comment.diary_entry.user.display_name, :id => diary_comment.diary_entry.id, :comment => diary_comment.id), :method => :post, :data => { :confirm => t(".confirm") } %>
<div class="row diary-comment<%= " text-muted deleted" unless diary_comment.visible? %>">
<div class="col-auto">
<%= 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}")) %>
<% if current_user and diary_comment.user.id != current_user.id %>
| <%= report_link(t(".report"), diary_comment) %>
<% end %>
</span>
<% end %>
</p>
<div class="richtext text-break"><%= diary_comment.body.to_html %></div>
<% if can? :hidecomment, DiaryEntry %>
<span>
<% if diary_comment.visible? %>
<%= link_to t(".hide_link"), hide_diary_comment_path(:display_name => diary_comment.diary_entry.user.display_name, :id => diary_comment.diary_entry.id, :comment => diary_comment.id), :method => :post, :data => { :confirm => t(".confirm") } %>
<% else %>
<%= link_to t(".unhide_link"), unhide_diary_comment_path(:display_name => diary_comment.diary_entry.user.display_name, :id => diary_comment.diary_entry.id, :comment => diary_comment.id), :method => :post, :data => { :confirm => t(".confirm") } %>
<% end %>
</span>
<% end %>
</div>
</div>

View file

@ -1,11 +1,18 @@
<div class='diary_post<%= " text-muted px-3 deleted" unless diary_entry.visible %> user_<%= diary_entry.user.id %>'>
<div class='post_heading clearfix'>
<% if !@user %>
<%= user_thumbnail diary_entry.user %>
<div class='post_heading'>
<% if @user %>
<h2><%= link_to diary_entry.title, diary_entry_path(diary_entry.user, diary_entry) %></h2>
<% else %>
<div class="row">
<div class="col-auto">
<%= user_thumbnail diary_entry.user %>
</div>
<div class="col">
<h2><%= link_to diary_entry.title, diary_entry_path(diary_entry.user, diary_entry) %></h2>
</div>
</div>
<% end %>
<h2><%= link_to diary_entry.title, diary_entry_path(diary_entry.user, diary_entry) %></h2>
<small class='text-muted'>
<%= t(".posted_by_html", :link_user => (link_to diary_entry.user.display_name, user_path(diary_entry.user)), :created => l(diary_entry.created_at, :format => :blog), :language_link => (link_to diary_entry.language.name, :controller => "diary_entries", :action => "index", :display_name => nil, :language => diary_entry.language_code)) %>
<% if (l(diary_entry.updated_at, :format => :blog) != l(diary_entry.created_at, :format => :blog)) %>

View file

@ -1,26 +1,31 @@
<% content_for :head, tag.meta(:name => :robots, :content => :noindex) %>
<% content_for :heading do %>
<div <% if @user %> id="userinformation"<% end %>>
<div <% if @user %> id="userinformation"<% end %> class="row">
<% if @user %>
<%= user_image @user %>
<div class="col-auto">
<%= user_image @user %>
</div>
<% end %>
<h1><%= @title %></h1>
<nav class="secondary-actions">
<ul class="clearfix">
<% unless params[:friends] or params[:nearby] -%>
<li><%= rss_link_to :action => "rss", :language => params[:language] %></li>
<% end -%>
<div class="col">
<h1><%= @title %></h1>
<% if @user && @user == current_user || !@user && current_user %>
<li><%= link_to image_tag("new.png", :class => "small_icon") + t(".new"), new_diary_entry_path, :title => t(".new_title") %></li>
<% end %>
<nav class="secondary-actions">
<ul class="clearfix">
<% unless params[:friends] or params[:nearby] -%>
<li><%= rss_link_to :action => "rss", :language => params[:language] %></li>
<% end -%>
<% if !@user && current_user %>
<li><%= link_to t(".my_diary"), :controller => "diary_entries", :action => "index", :display_name => current_user.display_name %></li>
<% end %>
</ul>
</nav>
<% if @user && @user == current_user || !@user && current_user %>
<li><%= link_to image_tag("new.png", :class => "small_icon") + t(".new"), new_diary_entry_path, :title => t(".new_title") %></li>
<% end %>
<% if !@user && current_user %>
<li><%= link_to t(".my_diary"), :controller => "diary_entries", :action => "index", :display_name => current_user.display_name %></li>
<% end %>
</ul>
</nav>
</div>
</div>
<% end %>

View file

@ -1,8 +1,12 @@
<% content_for :heading do %>
<div id="userinformation">
<%= user_image @entry.user %>
<h2><%= link_to t(".user_title", :user => @entry.user.display_name), :action => :index %></h2>
<p><%= rss_link_to :action => :rss, :display_name => @entry.user.display_name %></p>
<div id="userinformation" class="row">
<div class="col-sm-auto">
<%= user_image @entry.user %>
</div>
<div class="col">
<h2><%= link_to t(".user_title", :user => @entry.user.display_name), :action => :index %></h2>
<p><%= rss_link_to :action => :rss, :display_name => @entry.user.display_name %></p>
</div>
</div>
<% end %>

View file

@ -1,14 +1,16 @@
<div>
<% comments.each do |comment| %>
<div class="comment">
<div class="float-left">
<div class="row">
<div class="col-auto">
<%= link_to user_thumbnail(comment.user), user_path(comment.user) %>
</div>
<p class="text-muted mb-0">
<%= t ".comment_from_html", :user_link => link_to(comment.user.display_name, user_path(comment.user)),
:comment_created_at => l(comment.created_at.to_datetime, :format => :friendly) %>
</p>
<p><%= comment.body %></p>
<div class="col">
<p class="text-muted mb-0">
<%= t ".comment_from_html", :user_link => link_to(comment.user.display_name, user_path(comment.user)),
:comment_created_at => l(comment.created_at.to_datetime, :format => :friendly) %>
</p>
<p><%= comment.body %></p>
</div>
</div>
<hr>
<% end %>

View file

@ -1,14 +1,16 @@
<% reports.each do |report| %>
<div class="report">
<div class="float-left">
<div class="row">
<div class="col-auto">
<%= link_to user_thumbnail(report.user), user_path(report.user) %>
</div>
<p class="text-muted mb-0">
<%= t ".reported_by_html", :category => report.category,
:user => link_to(report.user.display_name, user_path(report.user)),
:updated_at => l(report.updated_at.to_datetime, :format => :friendly) %>
</p>
<p><%= report.details %></p>
<div class="col">
<p class="text-muted mb-0">
<%= t ".reported_by_html", :category => report.category,
:user => link_to(report.user.display_name, user_path(report.user)),
:updated_at => l(report.updated_at.to_datetime, :format => :friendly) %>
</p>
<p><%= report.details %></p>
</div>
</div>
<hr>
<% end %>

View 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>