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

This commit is contained in:
Tom Hughes 2024-04-07 12:41:54 +01:00
commit b0c17047a1
14 changed files with 22 additions and 28 deletions

View file

@ -66,12 +66,6 @@ time[title] {
color: $blue;
}
/* Rules for borders */
/* These add additional colours to those provided by bootstrap */
.border-grey {
border-color: $grey !important;
}
/* Rules for the header */
#menu-icon {

View file

@ -2,7 +2,7 @@ module UserHelper
# User images
def user_image(user, options = {})
options[:class] ||= "user_image border border-grey"
options[:class] ||= "user_image border border-secondary-subtle"
options[:alt] ||= ""
if user.image_use_gravatar
@ -15,7 +15,7 @@ module UserHelper
end
def user_thumbnail(user, options = {})
options[:class] ||= "user_thumbnail border border-grey"
options[:class] ||= "user_thumbnail border border-secondary-subtle"
options[:alt] ||= ""
if user.image_use_gravatar
@ -28,7 +28,7 @@ module UserHelper
end
def user_thumbnail_tiny(user, options = {})
options[:class] ||= "user_thumbnail_tiny border border-grey"
options[:class] ||= "user_thumbnail_tiny border border-secondary-subtle"
options[:alt] ||= ""
if user.image_use_gravatar

View file

@ -1,4 +1,4 @@
<tr>
<th class='py-1 border-grey table-light fw-normal' dir='auto'><%= format_key(tag[0]) %></th>
<td class='py-1 border-grey border-start' dir='auto'><%= format_value(tag[0], tag[1]) %></td>
<th class='py-1 border-secondary-subtle table-light fw-normal' dir='auto'><%= format_key(tag[0]) %></th>
<td class='py-1 border-secondary-subtle border-start' dir='auto'><%= format_value(tag[0], tag[1]) %></td>
</tr>

View file

@ -1,6 +1,6 @@
<% unless tag_details.empty? %>
<h4><%= t ".tags" %></h4>
<div class='mb-3 border border-grey rounded overflow-hidden'>
<div class='mb-3 border border-secondary-subtle rounded overflow-hidden'>
<table class='mb-0 browse-tag-list table align-middle text-break'>
<%= render :partial => "browse/tag", :collection => tag_details.sort %>
</table>

View file

@ -6,7 +6,7 @@
<% if current_user and @user.id == current_user.id %>
<div class="col-md order-md-last">
<% if !@user.home_location? %>
<div id="map" class="content_map border border-grey">
<div id="map" class="content_map border border-secondary-subtle">
<p class="m-3"><%= t(".no_home_location_html", :edit_profile_link => link_to(t(".edit_your_profile"), edit_profile_path)) %></p>
</div>
<% else %>
@ -19,7 +19,7 @@
:icon => image_path("marker-red.png"),
:description => render(:partial => "popup", :object => current_user, :locals => { :type => "your location" })
} %>
<%= tag.div "", :id => "map", :class => "content_map border border-grey rounded", :data => { :user => user_data } %>
<%= tag.div "", :id => "map", :class => "content_map border border-secondary-subtle rounded", :data => { :user => user_data } %>
<% end %>
<% friends = @user.friends %>

View file

@ -1,4 +1,4 @@
<article class='diary_post border-top border-grey py-3<%= " text-muted px-3 bg-danger bg-opacity-10" unless diary_entry.visible %> user_<%= diary_entry.user.id %>'>
<article class='diary_post border-top border-secondary-subtle py-3<%= " text-muted px-3 bg-danger bg-opacity-10" unless diary_entry.visible %> user_<%= diary_entry.user.id %>'>
<%= render :partial => "diary_entry_heading", :object => diary_entry, :as => "diary_entry" %>
<div class="richtext text-break" xml:lang="<%= diary_entry.language_code %>" lang="<%= diary_entry.language_code %>">

View file

@ -5,7 +5,7 @@
<fieldset>
<legend><%= t ".location" -%></legend>
<%= tag.div "", :id => "map", :class => "border border-grey rounded mb-3", :data => { :lat => @lat, :lon => @lon, :zoom => @zoom } %>
<%= tag.div "", :id => "map", :class => "border border-secondary-subtle rounded mb-3", :data => { :lat => @lat, :lon => @lon, :zoom => @zoom } %>
<div class="row mb-3">
<%= f.text_field :latitude, :wrapper_class => "col-sm-4 d-flex flex-column", :class => "mt-auto", :id => "latitude" %>

View file

@ -13,7 +13,7 @@
<%= render @entry %>
<div id="comments" class="comments mb-3 overflow-hidden">
<div class="row border-bottom border-grey">
<div class="row border-bottom border-secondary-subtle">
<h2 class="col"><%= t(".discussion") %></h2>
<% if current_user %>

View file

