// xf2 Santa Cap ===================================================================================
.fox-santaCapAvatar(@capNum: false; @userId: false) {
@fox-santaCapPath: "/styles/xfi/santaCap";
.message-avatar-wrapper {
.avatar {
& when not (@userId = false) and (@userId > 0) {
&[data-user-id="@{userId}"]:before {
& when not (@capNum = false) and (@capNum <= 5) {
background: transparent url('@{fox-santaCapPath}/santa_cap_@{capNum}.png') no-repeat;
}
}
content: "";
display: block;
position: absolute;
z-index: 99;
& when (@capNum >= 1) and (@capNum <= 2) {
right: -15px;
top: -19px;
height: 50px;
width: 44px;
}
& when (@capNum >= 3) and (@capNum <= 5) {
right: -26px;
top: -7px;
height: 64px;
width: 64px;
}
@media (max-width: @xf-responsiveMedium) {
display: none;
}
}
}
}
}
.fox-santaCapAvatar(3; 1);
message_macros
.Любой уникальный на усмотрение
.Любое на усмотрение
.<div class="message-avatar-wrapper
.$0 message-avatar-wrapper--borderColor{$user.display_style_group_id}
.// xf2 Santa Cap ===================================================================================
.fox-santaCapAvatar(@capNum: false; @groupId: false) {
@fox-santaCapPath: "/styles/xfi/santaCap";
& when not (@groupId = false) and (@groupId > 0) {
.message-avatar-wrapper--groupId@{groupId} {
.avatar {
&:before {
& when not (@capNum = false) and (@capNum <= 5) {
background: transparent url('@{fox-santaCapPath}/santa_cap_@{capNum}.png') no-repeat;
}
content: "";
display: block;
position: absolute;
z-index: 99;
& when (@capNum >= 1) and (@capNum <= 2) {
right: -15px;
top: -19px;
height: 50px;
width: 44px;
}
& when (@capNum >= 3) and (@capNum <= 5) {
right: -26px;
top: -7px;
height: 64px;
width: 64px;
}
@media (max-width: @xf-responsiveMedium) {
display: none;
}
}
}
}
}
}
.fox-santaCapAvatar(3; 1);