Колпак Санты на аватар

Колпак Санты на аватар 2.2.0

Нет прав для скачивания
Определённому пользователю.
Less:
// 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}.

Less:
// 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);
Назад
Сверху Снизу