fix(seo): shorten the footer and center the related-solutions cards
Every landing page was listed in the footer, so adding keyword clusters made that one column taller than the rest of the footer put together. It now lists six — the head terms and the two biggest specialties — and the rest stay reachable through the "other solutions" block each page already renders. That trade only holds if nothing falls out of the link graph, so the old test asserting "the footer links to every page" is replaced by one that walks the related-page graph from the footer links and fails when any page is not reachable. Physiotherapy was the one page that would have been orphaned; the polyclinic page now links to it. The related-solutions heading said "for your trade", which reads oddly for the clinics it is addressing, and its cards were left-aligned in a centered section. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -29,12 +29,33 @@ final class LandingRegistry
|
||||
/** @var array<string, LandingPage>|null ساخت تنبل؛ هر درخواست حداکثر یک بار میسازدش. */
|
||||
private ?array $pages = null;
|
||||
|
||||
/**
|
||||
* صفحههایی که در فوتر میآیند.
|
||||
*
|
||||
* فوتر فهرست کامل نیست: با هر خوشهٔ کلیدواژهٔ تازه، ستونِ «راهکارها» بلندتر از
|
||||
* بقیهٔ فوتر میشد و صفحه را زشت میکرد. بقیهٔ صفحهها از بخش «راهکارهای دیگر»
|
||||
* همین صفحهها و از sitemap در دسترساند — {@see LandingPageTest} تضمین میکند
|
||||
* هیچکدام از این فهرست جا نمانند.
|
||||
*
|
||||
* @var list<string>
|
||||
*/
|
||||
private const FEATURED = [self::CLINIC, self::OFFICE, self::BOOKING, self::DENTAL, self::BEAUTY, self::FREE];
|
||||
|
||||
/** @return array<string, LandingPage> کلید = اسلاگ */
|
||||
public function all(): array
|
||||
{
|
||||
return $this->pages ??= $this->build();
|
||||
}
|
||||
|
||||
/** @return list<LandingPage> صفحههای فوتر، به همان ترتیبِ تعریفشده */
|
||||
public function featured(): array
|
||||
{
|
||||
return array_values(array_filter(array_map(
|
||||
fn (string $slug): ?LandingPage => $this->find($slug),
|
||||
self::FEATURED,
|
||||
)));
|
||||
}
|
||||
|
||||
public function find(string $slug): ?LandingPage
|
||||
{
|
||||
return $this->all()[$slug] ?? null;
|
||||
@@ -134,7 +155,7 @@ final class LandingRegistry
|
||||
['q' => 'تداخل اتاق و دستگاه چطور کنترل میشود؟', 'a' => 'با تعریف منبع. نوبت علاوه بر وقت پزشک، وقت منبع را هم اشغال میکند.'],
|
||||
['q' => 'گزارش مالی تفکیکشده دارد؟', 'a' => 'بله، فهرست پرداختها با وضعیت تسویه و خلاصهٔ مجموع، پرداختشده و تسویهنشده.'],
|
||||
],
|
||||
related: [self::CLINIC, self::ACCOUNTING, self::DENTAL],
|
||||
related: [self::CLINIC, self::ACCOUNTING, self::PHYSIOTHERAPY],
|
||||
),
|
||||
new LandingPage(
|
||||
slug: self::FREE,
|
||||
|
||||
Reference in New Issue
Block a user