Это версия для светлых тонов, с пронумерованными сообщениями в специальной обводке.
Данная версия имеет свои особенности и специфику оформления. 
Информер
Код
<style>
/* Основной блок */
.spa {
position: relative;
padding: 6px 40px 6px 10px; /* ближе аватар и текст */
display: flex;
align-items: center;
background: #fff;
margin-bottom: 3px;
border-radius: 8px;
border: 1px solid #ddd;
--stripe-color: #4b0082;
transition: box-shadow 0.3s ease, transform 0.3s ease;
}
/* Цветная полоска слева */
.spa::before {
content: "";
position: absolute;
left: 0;
top: 0;
width: 5px;
height: 100%;
border-radius: 4px 0 0 4px;
background-color: var(--stripe-color);
transition: box-shadow 0.3s ease, transform 0.3s ease;
z-index: 1;
}
.spa:hover::before {
box-shadow: 0 0 8px var(--stripe-color);
transform: scaleX(1.1);
}
/* Номер сообщения */
.spa-number {
position: absolute;
left: -10px; /* сместил ближе к полоске */
top: 50%;
transform: translateY(-50%);
font-weight: 600;
color: #fff;
background-color: var(--stripe-color);
width: 18px;
height: 18px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 11px;
z-index: 2;
}
/* Левая часть (аватар + текст) */
.informer-left {
display: flex;
align-items: center;
gap: 6px; /* минимальное расстояние */
margin-left: 5px; /* отступ от полоски всего 5px */
}
.infsimg1 {
border-radius: 50%;
width: 34px;
height: 34px;
transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.infsimg1:hover {
transform: scale(1.08);
box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}
.informer-text {
display: flex;
flex-direction: column;
}
.username-link {
font-weight: 600;
font-size: 13px;
color: #4b2c82;
text-decoration: none;
transition: color 0.3s ease;
}
.username-link:hover {
color: #a569bd;
}
.user-role {
font-size: 11px;
color: #777;
margin-top: 1px;
}
/* Репутация справа */
.positive {
position: absolute;
right: 30px;
top: 50%;
transform: translateY(-50%);
display: inline-flex;
align-items: center;
gap: 4px;
padding: 4px 10px;
font-size: 10px;
font-weight: 500;
color: #fff;
border-radius: 12px;
background: linear-gradient(135deg,#4b0082,#7d3c98);
box-shadow: 0 2px 6px rgba(0,0,0,0.2);
transition: transform 0.1s ease, box-shadow 0.1s ease;
cursor: pointer;
}
.positive::before {
content: "⭐";
font-size: 11px;
}
.positive:hover {
transform: translateY(-50%) scale(0.92);
box-shadow: inset 0 2px 4px rgba(0,0,0,0.4);
}
/* Стрелка справа */
.informer-arrow {
position: absolute;
right: 6px;
top: 50%;
transform: translateY(-50%);
font-size: 14px;
color: #9b59b6;
opacity: 0;
text-decoration: none;
display: flex;
align-items: center;
justify-content: center;
width: 20px;
height: 20px;
transition: transform 0.3s ease, opacity 0.3s ease;
}
.spa:hover .informer-arrow {
transform: translateY(-50%) translateX(3px) scale(1.1);
opacity: 1;
}
</style>
<!-- Один элемент информера -->
<div class="spa" style="--stripe-color:#4b0082;">
<div class="spa-number">$NUMBER$</div>
<div class="informer-left">
<img class="infsimg1" src="$AVATAR_URL$" alt="$USERNAME$">
<div class="informer-text">
<a href="$PROFILE_URL$" class="username-link" title="$USERNAME$">$USERNAME$</a>
<span class="user-role">Автор</span>
</div>
</div>
<span class="positive">$REPUTATION$</span>
<a href="$PROFILE_URL$" class="informer-arrow">➜</a>
</div>
CSS
Код
<style>
/* Основной блок */
.spa {
position: relative;
padding: 6px 40px 6px 10px; /* ближе аватар и текст */
display: flex;
align-items: center;
background: #fff;
margin-bottom: 3px;
border-radius: 8px;
border: 1px solid #ddd;
--stripe-color: #4b0082;
transition: box-shadow 0.3s ease, transform 0.3s ease;
}
/* Цветная полоска слева */
.spa::before {
content: "";
position: absolute;
left: 0;
top: 0;
width: 5px;
height: 100%;
border-radius: 4px 0 0 4px;
background-color: var(--stripe-color);
transition: box-shadow 0.3s ease, transform 0.3s ease;
z-index: 1;
}
.spa:hover::before {
box-shadow: 0 0 8px var(--stripe-color);
transform: scaleX(1.1);
}
/* Номер сообщения */
.spa-number {
position: absolute;
left: -10px; /* сместил ближе к полоске */
top: 50%;
transform: translateY(-50%);
font-weight: 600;
color: #fff;
background-color: var(--stripe-color);
width: 18px;
height: 18px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 11px;
z-index: 2;
}
/* Левая часть (аватар + текст) */
.informer-left {
display: flex;
align-items: center;
gap: 6px; /* минимальное расстояние */
margin-left: 5px; /* отступ от полоски всего 5px */
}
.infsimg1 {
border-radius: 50%;
width: 34px;
height: 34px;
transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.infsimg1:hover {
transform: scale(1.08);
box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}
.informer-text {
display: flex;
flex-direction: column;
}
.username-link {
font-weight: 600;
font-size: 13px;
color: #4b2c82;
text-decoration: none;
transition: color 0.3s ease;
}
.username-link:hover {
color: #a569bd;
}
.user-role {
font-size: 11px;
color: #777;
margin-top: 1px;
}
/* Репутация справа */
.positive {
position: absolute;
right: 30px;
top: 50%;
transform: translateY(-50%);
display: inline-flex;
align-items: center;
gap: 4px;
padding: 4px 10px;
font-size: 10px;
font-weight: 500;
color: #fff;
border-radius: 12px;
background: linear-gradient(135deg,#4b0082,#7d3c98);
box-shadow: 0 2px 6px rgba(0,0,0,0.2);
transition: transform 0.1s ease, box-shadow 0.1s ease;
cursor: pointer;
}
.positive::before {
content: "⭐";
font-size: 11px;
}
.positive:hover {
transform: translateY(-50%) scale(0.92);
box-shadow: inset 0 2px 4px rgba(0,0,0,0.4);
}
/* Стрелка справа */
.informer-arrow {
position: absolute;
right: 6px;
top: 50%;
transform: translateY(-50%);
font-size: 14px;
color: #9b59b6;
opacity: 0;
text-decoration: none;
display: flex;
align-items: center;
justify-content: center;
width: 20px;
height: 20px;
transition: transform 0.3s ease, opacity 0.3s ease;
}
.spa:hover .informer-arrow {
transform: translateY(-50%) translateX(3px) scale(1.1);
opacity: 1;
}
</style>
Html
Код
<!-- Один элемент информера -->
<div class="spa" style="--stripe-color:#4b0082;">
<div class="spa-number">$NUMBER$</div>
<div class="informer-left">
<img class="infsimg1" src="$AVATAR_URL$" alt="$USERNAME$">
<div class="informer-text">
<a href="$PROFILE_URL$" class="username-link" title="$USERNAME$">$USERNAME$</a>
<span class="user-role">Автор</span>
</div>
</div>
<span class="positive">$REPUTATION$</span>
<a href="$PROFILE_URL$" class="informer-arrow">➜</a>
</div>
Скрипт:
Код
<script>
document.addEventListener("DOMContentLoaded", () => {
// цвета немецкого флага
const colors = ["#000000","#ff0000","#ffcc00"];
const blocks = document.querySelectorAll('.spa');
blocks.forEach((block, index) => {
block.style.setProperty('--stripe-color', colors[index % colors.length]);
});
});
</script>
Повторяю
Скрипт необходимо вставлять в конце шаблона главной страницы форума, перед закрывающим тегом . Это важно, чтобы все эффекты работали корректно. Не стоит помещать скрипт внутрь информера, так как движок форума может его блокировать, и браузер просто не сможет его обработать. 