feat: улучшения блога - убрана нумерация с H3 подзаголовков, эмодзи в статьях без дублирования в оглавлении

This commit is contained in:
Web-serfer 2026-05-11 23:43:52 +05:00
parent 0f7a83c9e9
commit 9ad9fe4927
5 changed files with 667 additions and 8 deletions

View file

@ -63,9 +63,10 @@ const { items } = Astro.props;
gap: 0.25rem;
}
/* Поддержка level=1 (из HTML h2) и level=2/3 */
/* Номера только для H2 (level-1/2), H3 без номеров */
.toc-item.level-1, .toc-item.level-2 { counter-reset: toc-h3; counter-increment: toc-h2; }
.toc-item.level-3 { counter-increment: toc-h3; padding-left: 1.25rem; }
.toc-item.level-3 { padding-left: 1.25rem; counter-increment: toc-h3; }
.toc-item.level-3 .toc-link::before { content: none; }
/* h2 = level 1 в HTML */
.toc-item.level-1, .toc-item.level-2 {
@ -98,7 +99,7 @@ const { items } = Astro.props;
text-align: center;
}
.toc-item.level-1 .toc-link::before, .toc-item.level-2 .toc-link::before { content: counter(toc-h2) "."; }
.toc-item.level-3 .toc-link::before { content: counter(toc-h2) "." counter(toc-h3) "."; font-size: 0.85em; opacity: 0.7; }
/* H3 без номеров */
.toc-link:hover { color: #1e3050; background: #f1f5f9; }