Да ,это продолжение этой темы 
Прошла лёгкая модернизация информера
Постарался сделать его ещё более живым и динамичным.
В общем, смотрим и оцениваем! 
Информер
Код
<style>
/* Общий контейнер */
.spa {
position: relative;
display: flex;
align-items: center;
justify-content: space-between;
margin: 4px 0;
padding: 6px 8px;
border-radius: 8px;
background: #222;
overflow: hidden;
color: #fff;
font-family: Arial, sans-serif;
}
.spa::before {
content: "";
position: absolute;
left: 0; top: 0; bottom: 0;
width: 6px;
background: var(--stripe-color,#4b0082);
transition: width 0.3s ease;
}
.spa:hover::before {
width: 100%;
opacity: 0.15;
}
/* Левая часть */
.informer-left {
display: flex;
align-items: center;
gap: 6px;
margin-left: 5px; /* фикс — аватарка в 5px от края */
}
.infsimg1 {
border-radius: 50%;
box-shadow: 0 0 4px rgba(0,0,0,0.4);
}
.informer-text {
display: flex;
flex-direction: column;
font-size: 12px;
}
.username-link {
color: #fff;
text-decoration: none;
font-weight: bold;
}
.username-link:hover {
text-decoration: underline;
}
.user-role {
font-size: 10px;
color: #aaa;
}
/* Номер слева от текста */
.spa-number {
margin-right: 6px;
font-size: 12px;
font-weight: bold;
color: #bbb;
}
/* Правая часть */
.informer-right {
display: flex;
align-items: center;
gap: 1px; /* стрелка в 1px от рейтинга */
margin-right: 2px; /* рейтинг в 2px от края */
position: relative;
}
/* Репутация */
.positive {
display: inline-flex;
align-items: center;
padding: 4px 8px;
font-size: 11px;
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);
min-width: 30px;
justify-content: center;
cursor: pointer;
transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.positive::before {
content: "⭐";
font-size: 11px;
margin-right: 3px;
}
.positive:hover {
transform: scale(0.92);
box-shadow: inset 0 2px 4px rgba(0,0,0,0.4);
}
/* Стрелка */
.informer-arrow {
font-size: 14px;
color: #9b59b6;
opacity: 0;
text-decoration: none;
display: flex;
align-items: center;
justify-content: center;
width: 18px;
height: 18px;
transition: transform 0.3s ease, opacity 0.3s ease;
}
.spa:hover .informer-arrow {
transform: translateX(3px) scale(1.1);
opacity: 1;
}
</style>
<!-- Пример блока -->
<div class="spa" style="--stripe-color:#4b0082;">
<div class="informer-left">
<img class="infsimg1" src="$AVATAR_URL$" alt="$USERNAME$" width="36" height="36">
<div class="spa-number">$NUMBER$</div>
<div class="informer-text">
<a href="$PROFILE_URL$" class="username-link" title="$USERNAME$">$USERNAME$</a>
<span class="user-role">Автор</span>
</div>
</div>
<div class="informer-right">
<span class="positive">$REPUTATION$</span>
<a href="$PROFILE_URL$" class="informer-arrow">➜</a>
</div>
</div>
Отдельно CSS
Код
<style>
/* Общий контейнер */
.spa {
position: relative;
display: flex;
align-items: center;
justify-content: space-between;
margin: 4px 0;
padding: 6px 8px;
border-radius: 8px;
background: #222;
overflow: hidden;
color: #fff;
font-family: Arial, sans-serif;
}
.spa::before {
content: "";
position: absolute;
left: 0; top: 0; bottom: 0;
width: 6px;
background: var(--stripe-color,#4b0082);
transition: width 0.3s ease;
}
.spa:hover::before {
width: 100%;
opacity: 0.15;
}
/* Левая часть */
.informer-left {
display: flex;
align-items: center;
gap: 6px;
margin-left: 5px; /* фикс — аватарка в 5px от края */
}
.infsimg1 {
border-radius: 50%;
box-shadow: 0 0 4px rgba(0,0,0,0.4);
}
.informer-text {
display: flex;
flex-direction: column;
font-size: 12px;
}
.username-link {
color: #fff;
text-decoration: none;
font-weight: bold;
}
.username-link:hover {
text-decoration: underline;
}
.user-role {
font-size: 10px;
color: #aaa;
}
/* Номер слева от текста */
.spa-number {
margin-right: 6px;
font-size: 12px;
font-weight: bold;
color: #bbb;
}
/* Правая часть */
.informer-right {
display: flex;
align-items: center;
gap: 1px; /* стрелка в 1px от рейтинга */
margin-right: 2px; /* рейтинг в 2px от края */
position: relative;
}
/* Репутация */
.positive {
display: inline-flex;
align-items: center;
padding: 4px 8px;
font-size: 11px;
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);
min-width: 30px;
justify-content: center;
cursor: pointer;
transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.positive::before {
content: "⭐";
font-size: 11px;
margin-right: 3px;
}
.positive:hover {
transform: scale(0.92);
box-shadow: inset 0 2px 4px rgba(0,0,0,0.4);
}
/* Стрелка */
.informer-arrow {
font-size: 14px;
color: #9b59b6;
opacity: 0;
text-decoration: none;
display: flex;
align-items: center;
justify-content: center;
width: 18px;
height: 18px;
transition: transform 0.3s ease, opacity 0.3s ease;
}
.spa:hover .informer-arrow {
transform: translateX(3px) scale(1.1);
opacity: 1;
}
</style>
Html Пример блока
Код
<!-- Пример блока -->
<div class="spa" style="--stripe-color:#4b0082;">
<div class="informer-left">
<img class="infsimg1" src="$AVATAR_URL$" alt="$USERNAME$" width="36" height="36">
<div class="spa-number">$NUMBER$</div>
<div class="informer-text">
<a href="$PROFILE_URL$" class="username-link" title="$USERNAME$">$USERNAME$</a>
<span class="user-role">Автор</span>
</div>
</div>
<div class="informer-right">
<span class="positive">$REPUTATION$</span>
<a href="$PROFILE_URL$" class="informer-arrow">➜</a>
</div>
</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>
Повторяю
Скрипт необходимо вставлять в конце шаблона главной страницы форума, перед закрывающим тегом . Это важно, чтобы все эффекты работали корректно. Не стоит помещать скрипт внутрь информера, так как движок форума может его блокировать, и браузер просто не сможет его обработать. 