@ -81,7 +81,7 @@
</ul>
<% if current_user && current_user.id %>
<div class='d-inline-flex dropdown user-menu logged-in'>
<button class='dropdown-toggle btn btn-outline-secondary border-grey bg-white text-secondary px-2 py-1 flex-grow-1' type='button' data-bs-toggle='dropdown'>
<button class='dropdown-toggle btn btn-outline-secondary border-secondary-subtle bg-white text-secondary px-2 py-1 flex-grow-1' type='button' data-bs-toggle='dropdown'>
<%= user_thumbnail_tiny(current_user, :width => 25, :height => 25, :class => "user_thumbnail_tiny rounded-1") %>
<%= render :partial => "layouts/inbox" %>
<span class="user-button">

View file

@ -2,7 +2,7 @@
<h1><%= @message.title %></h1>
<% end %>
<div class='mb-3 border-bottom border-grey py-1 d-flex gap-1 flex-wrap'>
<div class='mb-3 border-bottom border-secondary-subtle py-1 d-flex gap-1 flex-wrap'>
<% if current_user == @message.recipient %>
<%= user_thumbnail_tiny @message.sender %>
<%= link_to @message.sender.display_name, @message.sender %>

View file

@ -56,7 +56,7 @@
<input class="form-check-input" type="checkbox" name="updatehome" value="1" <% unless current_user.home_location? %> checked <% end %> id="updatehome" />
<label class="form-check-label" for="updatehome"><%= t ".update home location on click" %></label>
</div>
<%= tag.div "", :id => "map", :class => "content_map set_location border border-grey rounded" %>
<%= tag.div "", :id => "map", :class => "content_map set_location border border-secondary-subtle rounded" %>
</fieldset>
<%= f.primary t(".save") %>

View file

@ -6,7 +6,7 @@
<%= hidden_field_tag "format", "osm", :autocomplete => "off" %>
<div class='export_area_inputs'>
<div class='export_boxy border border-grey rounded'>
<div class='export_boxy border border-secondary-subtle 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 my-2") %>

View file

@ -30,7 +30,7 @@
<% end %>
</div>
<div id="contributorTerms" class="legale border border-grey rounded">
<div id="contributorTerms" class="legale border border-secondary-subtle rounded">
<%= render :partial => "terms" %>
</div>

View file

@ -8,12 +8,12 @@ class UserHelperTest < ActionView::TestCase
gravatar_user = create(:user, :image_use_gravatar => true)
image = user_image(user)
assert_match %r{^<img class="user_image border border-grey" .* src="/images/avatar_large.png" />$}, image
assert_match %r{^<img class="user_image border border-secondary-subtle" .* src="/images/avatar_large.png" />$}, image
image = user_image(user, :class => "foo")
assert_match %r{^<img class="foo" .* src="/images/avatar_large.png" />$}, image
image = user_image(gravatar_user)
assert_match %r{^<img class="user_image border border-grey" .* src="http://www.gravatar.com/avatar/.*" />$}, image
assert_match %r{^<img class="user_image border border-secondary-subtle" .* src="http://www.gravatar.com/avatar/.*" />$}, image
image = user_image(gravatar_user, :class => "foo")
assert_match %r{^<img class="foo" .* src="http://www.gravatar.com/avatar/.*" />$}, image
@ -24,13 +24,13 @@ class UserHelperTest < ActionView::TestCase
gravatar_user = create(:user, :image_use_gravatar => true)
image = user_thumbnail(user)
assert_match %r{^<img class="user_thumbnail border border-grey" .* src="/images/avatar_small.png" />$}, image
assert_match %r{^<img class="user_thumbnail border border-secondary-subtle" .* src="/images/avatar_small.png" />$}, image
image = user_thumbnail(user, :class => "foo")
assert_match %r{^<img class="foo" .* src="/images/avatar_small.png" />$}, image
image = user_thumbnail(gravatar_user)
assert_match %r{^<img class="user_thumbnail border border-grey" .* src="http://www.gravatar.com/avatar/.*" />$}, image
assert_match %r{^<img class="user_thumbnail border border-secondary-subtle" .* src="http://www.gravatar.com/avatar/.*" />$}, image
image = user_thumbnail(gravatar_user, :class => "foo")
assert_match %r{^<img class="foo" .* src="http://www.gravatar.com/avatar/.*" />$}, image
@ -41,13 +41,13 @@ class UserHelperTest < ActionView::TestCase
gravatar_user = create(:user, :image_use_gravatar => true)
image = user_thumbnail_tiny(user)
assert_match %r{^<img class="user_thumbnail_tiny border border-grey" .* src="/images/avatar_small.png" />$}, image
assert_match %r{^<img class="user_thumbnail_tiny border border-secondary-subtle" .* src="/images/avatar_small.png" />$}, image
image = user_thumbnail_tiny(user, :class => "foo")
assert_match %r{^<img class="foo" .* src="/images/avatar_small.png" />$}, image
image = user_thumbnail_tiny(gravatar_user)
assert_match %r{^<img class="user_thumbnail_tiny border border-grey" .* src="http://www.gravatar.com/avatar/.*" />$}, image
assert_match %r{^<img class="user_thumbnail_tiny border border-secondary-subtle" .* src="http://www.gravatar.com/avatar/.*" />$}, image
image = user_thumbnail_tiny(gravatar_user, :class => "foo")
assert_match %r{^<img class="foo" .* src="http://www.gravatar.com/avatar/.*" />$}, image