background and avatar in postbit

leanndamiann1

Well-known member
Registered
Joined
Apr 22, 2021
Messages
190
Points
28

Reputation:

How about it is possible that in the postbit you can see the cover image in the background and in the middle the avatar like this image ??? thank you

Captura de pantalla 2023-08-06 144355.jpg
 

shqawe

Well-known member
Registered
Joined
Jun 30, 2019
Messages
63
Points
28

Reputation:

You can add any image as background for .message-user class for example i add the image you provide as background by using below code:

CSS:
.message-user {
    background: url(https://enxf.net/attachments/captura-de-pantalla-2023-08-06-144355-jpg.36274/);
    background-size: cover;
}
 

DareSec

Inforc3r
Staff member
Administrator
Moderator
S.V.I.P Member
Collaborate
Registered
Joined
May 25, 2019
Messages
1,381
Points
523

Reputation:

leanndamiann1

Well-known member
Registered
Joined
Apr 22, 2021
Messages
190
Points
28

Reputation:

shqawe

Well-known member
Registered
Joined
Jun 30, 2019
Messages
63
Points
28

Reputation:

Can't be done automated and not manually? Example: when they upload a cover image, let that be the image

thanks
leanndamiann1It's easy to do that:

Find in post_macros template this code and be sure it's inside full_body extension:

HTML:
<div class="message-cell message-cell--user"

Replace it with:

HTML:
<div class="message-cell message-cell--user" style="background: url({{$post.User.Profile.getBannerUrl('l')}}); background-size: cover;"
 
Top