Fix missing H1 on list-style pages via SectionHeading template
SectionHeading always rendered its title as <h2>, so every page whose only heading came from a shared section component (services hub, promotions, cases, faq, contact, reviews, blog list) had no <h1> at all. Add a level prop (default h2) and pass headingLevel="h1" from each page where that section is the page's own top-level heading. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013otXCiTZsxdZ4SJKZ9wUky
This commit is contained in:
1 parent
30e1aea20b
commit
f53c8b1ed7
14 files changed
+28
-18
No files matched your search
@@ -8,7 +8,7 @@ function cx(...args) {
|
||||
return args.filter(Boolean).join(' ');
|
||||
}
|
||||
|
||||
export default function Reviews({ reviews, limit, moreHref, showForm = true }) {
|
||||
export default function Reviews({ reviews, limit, moreHref, showForm = true, headingLevel = 'h2' }) {
|
||||
const list = limit ? reviews.slice(0, limit) : reviews;
|
||||
|
||||
// Пустая витрина отзывов на тизере (главная) выглядит слабо - лучше не показывать
|
||||
@@ -23,6 +23,7 @@ export default function Reviews({ reviews, limit, moreHref, showForm = true }) {
|
||||
eyebrow="reviews --approved"
|
||||
title="Отзывы клиентов"
|
||||
desc="Отзывов пока нет - будьте первым, кто расскажет о работе с нами. Публикуется после проверки менеджером."
|
||||
level={headingLevel}
|
||||
/>
|
||||
<Reveal>
|
||||
<ReviewForm />
|
||||
@@ -39,6 +40,7 @@ export default function Reviews({ reviews, limit, moreHref, showForm = true }) {
|
||||
eyebrow="reviews --approved"
|
||||
title="Отзывы клиентов"
|
||||
desc="Публикуются после проверки менеджером - это защищает страницу от спама и фейков."
|
||||
level={headingLevel}
|
||||
/>
|
||||
<div className={cx('grid gap-10', showForm && 'md:grid-cols-2')}>
|
||||
<Reveal>
|
||||
|
||||
Reference in new issue
Block a user