From: Tom Hughes Date: Wed, 10 Apr 2024 17:05:40 +0000 (+0100) Subject: Merge remote-tracking branch 'upstream/pull/4674' X-Git-Tag: live~169 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/130dd3a8228f77fcf2f67c766b4aa3527f314b9b?hp=f3ea0e14b09880ec824521029bfd47899f9d093b Merge remote-tracking branch 'upstream/pull/4674' --- diff --git a/app/assets/images/avatar.svg b/app/assets/images/avatar.svg new file mode 100644 index 000000000..46d761b6d --- /dev/null +++ b/app/assets/images/avatar.svg @@ -0,0 +1,6 @@ + + + + diff --git a/app/assets/images/avatars.svg b/app/assets/images/avatars.svg deleted file mode 100644 index 85288b242..000000000 --- a/app/assets/images/avatars.svg +++ /dev/null @@ -1,182 +0,0 @@ - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/helpers/user_helper.rb b/app/helpers/user_helper.rb index cf2d40da5..19bb8e0d6 100644 --- a/app/helpers/user_helper.rb +++ b/app/helpers/user_helper.rb @@ -2,7 +2,7 @@ module UserHelper # User images def user_image(user, options = {}) - options[:class] ||= "user_image border border-secondary-subtle" + options[:class] ||= "user_image border border-secondary-subtle bg-body" options[:alt] ||= "" if user.image_use_gravatar @@ -10,12 +10,12 @@ module UserHelper elsif user.avatar.attached? user_avatar_variant_tag(user, { :resize_to_limit => [100, 100] }, options) else - image_tag "avatar_large.png", options.merge(:width => 100, :height => 100) + image_tag "avatar.svg", options.merge(:width => 100, :height => 100) end end def user_thumbnail(user, options = {}) - options[:class] ||= "user_thumbnail border border-secondary-subtle" + options[:class] ||= "user_thumbnail border border-secondary-subtle bg-body" options[:alt] ||= "" if user.image_use_gravatar @@ -23,12 +23,12 @@ module UserHelper elsif user.avatar.attached? user_avatar_variant_tag(user, { :resize_to_limit => [50, 50] }, options) else - image_tag "avatar_small.png", options.merge(:width => 50, :height => 50) + image_tag "avatar.svg", options.merge(:width => 50, :height => 50) end end def user_thumbnail_tiny(user, options = {}) - options[:class] ||= "user_thumbnail_tiny border border-secondary-subtle" + options[:class] ||= "user_thumbnail_tiny border border-secondary-subtle bg-body" options[:alt] ||= "" if user.image_use_gravatar @@ -36,7 +36,7 @@ module UserHelper elsif user.avatar.attached? user_avatar_variant_tag(user, { :resize_to_limit => [50, 50] }, options) else - image_tag "avatar_small.png", options.merge(:width => 50, :height => 50) + image_tag "avatar.svg", options.merge(:width => 50, :height => 50) end end @@ -46,7 +46,7 @@ module UserHelper elsif user.avatar.attached? polymorphic_url(user_avatar_variant(user, :resize_to_limit => [100, 100]), :host => Settings.server_url) else - image_url("avatar_large.png") + image_url("avatar.svg") end end diff --git a/app/views/layouts/_header.html.erb b/app/views/layouts/_header.html.erb index 6a926d692..13a4aa65e 100644 --- a/app/views/layouts/_header.html.erb +++ b/app/views/layouts/_header.html.erb @@ -82,7 +82,7 @@ <% if current_user && current_user.id %>