# 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
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
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
<% 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-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") %>
+ <%= user_thumbnail_tiny(current_user, :width => 25, :height => 25, :class => "user_thumbnail_tiny rounded-1 bg-body") %>
<%= render :partial => "layouts/inbox" %>
<span class="user-button">
<span class='username'>
gravatar_user = create(:user, :image_use_gravatar => true)
image = user_image(user)
- assert_match %r{^<img class="user_image border border-secondary-subtle" .* src="/images/avatar.svg" />$}, image
+ assert_match %r{^<img class="user_image border border-secondary-subtle bg-body" .* src="/images/avatar.svg" />$}, image
image = user_image(user, :class => "foo")
assert_match %r{^<img class="foo" .* src="/images/avatar.svg" />$}, image
image = user_image(gravatar_user)
- assert_match %r{^<img class="user_image border border-secondary-subtle" .* src="http://www.gravatar.com/avatar/.*" />$}, image
+ assert_match %r{^<img class="user_image border border-secondary-subtle bg-body" .* 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
gravatar_user = create(:user, :image_use_gravatar => true)
image = user_thumbnail(user)
- assert_match %r{^<img class="user_thumbnail border border-secondary-subtle" .* src="/images/avatar.svg" />$}, image
+ assert_match %r{^<img class="user_thumbnail border border-secondary-subtle bg-body" .* src="/images/avatar.svg" />$}, image
image = user_thumbnail(user, :class => "foo")
assert_match %r{^<img class="foo" .* src="/images/avatar.svg" />$}, image
image = user_thumbnail(gravatar_user)
- assert_match %r{^<img class="user_thumbnail border border-secondary-subtle" .* src="http://www.gravatar.com/avatar/.*" />$}, image
+ assert_match %r{^<img class="user_thumbnail border border-secondary-subtle bg-body" .* 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
gravatar_user = create(:user, :image_use_gravatar => true)
image = user_thumbnail_tiny(user)
- assert_match %r{^<img class="user_thumbnail_tiny border border-secondary-subtle" .* src="/images/avatar.svg" />$}, image
+ assert_match %r{^<img class="user_thumbnail_tiny border border-secondary-subtle bg-body" .* src="/images/avatar.svg" />$}, image
image = user_thumbnail_tiny(user, :class => "foo")
assert_match %r{^<img class="foo" .* src="/images/avatar.svg" />$}, image
image = user_thumbnail_tiny(gravatar_user)
- assert_match %r{^<img class="user_thumbnail_tiny border border-secondary-subtle" .* src="http://www.gravatar.com/avatar/.*" />$}, image
+ assert_match %r{^<img class="user_thumbnail_tiny border border-secondary-subtle bg-body" .* 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