fix(seo): ensure proper H1 heading on shop, wiki, checkout, track, success and dashboard pages
Deploy Canina / deploy (push) Successful in 2m6s

This commit is contained in:
devops committed 2026-10-17 09:42:22 +00:00
1 parent 5534d050af
commit 9149e2b5ab
6 files changed
+31 -35

No files matched your search

+25 -29
View File
@@ -217,8 +217,8 @@ export const ArchiveProductCard: React.FC<{ product: Product }> = ({ product })
</span>
) : allowCart ? (
cartItem && cartItem.quantity > 0 ? (
<div
onClick={(e) => { e.preventDefault(); e.stopPropagation(); }}
<div
onClick={(e) => { e.preventDefault(); e.stopPropagation(); }}
className="flex items-center gap-1 bg-canina-blue/10 border border-canina-blue/20 rounded-xl p-1 shrink-0"
>
<button
@@ -392,8 +392,8 @@ const ArchiveProductListItem: React.FC<{ product: Product }> = ({ product }) =>
</span>
) : allowCart ? (
cartItem && cartItem.quantity > 0 ? (
<div
onClick={(e) => { e.preventDefault(); e.stopPropagation(); }}
<div
onClick={(e) => { e.preventDefault(); e.stopPropagation(); }}
className="flex items-center gap-1 bg-canina-blue/10 border border-canina-blue/20 rounded-lg p-0.5 shrink-0"
>
<button
@@ -739,7 +739,7 @@ export default function ArchivePage({
<div className="absolute -top-10 -left-10 w-32 h-32 bg-canina-blue rounded-full blur-3xl opacity-20 group-hover:opacity-40 transition-opacity" />
<h4 className="text-lg font-black italic mb-4 relative z-10 underline decoration-canina-blue underline-offset-8">{getText('shop_promo_card_title', 'مشاوره رایگان')}</h4>
<p className="text-xs text-white/60 leading-relaxed mb-6 relative z-10">{getText('shop_promo_card_desc', 'اگر نمی‌دانید کدام ترکیب برای پت شما مناسب است، همین حالا با دامپزشکان ما تماس بگیرید.')}</p>
<a
<a
href={getText('contact_phone_link', `tel:${getText('contact_phone', '').replace(/[^0-9+]/g, '')}`)}
className="w-full bg-white text-medical-gray-900 py-3 rounded-xl text-xs font-black hover:scale-105 transition-transform relative z-10 flex items-center justify-center font-vazir"
>
@@ -752,15 +752,13 @@ export default function ArchivePage({
<main className="flex-1 relative">
{/* Desktop Top Title & Search / Sort Row */}
<div className="hidden lg:flex flex-col sm:flex-row items-center justify-between mb-6 gap-4">
{getText('shop_catalog_title', '').trim() ? (
<h2
className="text-3xl font-black text-medical-gray-900"
dangerouslySetInnerHTML={{
__html: getText('shop_catalog_title', 'کاتولوگ دارویی <span class="text-canina-blue">Canina</span>')
}}
/>
) : null}
<h1
className="text-3xl font-black text-medical-gray-900"
dangerouslySetInnerHTML={{
__html: getText('shop_catalog_title', 'کاتالوگ و فروشگاه مکمل‌های دارویی <span class="text-canina-blue">کنینا</span>')
}}
/>
<div className="flex items-center gap-3 w-auto">
{/* Sort Dropdown */}
<div className="flex items-center gap-2 bg-white border border-medical-gray-200 rounded-2xl px-3 py-2 text-xs font-bold shadow-xs">
@@ -798,17 +796,15 @@ export default function ArchivePage({
</div>
</div>
{/* Mobile Title (Only if set in admin) */}
{getText('shop_catalog_title', '').trim() ? (
<div className="lg:hidden mb-2">
<h2
className="text-2xl font-black text-medical-gray-900"
dangerouslySetInnerHTML={{
__html: getText('shop_catalog_title', 'کاتولوگ دارویی <span class="text-canina-blue">Canina</span>')
}}
/>
</div>
) : null}
{/* Mobile Title */}
<div className="lg:hidden mb-2">
<h1
className="text-2xl font-black text-medical-gray-900"
dangerouslySetInnerHTML={{
__html: getText('shop_catalog_title', 'کاتالوگ و فروشگاه مکمل‌های دارویی <span class="text-canina-blue">کنینا</span>')
}}
/>
</div>
{/* Mobile Controls: Horizontal Sliding Filters & View Toggle Row */}
<div className="lg:hidden flex flex-col gap-2 mb-2">
@@ -825,12 +821,12 @@ export default function ArchivePage({
className="w-full bg-white border border-medical-gray-200 rounded-2xl py-2.5 pr-11 pl-4 text-xs font-bold focus:outline-none focus:ring-2 focus:ring-canina-blue/20 shadow-2xs"
/>
</div>
{/* Horizontal Scrollable Row for Sort, Pet Type, Solutions & Symptoms Filter */}
<div className="relative -mx-4 mt-2 mb-4" data-testid="mobile-catalog-filters-edge">
<div data-testid="mobile-catalog-filters" aria-label="فیلترهای محصولات" className="flex items-center gap-2 overflow-x-auto pb-2.5 pt-0.5 micro-hscroll px-4 select-none touch-pan-x mobile-filter-mask">
{/* 1. View Mode Switch: 2 Buttons (List / Card) */}
<div className="flex-shrink-0 inline-flex items-center bg-white border border-medical-gray-200 rounded-xl p-0.5 shadow-2xs mr-auto">
<button
@@ -922,7 +918,7 @@ export default function ArchivePage({
{isMobileSolutionsOpen && (
<div className="fixed inset-0 z-50 flex items-end justify-center bg-black/40 backdrop-blur-xs font-vazir" onClick={() => setIsMobileSolutionsOpen(false)}>
<div
<div
className="w-full max-w-lg bg-white rounded-t-3xl p-5 border-t border-medical-gray-200 shadow-2xl max-h-[75vh] flex flex-col animate-in slide-in-from-bottom duration-200"
onClick={(e) => e.stopPropagation()}
>
@@ -974,7 +970,7 @@ export default function ArchivePage({
{isMobileSymptomsOpen && (
<div className="fixed inset-0 z-50 flex items-end justify-center bg-black/40 backdrop-blur-xs font-vazir" onClick={() => setIsMobileSymptomsOpen(false)}>
<div
<div
className="w-full max-w-lg bg-white rounded-t-3xl p-5 border-t border-medical-gray-200 shadow-2xl max-h-[80vh] flex flex-col animate-in slide-in-from-bottom duration-200"
onClick={(e) => e.stopPropagation()}
>
@@ -369,7 +369,7 @@ export default function CheckoutPage() {
<span className="text-medical-gray-300">/</span>
<span className="cursor-pointer hover:text-canina-blue" onClick={() => router.push('/shop')}>سبد خرید</span>
<span className="text-medical-gray-300">/</span>
<span className="text-canina-blue font-black">تسویه‌حساب و پرداخت</span>
<h1 className="text-xs font-black text-canina-blue inline m-0 p-0 font-vazir">تسویه‌حساب و پرداخت</h1>
</div>
<div className="hidden sm:flex items-center gap-1.5 text-xs text-emerald-700 bg-emerald-50 border border-emerald-200 px-3 py-1 rounded-full font-bold">
<ShieldCheck className="w-3.5 h-3.5" />
@@ -171,9 +171,9 @@ export default function IngredientWiki() {
<FlaskConical className="w-4 h-4" />
علم در خدمت کیفیت
</div>
<h2 className="text-4xl lg:text-6xl font-black text-medical-gray-900 leading-tight md:max-w-4xl">
<h1 className="text-4xl lg:text-6xl font-black text-medical-gray-900 leading-tight md:max-w-4xl">
دانشنامه مواد <span className="text-canina-blue italic">نایاب و ارگانیک</span> کنینا
</h2>
</h1>
<p className="mt-6 text-lg text-medical-gray-500 max-w-2xl leading-relaxed">
تمامی ترکیبات فعال و مکمل‌های به کار رفته در محصولات دارویی و مراقبتی Canina Pharma آلمان، دارای بالاترین گرید بیولوژیک و فارماکوپه اروپا می‌باشند.
</p>
@@ -40,7 +40,7 @@ export default function OrderSuccess({ orderId }: { orderId: string }) {
<CheckCircle2 className="w-12 h-12" />
</div>
<h2 className="text-4xl font-black text-medical-gray-900 italic mb-4">سفارش شما با موفقیت ثبت شد!</h2>
<h1 className="text-4xl font-black text-medical-gray-900 italic mb-4">سفارش شما با موفقیت ثبت شد!</h1>
<p className="text-medical-gray-500 font-bold mb-10">شماره سفارش: <span className="text-canina-blue font-mono">{order.id}</span></p>
{/* Empathetic Message */}
@@ -68,7 +68,7 @@ export default function OrderTracking() {
</div>
<div className="flex items-center justify-between mb-12">
<h2 className="text-3xl font-black text-medical-gray-900 italic">وضعیت لحظه‌ای سفارش</h2>
<h1 className="text-3xl font-black text-medical-gray-900 italic">وضعیت لحظه‌ای سفارش</h1>
</div>
{/* Search Bar */}
@@ -420,7 +420,7 @@ export default function UserDashboard() {
<User className="w-6 h-6 sm:w-7 sm:h-7" />
</div>
<div className="min-w-0 flex-1">
<h2 className="text-base sm:text-lg font-black text-medical-gray-900 truncate">{profile.firstName} {profile.lastName}</h2>
<h1 className="text-base sm:text-lg font-black text-medical-gray-900 truncate">{profile.firstName} {profile.lastName}</h1>
<p className="text-[11px] sm:text-xs font-bold text-medical-gray-400 truncate">{profile.email}</p>
</div>
</div>