#1259: Как украсить базу знаний к новому году?🎄
Отредактирована: 243 дня назадСимптомы
Заходишь в хелпцентр и хочется праздника. Что делать?
Решение
Очень важно поддерживать праздничное настроение даже в мелочах, поэтому, давайте украсим нашу базу знаний!
1. Зайдем в Настройки > Основные настройки > Управление брендами и выберем ваш активный бренд
2. В раздел Стили для темы добавим такой контент в конец, после того, что там уже есть:
.xmas-snowflakes {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
pointer-events: none;
z-index: 100;
}
.xmas-snowflake {
position: absolute;
top: -50px;
color: #87CEEB;
font-size: 1.5em;
opacity: 0.8;
text-shadow: 0 0 5px rgba(135, 206, 235, 0.5);
animation-name: fall;
animation-timing-function: linear;
animation-iteration-count: infinite;
}
.xmas-snowflake:nth-child(1) { left: 10%; animation-duration: 8s; animation-delay: 0s; }
.xmas-snowflake:nth-child(2) { left: 20%; animation-duration: 10s; animation-delay: 1s; }
.xmas-snowflake:nth-child(3) { left: 30%; animation-duration: 12s; animation-delay: 2s; }
.xmas-snowflake:nth-child(4) { left: 40%; animation-duration: 9s; animation-delay: 3s; }
.xmas-snowflake:nth-child(5) { left: 50%; animation-duration: 11s; animation-delay: 4s; }
.xmas-snowflake:nth-child(6) { left: 60%; animation-duration: 8s; animation-delay: 5s; }
.xmas-snowflake:nth-child(7) { left: 70%; animation-duration: 10s; animation-delay: 6s; }
.xmas-snowflake:nth-child(8) { left: 80%; animation-duration: 12s; animation-delay: 7s; }
.xmas-snowflake:nth-child(9) { left: 90%; animation-duration: 9s; animation-delay: 8s; }
.xmas-snowflake:nth-child(10) { left: 15%; animation-duration: 11s; animation-delay: 9s; }
.xmas-snowflake:nth-child(11) { left: 25%; animation-duration: 8s; animation-delay: 10s; }
.xmas-snowflake:nth-child(12) { left: 35%; animation-duration: 10s; animation-delay: 11s; }
.xmas-snowflake:nth-child(13) { left: 45%; animation-duration: 12s; animation-delay: 12s; }
.xmas-snowflake:nth-child(14) { left: 55%; animation-duration: 9s; animation-delay: 13s; }
.xmas-snowflake:nth-child(15) { left: 65%; animation-duration: 11s; animation-delay: 14s; }
@keyframes fall {
0% {
transform: translateY(-100px) rotate(0deg);
opacity: 0;
}
10% {
opacity: 0.8;
}
90% {
opacity: 0.8;
}
100% {
transform: translateY(100vh) rotate(360deg);
opacity: 0;
}
}
.xmas-snowflake:nth-child(odd) {
animation-name: fall-sway;
}
@keyframes fall-sway {
0% {
transform: translateY(-100px) translateX(0px) rotate(0deg);
opacity: 0;
}
10% {
opacity: 0.8;
}
50% {
transform: translateX(50px);
}
90% {
opacity: 0.8;
}
100% {
transform: translateY(100vh) translateX(-50px) rotate(360deg);
opacity: 0;
}
}
.xmas-snowflake::before {
content: "❄";
}
.xmas-snowflake:nth-child(3n)::before {
content: "✦";
font-size: 1.2em;
}
.xmas-snowflake:nth-child(5n)::before {
content: "❅";
font-size: 1.3em;
}
.xmas-garland {
position: fixed;
top: 60px;
left: 0;
width: 100%;
height: 40px;
z-index: 101;
pointer-events: none;
}
.xmas-garland::before {
content: '';
position: absolute;
top: 15px;
left: 0;
width: 100%;
height: 2px;
background: #333;
box-shadow: 0 0 5px rgba(255, 255, 255, 0.2);
}
.xmas-light {
position: absolute;
top: 36px;
width: 20px;
height: 20px;
border-radius: 50%;
animation: blink 1.5s infinite alternate;
box-shadow: 0 0 10px currentColor;
transform: scale(1);
}
.xmas-light:nth-child(1) { left: 5%; animation-delay: 0s; background: #ff0000; color: #ff0000; } /* Red */
.xmas-light:nth-child(2) { left: 15%; animation-delay: 0.2s; background: #00ff00; color: #00ff00; } /* Green */
.xmas-light:nth-child(3) { left: 25%; animation-delay: 0.4s; background: #0000ff; color: #0000ff; } /* Blue */
.xmas-light:nth-child(4) { left: 35%; animation-delay: 0.6s; background: #ffff00; color: #ffff00; } /* Yellow */
.xmas-light:nth-child(5) { left: 45%; animation-delay: 0.8s; background: #ff00ff; color: #ff00ff; } /* Magenta */
.xmas-light:nth-child(6) { left: 55%; animation-delay: 1.0s; background: #00ffff; color: #00ffff; } /* Cyan */
.xmas-light:nth-child(7) { left: 65%; animation-delay: 1.2s; background: #ff8800; color: #ff8800; } /* Orange */
.xmas-light:nth-child(8) { left: 75%; animation-delay: 0.1s; background: #ff0088; color: #ff0088; } /* Pink */
.xmas-light:nth-child(9) { left: 85%; animation-delay: 0.3s; background: #88ff00; color: #88ff00; } /* Lime */
.xmas-light:nth-child(10) { left: 95%; animation-delay: 0.5s; background: #8800ff; color: #8800ff; } /* Purple */
.xmas-light::before {
content: '';
position: absolute;
top: -4px;
left: 50%;
transform: translateX(-50%);
width: 10px;
height: 4px;
background: #666;
border-radius: 2px 2px 0 0;
}
.xmas-light::after {
content: '';
position: absolute;
top: -15px;
left: 50%;
transform: translateX(-50%);
width: 2px;
height: 15px;
background: #555;
}
@keyframes blink {
0%, 100% {
transform: scale(1);
opacity: 0.8;
box-shadow: 0 0 10px currentColor;
}
50% {
transform: scale(1.2);
opacity: 1;
box-shadow: 0 0 20px currentColor, 0 0 30px currentColor;
}
}
3. В раздел Стили публичного портала базы знаний > Шапка вставим перед имеющимся контентом:
<div class="xmas-garland">
<div class="xmas-light"></div>
<div class="xmas-light"></div>
<div class="xmas-light"></div>
<div class="xmas-light"></div>
<div class="xmas-light"></div>
<div class="xmas-light"></div>
<div class="xmas-light"></div>
<div class="xmas-light"></div>
<div class="xmas-light"></div>
<div class="xmas-light"></div>
</div>
4. В раздел Стили публичного портала базы знаний > Подвал вставим после имеющегося контента:
<div class="xmas-snowflakes">
<div class="xmas-snowflake"></div>
<div class="xmas-snowflake"></div>
<div class="xmas-snowflake"></div>
<div class="xmas-snowflake"></div>
<div class="xmas-snowflake"></div>
<div class="xmas-snowflake"></div>
<div class="xmas-snowflake"></div>
<div class="xmas-snowflake"></div>
<div class="xmas-snowflake"></div>
<div class="xmas-snowflake"></div>
<div class="xmas-snowflake"></div>
<div class="xmas-snowflake"></div>
<div class="xmas-snowflake"></div>
<div class="xmas-snowflake"></div>
<div class="xmas-snowflake"></div>
</div>
5. Сохраним изменения