Project

General

Profile

Feature #29824 » 0002-WIP.patch

Marius BĂLTEANU, 2025-04-25 00:04

View differences:

app/assets/stylesheets/application.css
border-radius: 20%;
}
div.issue img.gravatar {
div.issue img.gravatar, div.issue .avatar {
float: left;
margin: 0 12px 6px 0;
}
......
position: relative;
}
div.gravatar-with-child > img.gravatar:nth-child(2) {
div.gravatar-with-child > img.gravatar:nth-child(2), div.gravatar-with-child > .avatar:nth-child(2) {
position: absolute;
top: 30px;
left: 30px;
......
#activity dt img.gravatar {margin: 0 1em 0 0;}
/* Used on 12px Gravatar img tags without the icon background */
.icon-gravatar {float: left; margin-right: 4px;}
.avatar {
border-radius: 20%;
display: inline-flex;
flex-shrink: 0;
overflow: hidden;
}
.avatar span[role="img"] {
align-items: center;
block-size: 100%;
border-radius: 20%;
display: flex;
font-size: calc(24px * .6);
color: #fff;
inline-size: 100%;
justify-content: center;
user-select: none;
}
.avatar.s16 {
block-size: 16px;
inline-size: 16px;
}
.avatar.s16 span[role="img"] {
font-size: calc(16px * .6);
}
.avatar.s22 {
block-size: 22px;
inline-size: 22px;
}
.avatar.s22 span[role="img"] {
font-size: calc(22px * .5);
}
.avatar.s24 {
block-size: 24px;
inline-size: 24px;
}
.avatar.s24 span[role="img"] {
font-size: calc(24px * .6);
}
.avatar.s50 {
block-size: 50px;
inline-size: 50px;
}
.avatar.s50 span[role="img"] {
font-size: calc(50px * .6);
}
.avatar-color-0 {
background-color: #880000;
}
.avatar-color-1 {
background-color: #ff0000;
}
.avatar-color-2 {
background-color: #00ff00;
}
.avatar-color-3 {
background-color: #008800;
}
.avatar-color-4 {
background-color: #0000ff;
}
.avatar-color-5 {
background-color: #000088;
}
.avatar-color-6 {
background-color: #ff8800;
}
.avatar-color-7 {
background-color: #ff0088;
}
#activity dt, .journal {clear: left;}
app/helpers/avatars_helper.rb
nil
end
else
if user.respond_to?(:initials)
size = options.delete(:size) || GravatarHelper::DEFAULT_OPTIONS[:size]
span = content_tag('span', user.initials, role: 'img', class: "avatar-color-#{user.id % 8}")
content_tag('div', span, class: "avatar s#{size}")
else
''
end
end
end
(4-4/7)