- Сообщения
- 132
- Реакции
- 109


Замена HTML -
HTML:
<div class="offtopic-container" data-offtopic="true">
<div class="offtopic-header">
<div class="offtopic-icon">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12 2L22 20H2L12 2Z" stroke="currentColor" stroke-width="2" stroke-linejoin="round"/>
<path d="M12 9V13" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
<circle cx="12" cy="17" r="1" fill="currentColor"/>
</svg>
</div>
<span class="offtopic-label">Оффтоп</span>
<div class="offtopic-toggle">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M7 10L12 15L17 10H7Z" fill="currentColor"/>
</svg>
</div>
</div>
<div class="offtopic-content">
<div class="offtopic-inner">
{text}
</div>
</div>
</div>
CSS:
.offtopic-container {
margin: 16px 0;
border-radius: 8px;
background: linear-gradient(135deg, #1a1a1a 0%, #2d1b1b 50%, #1a1a1a 100%);
border: 1px solid #dc2626;
box-shadow: 0 4px 20px rgba(220, 38, 38, 0.15);
overflow: hidden;
position: relative;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.offtopic-container::before {
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: linear-gradient(135deg, rgba(220, 38, 38, 0.05) 0%, rgba(0, 0, 0, 0.1) 100%);
pointer-events: none;
}
.offtopic-container::after {
content: "";
position: absolute;
top: 0;
left: 0;
width: 4px;
height: 100%;
background: linear-gradient(180deg, #dc2626 0%, #991b1b 100%);
opacity: 0.8;
}
.offtopic-container:hover {
transform: translateY(-1px);
box-shadow: 0 8px 25px rgba(220, 38, 38, 0.25);
border-color: #ef4444;
}
.offtopic-header {
display: flex;
align-items: center;
padding: 12px 16px;
background: rgba(0, 0, 0, 0.4);
backdrop-filter: blur(10px);
border-bottom: 1px solid rgba(220, 38, 38, 0.3);
cursor: pointer;
user-select: none;
transition: background-color 0.2s ease;
}
.offtopic-header:hover {
background: rgba(0, 0, 0, 0.6);
}
.offtopic-icon {
display: flex;
align-items: center;
justify-content: center;
width: 32px;
height: 32px;
background: rgba(220, 38, 38, 0.2);
border: 1px solid rgba(220, 38, 38, 0.4);
border-radius: 6px;
color: #fca5a5;
margin-right: 12px;
transition: all 0.2s ease;
}
.offtopic-container:hover .offtopic-icon {
animation: pulse-warning 0.5s ease-in-out;
background: rgba(220, 38, 38, 0.3);
color: #fecaca;
}
@keyframes pulse-warning {
0%,
100% {
transform: scale(1);
}
50% {
transform: scale(1.1);
}
}
.offtopic-label {
font-weight: 600;
font-size: 14px;
color: #e5e7eb;
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
flex: 1;
letter-spacing: 0.5px;
text-transform: uppercase;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.offtopic-toggle {
color: #d1d5db;
transition: transform 0.3s ease;
opacity: 0.8;
}
.offtopic-container.collapsed .offtopic-toggle {
transform: rotate(-90deg);
}
.offtopic-content {
background: rgba(17, 24, 39, 0.95);
backdrop-filter: blur(10px);
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
overflow: hidden;
}
.offtopic-container.collapsed .offtopic-content {
max-height: 0;
padding: 0;
}
.offtopic-inner {
padding: 20px;
color: #f3f4f6;
line-height: 1.6;
position: relative;
}
.offtopic-inner::before {
content: "";
position: absolute;
top: 0;
left: 20px;
right: 20px;
height: 1px;
background: linear-gradient(90deg, transparent 0%, rgba(220, 38, 38, 0.4) 50%, transparent 100%);
}
@media (max-width: 768px) {
.offtopic-container {
margin: 12px 0;
border-radius: 6px;
}
.offtopic-header {
padding: 10px 12px;
}
.offtopic-inner {
padding: 16px;
}
.offtopic-label {
font-size: 13px;
}
}
@keyframes slideDown {
from {
opacity: 0;
transform: translateY(-10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.offtopic-content:not(.collapsed) .offtopic-inner {
animation: slideDown 0.3s ease-out;
}
.offtopic-container.new {
animation: pulse-red 2s infinite;
}
@keyframes pulse-red {
0% {
box-shadow: 0 4px 20px rgba(220, 38, 38, 0.15);
}
50% {
box-shadow: 0 4px 20px rgba(220, 38, 38, 0.35);
}
100% {
box-shadow: 0 4px 20px rgba(220, 38, 38, 0.15);
}
}